File: prm.h

package info (click to toggle)
conquest 8.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,984 kB
  • ctags: 3,086
  • sloc: ansic: 39,393; sh: 8,540; yacc: 446; makefile: 296; lex: 146
file content (30 lines) | stat: -rw-r--r-- 762 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* 
 * prompt utils
 *
 * $Id: prm.h,v 1.2 2004/05/08 21:01:41 jon Exp $
 *
 * Copyright 1999-2004 Jon Trulson under the ARTISTIC LICENSE. (See LICENSE).
 */

#ifndef _PRM_H
#define _PRM_H

/* return values from prmProcInput() */

#define PRM_OK            0     /* everything ok */
#define PRM_MAXLEN        -1    /* maxlen exceeded */
/* retval > 0 is the terminator char */

typedef struct _prompt {
  Bool preinit;                 /* pre-initing the prompt resp? */
  char *buf;                    /* response */
  int buflen;
  char *pbuf;                   /* the prompt */
  char *terms;                  /* terminators */
  int index;                    /* only used in CP for now */
} prm_t;

int prmProcInput(prm_t *prm, int ch);


#endif /* _PRM_H */