From 3417b6981960f0c8ca0a5bf18a75386a10fdc719 Mon Sep 17 00:00:00 2001 From: sabetts Date: Tue, 18 Sep 2001 06:47:06 +0000 Subject: * src/actions.h (cmd_unsetenv): new prototype * src/actions.c (cmd_unsetenv): new function (user_commands): new "unsetenv" command --- src/actions.c | 15 +++++++++++++++ src/actions.h | 1 + 2 files changed, 16 insertions(+) (limited to 'src') 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); */ -- cgit v1.2.3