version 1.2, 2010/04/23 05:34:05 |
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 <string.h> |
#include <ctype.h> |
#include <ctype.h> |
#include "fep_defs.h" |
#include "fep_defs.h" |
|
#include "fep_funcs.h" |
#include "fep_glob.h" |
#include "fep_glob.h" |
|
|
typedef struct _alias { |
typedef struct _alias { |
Line 24 CHAR aliased_line[MAXCMDLEN+1]; |
|
Line 26 CHAR aliased_line[MAXCMDLEN+1]; |
|
/* |
/* |
* Functions |
* Functions |
*/ |
*/ |
int set_alias (/* char *name, char *value */); |
|
char *look_alias (/* char *name */); |
|
ALIAS *getap (/* char *name */); |
|
|
|
|
ALIAS * getap (char *name, int alloc, ALIAS **lastvp); |
extern char *allocAndCopyThere(); |
extern char *allocAndCopyThere(); |
extern char *prompt; |
extern char *prompt; |
|
|
/* |
/* |
* Check alias list, and if found alias change command by its value |
* Check alias list, and if found alias change command by its value |
*/ |
*/ |
CHAR * |
CHAR * check_alias (char *comline) |
check_alias (comline) |
|
char *comline; |
|
{ |
{ |
char *argv[MAXARGS]; |
char *argv[MAXARGS]; |
int argc; |
int argc; |
Line 118 check_alias (comline) |
|
Line 116 check_alias (comline) |
|
/* |
/* |
* Set alias |
* Set alias |
*/ |
*/ |
set_alias (name, value) |
void set_alias (char *name, char *value) |
char *name, *value; |
|
{ |
{ |
ALIAS *vp; |
ALIAS *vp; |
|
|
Line 134 set_alias (name, value) |
|
Line 131 set_alias (name, value) |
|
/* |
/* |
* Unset alias |
* Unset alias |
*/ |
*/ |
unset_alias (name) |
void unset_alias (char *name) |
char *name; |
|
{ |
{ |
ALIAS *vp, *prev; |
ALIAS *vp, *prev; |
|
|
Line 154 unset_alias (name) |
|
Line 150 unset_alias (name) |
|
/* |
/* |
* Look up alias |
* Look up alias |
*/ |
*/ |
char * |
char * look_alias (char *name) |
look_alias (name) |
|
char *name; |
|
{ |
{ |
|
|
ALIAS *vp; |
ALIAS *vp; |
Line 172 look_alias (name) |
|
Line 166 look_alias (name) |
|
/* |
/* |
* Show alias list |
* Show alias list |
*/ |
*/ |
show_aliaslist (a) |
void show_aliaslist (char *a) |
char *a; |
|
{ |
{ |
register ALIAS *vp; |
register ALIAS *vp; |
|
|
Line 190 show_aliaslist (a) |
|
Line 183 show_aliaslist (a) |
|
* If there is no memoly associated to the alias and alloc argument is 1, |
* If there is no memoly associated to the alias and alloc argument is 1, |
* allocate the area and initialize name field. |
* allocate the area and initialize name field. |
*/ |
*/ |
ALIAS * |
ALIAS * getap (char *name, int alloc, ALIAS **lastvp) |
getap (name, alloc, lastvp) |
|
char *name; |
|
int alloc; |
|
ALIAS **lastvp; |
|
{ |
{ |
ALIAS *vp, *last = (ALIAS *)0; |
ALIAS *vp, *last = (ALIAS *)0; |
|
|