[BACK]Return to fep_set.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / fep

Diff for /OpenXM_contrib2/fep/fep_set.c between version 1.2 and 1.3

version 1.2, 2010/04/23 05:34:05 version 1.3, 2020/11/01 10:28:22
Line 7  static char rcsid[]=
Line 7  static char rcsid[]=
   
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.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 76  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 98  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 151  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 170  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 202  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;
Line 220  look_var (name)
Line 212  look_var (name)
 /*  /*
  * 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 237  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;
Line 264  show_varlist ()
Line 254  show_varlist ()
 /*  /*
  * 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 281  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);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>