]> andersk Git - moira.git/blobdiff - gen/www.pc
Command line printer manipulation client, and build goo.
[moira.git] / gen / www.pc
index 0844929a2fe4f31e46a7544fb317117fdf379442..db0529a4a55a2150d59a47828bb9359bc7ae3f89 100644 (file)
@@ -151,6 +151,7 @@ void filsys(FILE *out)
   EXEC SQL BEGIN DECLARE SECTION;
   char label[FILESYS_LABEL_SIZE], path[FILESYS_NAME_SIZE];
   char type[FILESYS_TYPE_SIZE], key[FSGROUP_KEY_SIZE];
+  char alias[ALIAS_NAME_SIZE];
   int status, fid;
   EXEC SQL END DECLARE SECTION;
 
@@ -183,9 +184,30 @@ void filsys(FILE *out)
          EXEC SQL CLOSE group_cursor;
        }
 
+      EXEC SQL DECLARE alias_cursor CURSOR FOR
+       SELECT name INTO :alias FROM alias
+       WHERE type='FILESYS' AND trans=:label;
+
       if (!*strtrim(path))
        continue;
+      for (c = label; *c; c++)
+       *c = tolower(*c);
       fprintf(out, "%s:%s\n", label, path);
+
+      EXEC SQL OPEN alias_cursor;
+      while (1)
+       {
+         EXEC SQL FETCH alias_cursor INTO :alias;
+         if (sqlca.sqlcode)
+           break;
+         
+         if (!*strtrim(alias))
+           continue;
+         for (c = alias; *c; c++)
+           *c = tolower(*c);
+         fprintf(out, "%s:%s\n", alias, path);
+       }
+      EXEC SQL CLOSE alias_cursor;
     }
 
   EXEC SQL CLOSE filsys_cursor;
@@ -212,7 +234,7 @@ void group(FILE *out)
   EXEC SQL WHENEVER SQLERROR GOTO sqlerr;
 
   EXEC SQL DECLARE user_cursor CURSOR FOR
-    SELECT login FROM users WHERE status=1 OR status=2 OR status=6 
+    SELECT login FROM users WHERE status=1 OR status=2 OR status=6 OR status=9
     ORDER by login;
   EXEC SQL OPEN user_cursor;
 
This page took 0.025597 seconds and 4 git commands to generate.