File layout

Previous: The procdef manager ] [ Top: The procdef manager ] [ Next: list: Displaying the procdef directory ]

Well, this is the third component of the wftk, so my environment is getting a little more mature. I've moved XML manipulation into a library to cut down on overhead; eventually I'll redo the core engine to use that library instead of simply defining everything right in the same file.

But this program is really simple. It takes a command on the command line, and it returns some HTML representing some facet of the procdef repository (or some individual procdef in the repository.) A separate program will serve to make changes to procdefs and such; this one will just show things. (I think.)
#include "xmlapi.h"
#include "localdefs.h"

XML * directory;
XML * item;
XML * version;
XML * datasheet;

FILE * file;

char sbuf[1024];
char * mark;
char * format;
XML  * xml;
XML  * holder;

int main (int argc, char *argv[])
   if (argc < 2) {
      printf ("Usage: pdm <command> [<args>]\n");
      return (1);
   directory = NULL;
   item = NULL;
   version = NULL;

   if (!strcmp (argv[1], "list") ) {
      See list: Displaying the procdef directory
   } else if (!strcmp (argv[1], "starter")) {
      See starter: Displaying a process start form
   } else if (!strcmp (argv[1], "datasheet")) {
      See datasheet: Generating a blank datasheet
   } else if (!strcmp (argv[1], "editor")) {
      See editor: Displaying an edit form
   } else {
      printf ("Unknown command '%s'\n", argv[1]);

   if (directory) xml_free (directory);
   if (item) xml_free (item);
   if (version) xml_free (version);

   return (0);
Previous: The procdef manager ] [ Top: lpml alpha ] [ Next: list: Displaying the procdef directory ]

This code and documentation are released under the terms of the GNU license. They are additionally copyright (c) 2000, Vivtek. All rights reserved except those explicitly granted under the terms of the GNU license.