home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume6 / copt / not_kwd.c < prev    next >
C/C++ Source or Header  |  1989-03-07  |  1KB  |  44 lines

  1. static char rcsid[] = "$Header: not_kwd.c,v 1.1 89/03/03 12:53:25 np Exp $";
  2. /* $Log:    not_kwd.c,v $
  3.  * Revision 1.1  89/03/03  12:53:25  np
  4.  * Initial revision
  5.  * 
  6.  */
  7.  
  8. /*
  9.  * Copyright (C) 1985-1989 Nigel Perry
  10.  *
  11.  * This program is distributed without any warranty.
  12.  * The author and and distributors accept no resposibility
  13.  * to anyone for the consequence of using this program or
  14.  * whether it serves any particular purpose or works at all,
  15.  * unless they say so in writing.
  16.  *
  17.  * Everyone is granted permission to copy, modify and
  18.  * redistribute this program, but only provided that:
  19.  *
  20.  * 1) They do so without financial or material gain.
  21.  *
  22.  * 2) The copyright notice and this notice are preserved on
  23.  *    all copies.
  24.  *
  25.  * 3) The original source is preserved in any redistribution.
  26.  *
  27.  * I hope you find this program useful!
  28.  *
  29.  */
  30.  
  31. /* do execv if AS_ENVAR not set to AS_KWD
  32.  * enables programs to switch the option format according to the environment setting
  33.  */
  34.  
  35. #include "cset.h"
  36.  
  37. not_kwd(object, args) register char *object, **args;
  38. {  register char *val;
  39.    extern char *getenv();
  40.  
  41.    if( (val = getenv(AS_ENVAR)) == (char *)0 || strcmp(val, AS_KWD) != 0 )
  42.       execv(object, args);
  43. }
  44.