IOSS  2.0
Ioss_Getline.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 1991, 1992, 1993 by Chris Thewalt (thewalt@ce.berkeley.edu)
4  *
5  * Permission to use, copy, modify, and distribute this software
6  * for any purpose and without fee is hereby granted, provided
7  * that the above copyright notices appear in all copies and that both the
8  * copyright notice and this permission notice appear in supporting
9  * documentation. This software is provided "as is" without express or
10  * implied warranty.
11  *
12  * Thanks to the following people who have provided enhancements and fixes:
13  * Ron Ueberschaer, Christoph Keller, Scott Schwartz, Steven List,
14  * DaviD W. Sanderson, Goran Bostrom, Michael Gleason, Glenn Kasten,
15  * Edin Hodzic, Eric J Bivona, Kai Uwe Rommel, Danny Quah, Ulrich Betzler
16  */
17 
18 #ifndef GETLINE_H
19 #define GETLINE_H
20 
21 /* unix systems can #define POSIX to use termios, otherwise
22  * the bsd or sysv interface will be used
23  */
24 
25 #define GL_BUF_SIZE 1024
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 typedef size_t (*gl_strwidth_proc)(char *);
32 typedef int (*gl_in_hook_proc)(char *);
33 typedef int (*gl_out_hook_proc)(char *);
34 typedef int (*gl_tab_hook_proc)(char *, int, int *, size_t);
35 typedef size_t (*gl_strlen_proc)(const char *);
36 typedef char *(*gl_tab_completion_proc)(const char *, int);
37 
38 char *getline_int(const char *); /* read a line of input */
39 void gl_setwidth(int); /* specify width of screen */
40 void gl_histadd(const char *); /* adds entries to hist */
41 void gl_strwidth(gl_strwidth_proc); /* to bind gl_strlen */
43 char *gl_local_filename_completion_proc(const char *, int);
44 void gl_set_home_dir(const char *homedir);
45 void gl_histsavefile(const char *const path);
46 void gl_histloadfile(const char *const path);
47 char *gl_win_getpass(const char *const prompt, char *const pass, int dsize);
48 
49 #ifndef _getline_c_
50 
57 extern const char * gl_filename_quote_characters;
60 extern char gl_buf[GL_BUF_SIZE];
61 
62 #endif /* ! _getline_c_ */
63 
64 #ifdef __cplusplus
65 } /* close brackets on extern "C" declaration */
66 #endif
67 
68 #endif /* GETLINE_H */
gl_histadd
void gl_histadd(const char *)
Definition: Ioss_Getline.c:1243
gl_in_hook_proc
int(* gl_in_hook_proc)(char *)
Definition: Ioss_Getline.h:32
gl_tab_completion_proc
char *(* gl_tab_completion_proc)(const char *, int)
Definition: Ioss_Getline.h:36
gl_ellipses_during_completion
int gl_ellipses_during_completion
Definition: Ioss_Getline.c:126
gl_tab_completion
void gl_tab_completion(gl_tab_completion_proc)
Definition: Ioss_Getline.c:1757
gl_completion_proc
gl_tab_completion_proc gl_completion_proc
Definition: Ioss_Getline.c:123
gl_tab_hook_proc
int(* gl_tab_hook_proc)(char *, int, int *, size_t)
Definition: Ioss_Getline.h:34
gl_out_hook_proc
int(* gl_out_hook_proc)(char *)
Definition: Ioss_Getline.h:33
gl_out_hook
gl_out_hook_proc gl_out_hook
Definition: Ioss_Getline.c:120
getline_int
char * getline_int(const char *)
Definition: Ioss_Getline.c:498
gl_tab_hook
gl_tab_hook_proc gl_tab_hook
Definition: Ioss_Getline.c:121
gl_filename_quote_characters
const char * gl_filename_quote_characters
Definition: Ioss_Getline.c:125
gl_local_filename_completion_proc
char * gl_local_filename_completion_proc(const char *, int)
Definition: Ioss_Getline.c:1848
gl_histsavefile
void gl_histsavefile(const char *const path)
Definition: Ioss_Getline.c:1330
gl_filename_quoting_desired
int gl_filename_quoting_desired
Definition: Ioss_Getline.c:124
GL_BUF_SIZE
#define GL_BUF_SIZE
Definition: Ioss_Getline.h:25
gl_strlen_proc
size_t(* gl_strlen_proc)(const char *)
Definition: Ioss_Getline.h:35
gl_histloadfile
void gl_histloadfile(const char *const path)
Definition: Ioss_Getline.c:1355
gl_win_getpass
char * gl_win_getpass(const char *const prompt, char *const pass, int dsize)
gl_in_hook
gl_in_hook_proc gl_in_hook
Definition: Ioss_Getline.c:119
gl_setwidth
void gl_setwidth(int)
Definition: Ioss_Getline.c:485
gl_strwidth
void gl_strwidth(gl_strwidth_proc)
gl_strwidth_proc
size_t(* gl_strwidth_proc)(char *)
Definition: Ioss_Getline.h:31
gl_completion_exact_match_extra_char
int gl_completion_exact_match_extra_char
Definition: Ioss_Getline.c:127
gl_set_home_dir
void gl_set_home_dir(const char *homedir)
Definition: Ioss_Getline.c:1783
gl_buf
char gl_buf[GL_BUF_SIZE]
Definition: Ioss_Getline.c:128
gl_strlen
gl_strlen_proc gl_strlen
Definition: Ioss_Getline.c:122