diff options
author | sabetts <sabetts> | 2001-09-18 06:47:06 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-09-18 06:47:06 +0000 |
commit | 3417b6981960f0c8ca0a5bf18a75386a10fdc719 (patch) | |
tree | 0b6fd50bcae2f2eb35e19ea4dbcf6e2e7b57731a /src | |
parent | 445978d53f43962da85830a396aaf3acd021219a (diff) | |
download | ratpoison-3417b6981960f0c8ca0a5bf18a75386a10fdc719.zip |
* src/actions.h (cmd_unsetenv): new prototype
* src/actions.c (cmd_unsetenv): new function
(user_commands): new "unsetenv" command
Diffstat (limited to 'src')
-rw-r--r-- | src/actions.c | 15 | ||||
-rw-r--r-- | src/actions.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c index afa855a..5bf33ea 100644 --- a/src/actions.c +++ b/src/actions.c @@ -67,6 +67,7 @@ static user_command user_commands[] = {"windows", cmd_windows, arg_VOID}, {"setenv", cmd_setenv, arg_STRING}, {"chdir", cmd_chdir, arg_STRING}, + {"unsetenv", cmd_unsetenv, arg_STRING}, /* Commands to set default behavior. */ {"defbarloc", cmd_defbarloc, arg_STRING}, @@ -1824,3 +1825,17 @@ cmd_chdir (int interactive, void *data) chdir ((char *)data); return NULL; } + +char * +cmd_unsetenv (int interactive, void *data) +{ + if (data == NULL) + { + message (" unsetenv: One argument is required "); + return NULL; + } + + unsetenv ((char *)data); + + return NULL; +} diff --git a/src/actions.h b/src/actions.h index 0658c49..c73fdba 100644 --- a/src/actions.h +++ b/src/actions.h @@ -92,6 +92,7 @@ char * cmd_deffgcolor (int interactive, void *data); char * cmd_defbgcolor (int interactive, void *data); char * cmd_setenv (int interactive, void *data); char * cmd_chdir (int interactive, void *data); +char * cmd_unsetenv (int interactive, void *data); /* void cmd_xterm (void *data); */ |