version 1.1, 2002/09/03 00:41:44 |
version 1.3, 2020/11/01 10:28:22 |
Line 6 static char rcsid[]= |
|
Line 6 static char rcsid[]= |
|
#endif /* lint */ |
#endif /* lint */ |
|
|
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
#include "fep_defs.h" |
#include "fep_defs.h" |
|
#include "fep_funcs.h" |
#include "fep_glob.h" |
#include "fep_glob.h" |
|
void initViBindings (FUNC cft[], FUNC aft[]); |
|
|
VAR default_set_vars [] = { |
VAR default_set_vars [] = { |
{"expand-tilde", "", |
{"expand-tilde", "", |
Line 75 VAR *var_list = &var_top; |
|
Line 79 VAR *var_list = &var_top; |
|
/* |
/* |
* Functions |
* Functions |
*/ |
*/ |
int set_var (/* char *name, char *value */); |
|
char *look_var (/* char *name */); |
|
int lookd_var (/* char *name */); |
|
VAR *getvp (/* char *name */); |
|
|
|
extern char *allocAndCopyThere(); |
extern char *allocAndCopyThere(); |
extern char *prompt; |
extern char *prompt; |
|
|
/* |
/* |
* Set default variables |
* Set default variables |
*/ |
*/ |
set_default_vars () |
void set_default_vars () |
{ |
{ |
register VAR *vp; |
register VAR *vp; |
|
|
Line 97 set_default_vars () |
|
Line 96 set_default_vars () |
|
/* |
/* |
* Set variable |
* Set variable |
*/ |
*/ |
set_var (name, value) |
int set_var (char *name, char *value) |
char *name; |
|
char *value; |
|
{ |
{ |
/* |
/* |
* Process special variable |
* Process special variable |
Line 150 set_var (name, value) |
|
Line 147 set_var (name, value) |
|
set_only_var (name, value); |
set_only_var (name, value); |
} |
} |
|
|
set_only_var (name, value) |
void set_only_var (char *name, char *value) |
char *name, *value; |
|
{ |
{ |
VAR *vp; |
VAR *vp; |
|
|
Line 169 set_only_var (name, value) |
|
Line 165 set_only_var (name, value) |
|
/* |
/* |
* Unset variable |
* Unset variable |
*/ |
*/ |
unset_var (name) |
void unset_var (char *name) |
char *name; |
|
{ |
{ |
VAR *vp, *prev; |
VAR *vp, *prev; |
|
|
Line 201 unset_var (name) |
|
Line 196 unset_var (name) |
|
/* |
/* |
* Look up variable |
* Look up variable |
*/ |
*/ |
char * |
char * look_var (char *name) |
look_var (name) |
|
char *name; |
|
{ |
{ |
|
|
VAR *vp; |
VAR *vp; |
|
|
/* |
/* |
* Look up variable and get integer result |
* Look up variable and get integer result |
*/ |
*/ |
int |
int lookd_var (char *name) |
lookd_var (name) |
|
char *name; |
|
{ |
{ |
VAR *vp; |
VAR *vp; |
|
|
Line 236 lookd_var (name) |
|
Line 227 lookd_var (name) |
|
/* |
/* |
* Show variable list |
* Show variable list |
*/ |
*/ |
show_varlist () |
void show_varlist () |
{ |
{ |
#ifdef HASH |
#ifdef HASH |
register int i; |
register int i; |
|
|
/* |
/* |
* Get hash index from variable name |
* Get hash index from variable name |
*/ |
*/ |
static getindex (s) |
static getindex (char *s) |
register char *s; |
|
{ |
{ |
register int sum = 0; |
register int sum = 0; |
|
|
Line 280 static getindex (s) |
|
Line 270 static getindex (s) |
|
* If there is no memoly associated to the variable and alloc argument is 1, |
* If there is no memoly associated to the variable and alloc argument is 1, |
* allocate the area and initialize name field. |
* allocate the area and initialize name field. |
*/ |
*/ |
VAR * |
VAR * getvp (char *name, int alloc, VAR **lastvp) |
getvp (name, alloc, lastvp) |
|
char *name; |
|
int alloc; |
|
VAR **lastvp; |
|
{ |
{ |
#ifdef HASH |
#ifdef HASH |
register i = getindex (name); |
register i = getindex (name); |