Print this page
make: translate using gettext, rather than the unmaintainable catgets


  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 
  27 #include <stdlib.h>
  28 #include <string.h>
  29 
  30 #include <vroot/vroot.h>
  31 #include <vroot/args.h>
  32 
  33 #include <string.h>
  34 #include <sys/param.h>
  35 #include <sys/file.h>
  36 
  37 #include <avo/intl.h>     /* for NOCATGETS */
  38 
  39 typedef struct {
  40         short           init;
  41         pathpt          vector;
  42         const char      *env_var;
  43 } vroot_patht;
  44 
  45 typedef struct {
  46         vroot_patht     vroot;
  47         vroot_patht     path;
  48         char            full_path[MAXPATHLEN+1];
  49         char            *vroot_start;
  50         char            *path_start;
  51         char            *filename_start;
  52         int             scan_vroot_first;
  53         int             cpp_style_path;
  54 } vroot_datat, *vroot_datapt;
  55 
  56 static vroot_datat      vroot_data= {
  57         { 0, NULL, NOCATGETS("VIRTUAL_ROOT")},
  58         { 0, NULL, NOCATGETS("PATH")},
  59         "", NULL, NULL, NULL, 0, 1};
  60 
  61 void
  62 add_dir_to_path(const char *path, register pathpt *pointer, register int position)
  63 {
  64         register int            size= 0;
  65         register int            length;
  66         register char           *name;
  67         register pathcellpt     p;
  68         pathpt                  new_path;
  69 
  70         if (*pointer != NULL) {
  71                 for (p= &((*pointer)[0]); p->path != NULL; p++, size++);
  72                 if (position < 0)
  73                         position= size;}
  74         else
  75                 if (position < 0)
  76                         position= 0;
  77         if (position >= size) {
  78                 new_path= (pathpt)calloc((unsigned)(position+2), sizeof(pathcellt));




  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 
  27 #include <stdlib.h>
  28 #include <string.h>
  29 
  30 #include <vroot/vroot.h>
  31 #include <vroot/args.h>
  32 
  33 #include <string.h>
  34 #include <sys/param.h>
  35 #include <sys/file.h>
  36 


  37 typedef struct {
  38         short           init;
  39         pathpt          vector;
  40         const char      *env_var;
  41 } vroot_patht;
  42 
  43 typedef struct {
  44         vroot_patht     vroot;
  45         vroot_patht     path;
  46         char            full_path[MAXPATHLEN+1];
  47         char            *vroot_start;
  48         char            *path_start;
  49         char            *filename_start;
  50         int             scan_vroot_first;
  51         int             cpp_style_path;
  52 } vroot_datat, *vroot_datapt;
  53 
  54 static vroot_datat      vroot_data= {
  55         { 0, NULL, "VIRTUAL_ROOT"},
  56         { 0, NULL, "PATH"},
  57         "", NULL, NULL, NULL, 0, 1};
  58 
  59 void
  60 add_dir_to_path(const char *path, register pathpt *pointer, register int position)
  61 {
  62         register int            size= 0;
  63         register int            length;
  64         register char           *name;
  65         register pathcellpt     p;
  66         pathpt                  new_path;
  67 
  68         if (*pointer != NULL) {
  69                 for (p= &((*pointer)[0]); p->path != NULL; p++, size++);
  70                 if (position < 0)
  71                         position= size;}
  72         else
  73                 if (position < 0)
  74                         position= 0;
  75         if (position >= size) {
  76                 new_path= (pathpt)calloc((unsigned)(position+2), sizeof(pathcellt));