mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 23:36:23 -05:00
Review prototypes of prompting functions.
This commit is contained in:
parent
0aea939e21
commit
f5c715debd
4
exec.c
4
exec.c
@ -241,12 +241,12 @@ int macarg(char *tok)
|
|||||||
* nextarg:
|
* nextarg:
|
||||||
* get the next argument
|
* get the next argument
|
||||||
*
|
*
|
||||||
* char *prompt; prompt to use if we must be interactive
|
* const char *prompt; prompt to use if we must be interactive
|
||||||
* char *buffer; buffer to put token into
|
* char *buffer; buffer to put token into
|
||||||
* int size; size of the buffer
|
* int size; size of the buffer
|
||||||
* int terminator; terminating char to be used on interactive fetch
|
* int terminator; terminating char to be used on interactive fetch
|
||||||
*/
|
*/
|
||||||
int nextarg(char *prompt, char *buffer, int size, int terminator)
|
int nextarg(const char *prompt, char *buffer, int size, int terminator)
|
||||||
{
|
{
|
||||||
/* if we are interactive, go get it! */
|
/* if we are interactive, go get it! */
|
||||||
if (clexec == FALSE)
|
if (clexec == FALSE)
|
||||||
|
2
exec.h
2
exec.h
@ -8,7 +8,7 @@ int execcmd( int f, int n) ;
|
|||||||
int docmd( char *cline) ;
|
int docmd( char *cline) ;
|
||||||
char *token( char *src, char *tok, int size) ;
|
char *token( char *src, char *tok, int size) ;
|
||||||
int macarg( char *tok) ;
|
int macarg( char *tok) ;
|
||||||
int nextarg( char *prompt, char *buffer, int size, int terminator) ;
|
int nextarg( const char *prompt, char *buffer, int size, int terminator) ;
|
||||||
int storemac( int f, int n) ;
|
int storemac( int f, int n) ;
|
||||||
int storeproc( int f, int n) ;
|
int storeproc( int f, int n) ;
|
||||||
int execproc( int f, int n) ;
|
int execproc( int f, int n) ;
|
||||||
|
10
input.c
10
input.c
@ -37,7 +37,7 @@
|
|||||||
* ABORT. The ABORT status is returned if the user bumps out of the question
|
* ABORT. The ABORT status is returned if the user bumps out of the question
|
||||||
* with a ^G. Used any time a confirmation is required.
|
* with a ^G. Used any time a confirmation is required.
|
||||||
*/
|
*/
|
||||||
int mlyesno(char *prompt)
|
int mlyesno( const char *prompt)
|
||||||
{
|
{
|
||||||
char c; /* input character */
|
char c; /* input character */
|
||||||
char buf[NPAT]; /* prompt to user */
|
char buf[NPAT]; /* prompt to user */
|
||||||
@ -70,12 +70,12 @@ int mlyesno(char *prompt)
|
|||||||
* return. Handle erase, kill, and abort keys.
|
* return. Handle erase, kill, and abort keys.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int mlreply(char *prompt, char *buf, int nbuf)
|
int mlreply( const char *prompt, char *buf, int nbuf)
|
||||||
{
|
{
|
||||||
return nextarg(prompt, buf, nbuf, ctoec('\n'));
|
return nextarg(prompt, buf, nbuf, ctoec('\n'));
|
||||||
}
|
}
|
||||||
|
|
||||||
int mlreplyt(char *prompt, char *buf, int nbuf, int eolchar)
|
int mlreplyt(const char *prompt, char *buf, int nbuf, int eolchar)
|
||||||
{
|
{
|
||||||
return nextarg(prompt, buf, nbuf, eolchar);
|
return nextarg(prompt, buf, nbuf, eolchar);
|
||||||
}
|
}
|
||||||
@ -444,11 +444,11 @@ handle_CSI:
|
|||||||
to specify the proper terminator. If the terminator is not
|
to specify the proper terminator. If the terminator is not
|
||||||
a return ('\n') it will echo as "<NL>"
|
a return ('\n') it will echo as "<NL>"
|
||||||
*/
|
*/
|
||||||
int getstring(char *prompt, char *buf, int nbuf, int eolchar)
|
int getstring( const char *prompt, char *buf, int nbuf, int eolchar)
|
||||||
{
|
{
|
||||||
int cpos; /* current character position in string */
|
int cpos; /* current character position in string */
|
||||||
int c;
|
int c;
|
||||||
int quotef; /* are we quoting the next char? */
|
boolean quotef ; /* are we quoting the next char? */
|
||||||
#if COMPLC
|
#if COMPLC
|
||||||
int ffile, ocpos, nskip = 0, didtry = 0;
|
int ffile, ocpos, nskip = 0, didtry = 0;
|
||||||
#if MSDOS
|
#if MSDOS
|
||||||
|
8
input.h
8
input.h
@ -3,16 +3,16 @@
|
|||||||
|
|
||||||
#include "edef.h"
|
#include "edef.h"
|
||||||
|
|
||||||
int mlyesno( char *prompt) ;
|
int mlyesno( const char *prompt) ;
|
||||||
int mlreply( char *prompt, char *buf, int nbuf) ;
|
int mlreply( const char *prompt, char *buf, int nbuf) ;
|
||||||
int mlreplyt( char *prompt, char *buf, int nbuf, int eolchar) ;
|
int mlreplyt( const char *prompt, char *buf, int nbuf, int eolchar) ;
|
||||||
int ectoc( int c) ;
|
int ectoc( int c) ;
|
||||||
int ctoec( int c) ;
|
int ctoec( int c) ;
|
||||||
fn_t getname( void) ;
|
fn_t getname( void) ;
|
||||||
int tgetc( void) ;
|
int tgetc( void) ;
|
||||||
int get1key( void) ;
|
int get1key( void) ;
|
||||||
int getcmd( void) ;
|
int getcmd( void) ;
|
||||||
int getstring( char *prompt, char *buf, int nbuf, int eolchar) ;
|
int getstring( const char *prompt, char *buf, int nbuf, int eolchar) ;
|
||||||
void outstring( char *s) ;
|
void outstring( char *s) ;
|
||||||
void ostring( char *s) ;
|
void ostring( char *s) ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user