home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume42 / envv-1.2 / patch04 / patch.04
Encoding:
Text File  |  1994-05-11  |  2.8 KB  |  115 lines

  1. Prereq: 1.3
  2. *** ../old/Makefile    Fri Apr 22 11:07:41 1994
  3. --- ./Makefile    Tue May 10 10:41:49 1994
  4. ***************
  5. *** 1,6 ****
  6.   # Makefile for envv.
  7.   
  8. ! VERSION=1.3
  9.   
  10.   SRCS=envv.c
  11.   FILES=$(SRCS) Makefile README envv.1
  12. --- 1,6 ----
  13.   # Makefile for envv.
  14.   
  15. ! VERSION=1.4
  16.   
  17.   SRCS=envv.c
  18.   FILES=$(SRCS) Makefile README envv.1
  19. *** ../old/README    Tue May 10 10:32:02 1994
  20. --- ./README    Tue May 10 10:55:45 1994
  21. ***************
  22. *** 30,35 ****
  23. --- 30,43 ----
  24.   
  25.   CHANGES TO ENVV:
  26.   
  27. + * Version 1.4 (10 May 1994)
  28. + + Bug fixes
  29. + - If a set command was followed by add/move/del commands on stdin,
  30. +   it didn't work -- the results of the set were not saved in envv's
  31. +   environment.
  32.   * Version 1.3 (10 May 1994)
  33.   
  34.   + Bug fixes
  35. *** ../old/envv.1    Fri Apr 22 10:30:06 1994
  36. --- ./envv.1    Tue May 10 10:53:49 1994
  37. ***************
  38. *** 175,180 ****
  39. --- 175,194 ----
  40.   components are added or moved in a path variable, they inherit
  41.   whatever slashes are supplied in the \fIdir\fR argument.  Experiment...
  42.   .PP
  43. + The path-manipulation commands can add, move or delete only one
  44. + directory at a time.  For example, use this:
  45. + .PP
  46. + .nf
  47. +         add PATH /foo
  48. +         add PATH /bar
  49. + .fi
  50. + .PP
  51. + and not this:
  52. + .PP
  53. + .nf
  54. +         add PATH /foo:/bar
  55. + .fi
  56. + .PP
  57.   .SH AUTHOR
  58.   \fBEnvv\fR is Copyright 1994 by David F. Skoll.  It may be distributed for
  59.   free.  The only fees which may be charged are normal media costs or
  60. *** ../old/envv.c    Tue May 10 10:28:07 1994
  61. --- ./envv.c    Tue May 10 10:54:14 1994
  62. ***************
  63. *** 31,37 ****
  64.   /*  If no commands given on command line, read from stdin      */
  65.   /*                                                             */
  66.   /***************************************************************/
  67. ! #define VERSION "1.3"
  68.   
  69.   /* I need to use malloc.  If its prototype is in malloc.h, #define
  70.      NEED_MALLOC_H. */
  71. --- 31,37 ----
  72.   /*  If no commands given on command line, read from stdin      */
  73.   /*                                                             */
  74.   /***************************************************************/
  75. ! #define VERSION "1.4"
  76.   
  77.   /* I need to use malloc.  If its prototype is in malloc.h, #define
  78.      NEED_MALLOC_H. */
  79. ***************
  80. *** 375,380 ****
  81. --- 375,382 ----
  82.   int local;
  83.   #endif
  84.   {
  85. +    char *envstr;
  86.      switch(shell) {
  87.       case SH_LIKE:
  88.         printf("%s=", var);
  89. ***************
  90. *** 397,402 ****
  91. --- 399,417 ----
  92.       default:
  93.         fprintf(stderr, "%s: internal error - bad shell value %d\n", Argv[0], shell);
  94.      }
  95. +    /* If not reading from cmd line, set the value in the environment */
  96. +    if (!UseCmdLine) {
  97. +       envstr = malloc(strlen(var)+strlen(val)+2);
  98. +       if (envstr) {
  99. +      sprintf(envstr, "%s=%s", var, val);
  100. +      putenv(envstr);
  101. +       } else {
  102. +      fprintf(stderr, "%s: out of memory!\n", Argv[0]);
  103. +      exit(1);
  104. +       }
  105. +    }
  106. +       
  107.      return;
  108.   }
  109.   
  110.