prompt.c (84334) | prompt.c (148834) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Christos Zoulas of Cornell University. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. | 1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Christos Zoulas of Cornell University. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. |
16 * 3. All advertising materials mentioning features or use of this software 17 * must display the following acknowledgement: 18 * This product includes software developed by the University of 19 * California, Berkeley and its contributors. 20 * 4. Neither the name of the University nor the names of its contributors | 16 * 3. Neither the name of the University nor the names of its contributors |
21 * may be used to endorse or promote products derived from this software 22 * without specific prior written permission. 23 * 24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * | 17 * may be used to endorse or promote products derived from this software 18 * without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
36 * $NetBSD: prompt.c,v 1.7 2000/09/04 22:06:31 lukem Exp $ | 32 * $NetBSD: prompt.c,v 1.11 2003/08/07 16:44:32 agc Exp $ |
37 */ 38 39#if !defined(lint) && !defined(SCCSID) 40static char sccsid[] = "@(#)prompt.c 8.1 (Berkeley) 6/4/93"; 41#endif /* not lint && not SCCSID */ 42#include <sys/cdefs.h> | 33 */ 34 35#if !defined(lint) && !defined(SCCSID) 36static char sccsid[] = "@(#)prompt.c 8.1 (Berkeley) 6/4/93"; 37#endif /* not lint && not SCCSID */ 38#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/lib/libedit/prompt.c 84334 2001-10-01 23:00:29Z obrien $"); | 39__FBSDID("$FreeBSD: head/lib/libedit/prompt.c 148834 2005-08-07 20:55:59Z stefanf $"); |
44 45/* 46 * prompt.c: Prompt printing functions 47 */ 48#include "sys.h" 49#include <stdio.h> 50#include "el.h" 51 52private char *prompt_default(EditLine *); 53private char *prompt_default_r(EditLine *); 54 55/* prompt_default(): 56 * Just a default prompt, in case the user did not provide one 57 */ 58private char * 59/*ARGSUSED*/ | 40 41/* 42 * prompt.c: Prompt printing functions 43 */ 44#include "sys.h" 45#include <stdio.h> 46#include "el.h" 47 48private char *prompt_default(EditLine *); 49private char *prompt_default_r(EditLine *); 50 51/* prompt_default(): 52 * Just a default prompt, in case the user did not provide one 53 */ 54private char * 55/*ARGSUSED*/ |
60prompt_default(EditLine *el) | 56prompt_default(EditLine *el __unused) |
61{ 62 static char a[3] = {'?', ' ', '\0'}; 63 64 return (a); 65} 66 67 68/* prompt_default_r(): 69 * Just a default rprompt, in case the user did not provide one 70 */ 71private char * 72/*ARGSUSED*/ | 57{ 58 static char a[3] = {'?', ' ', '\0'}; 59 60 return (a); 61} 62 63 64/* prompt_default_r(): 65 * Just a default rprompt, in case the user did not provide one 66 */ 67private char * 68/*ARGSUSED*/ |
73prompt_default_r(EditLine *el) | 69prompt_default_r(EditLine *el __unused) |
74{ 75 static char a[1] = {'\0'}; 76 77 return (a); 78} 79 80 81/* prompt_print(): --- 38 unchanged lines hidden (view full) --- 120} 121 122 123/* prompt_end(): 124 * Clean up the prompt stuff 125 */ 126protected void 127/*ARGSUSED*/ | 70{ 71 static char a[1] = {'\0'}; 72 73 return (a); 74} 75 76 77/* prompt_print(): --- 38 unchanged lines hidden (view full) --- 116} 117 118 119/* prompt_end(): 120 * Clean up the prompt stuff 121 */ 122protected void 123/*ARGSUSED*/ |
128prompt_end(EditLine *el) | 124prompt_end(EditLine *el __unused) |
129{ 130} 131 132 133/* prompt_set(): 134 * Install a prompt printing function 135 */ 136protected int --- 36 unchanged lines hidden --- | 125{ 126} 127 128 129/* prompt_set(): 130 * Install a prompt printing function 131 */ 132protected int --- 36 unchanged lines hidden --- |