Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
regtest.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include "NSReg.h"
#include "VerReg.h"

Go to the source code of this file.

Defines

#define REGFILE   "c:\\temp\\reg.dat"

Functions

void interp (void)
int main (int argc, char *argv[])
char * errstr (REGERR err)

Variables

char * gRegistry

Define Documentation

#define REGFILE   "c:\\temp\\reg.dat"

Definition at line 50 of file regtest.c.


Function Documentation

char* errstr ( REGERR  err)

Definition at line 56 of file regtest.c.

{

       switch( err )
       {
       case REGERR_OK:
              return "REGERR_OK";
       case REGERR_FAIL:
              return "REGERR_FAIL";
       case REGERR_NOMORE:
              return "REGERR_MORE";
       case REGERR_NOFIND:
              return "REGERR_NOFIND";
       case REGERR_BADREAD:
              return "REGERR_BADREAD";
       case REGERR_BADLOCN:
              return "REGERR_BADLOCN";
       case REGERR_PARAM:
              return "REGERR_PARAM";
       case REGERR_BADMAGIC:
              return "REGERR_BADMAGIC";
    case REGERR_BADCHECK:
        return "REGERR_BADCHECK";
    case REGERR_NOFILE:
        return "REGERR_NOFILE";
    case REGERR_MEMORY:
        return "REGERR_MEMORY";
    case REGERR_BUFTOOSMALL:
        return "REGERR_BUFTOOSMALL";
    case REGERR_NAMETOOLONG:
        return "REGERR_NAMETOOLONG";
    case REGERR_REGVERSION:
        return "REGERR_REGVERSION";
    case REGERR_DELETED:
        return "REGERR_DELETED";
    case REGERR_BADTYPE:
        return "REGERR_BADTYPE";
    case REGERR_NOPATH:
        return "REGERR_NOPATH";
    case REGERR_BADNAME:
        return "REGERR_BADNAME";
    case REGERR_READONLY:
        return "REGERR_READONLY";
    case REGERR_BADUTF8:
        return "REGERR_BADUTF8";
       default:
              return "<Unknown>";
       }

}      // errstr

Here is the caller graph for this function:

void interp ( void  )

Definition at line 207 of file interp.c.

{

       char line[256];
       char *p;

       while(1)
       {
              putchar('>');
              putchar(' ');
              fflush(stdin); fflush(stdout); fflush(stderr);
              gets(line);

              /* p points to next word after verb on command line */
              p = line;
              while (*p && *p!=' ')
                     p++;
              if (!*p)
                     p = 0;
              else
              {
                     while(*p && *p==' ')
                            p++;
              }

              switch(toupper(line[0]))
              {
              case 'N':
                     vCreate(p);
                     break;
        case 'A':
            error("VR_SetRegDirectory", VR_SetRegDirectory(p));
            break;
        case 'C':
            error("VR_Close", VR_Close());
            break;

              case 'I':
                     vInstall(p);
                     break;
              case 'R':
              error("VR_Remove", VR_Remove(p));
                     break;
        case 'X':
              error("VR_InRegistry", VR_InRegistry(p));
            break;
        case 'T':
              error("VR_ValidateComponent", VR_ValidateComponent(p));
            break;

#if  LATER
        case 'E':
            vEnum(p);
            break;

        case 'V':
            vVersion(p);
            break;
        case 'P':
            vPath(p);
            break;
        case 'F':
            vGetRefCount(p);
            break;
        case 'D':
            vGetDir(p);
            break;
        
        case 'S':
            puts("--Unsupported--");
#endif

              case 'H':
              default:
                     vHelp(line);
                     break;
              case 'Q':
                     return;
              }      /* switch */
       }      /* while */

       assert(0);
       return;       /* shouldn't get here */

}      /* interp */

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

char* gRegistry

Definition at line 52 of file regtest.c.