mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.10.2t30
This commit is contained in:
50
hist.h
Normal file
50
hist.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 1993 David I. Bell
|
||||
* Permission is granted to use, distribute, or modify this source,
|
||||
* provided that this copyright notice remains intact.
|
||||
*
|
||||
* Definitions for command history module.
|
||||
*/
|
||||
|
||||
#if !defined(_HIST_H_)
|
||||
#define _HIST_H_
|
||||
|
||||
/*
|
||||
* Default binding file and history size.
|
||||
*/
|
||||
#ifndef HIST_BINDING_FILE
|
||||
#define HIST_BINDING_FILE "/usr/lib/hist.bind"
|
||||
#endif
|
||||
|
||||
#ifndef HIST_SIZE
|
||||
#define HIST_SIZE (1024*10)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* path search defines
|
||||
*/
|
||||
#define HOMECHAR '~' /* char which indicates home directory */
|
||||
#define DOTCHAR '.' /* char which indicates current directory */
|
||||
#define PATHCHAR '/' /* char which separates path components */
|
||||
#define LISTCHAR ':' /* char which separates paths in a list */
|
||||
#define PATHSIZE 1024 /* maximum length of path name */
|
||||
|
||||
|
||||
/*
|
||||
* Possible returns from hist_init. Note that an error from hist_init does
|
||||
* not prevent calling the other routines, but fancy command line editing
|
||||
* is then disabled.
|
||||
*/
|
||||
#define HIST_SUCCESS 0 /* successfully inited */
|
||||
#define HIST_INITED 1 /* initialization is already done */
|
||||
#define HIST_NOFILE 2 /* bindings file could not be read */
|
||||
#define HIST_NOTTY 3 /* terminal modes could not be set */
|
||||
|
||||
|
||||
extern int hist_init(char *filename);
|
||||
extern void hist_term(void);
|
||||
extern int hist_getline(char *prompt, char *buf, int len);
|
||||
extern void hist_saveline(char *line, int len);
|
||||
|
||||
#endif /* _HIST_H_ */
|
Reference in New Issue
Block a user