Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1992 - 1999
  3. Module Name:
  4. switch.hxx
  5. Abstract:
  6. This file contains definitions for command line switch processing.
  7. Author:
  8. Steven Zeck (stevez) 07/01/90
  9. --*/
  10. struct _SWitch;
  11. typedef int (*pFProcess)(struct _SWitch *pSW, char *pValue);
  12. // Each Switch object is defined as follows. It is a structure instead
  13. // of class because not all C++ implement static constructors.
  14. typedef struct _SWitch{
  15. char * name; // Name of switch
  16. pFProcess pProcess; // Function to process values
  17. void *p; // Pointer to a object used by the function.
  18. } SWitch;
  19. typedef SWitch SwitchList[];
  20. // List of predefined functions to use with pProcess in SWitch.
  21. extern "C" {
  22. int ProcessInt(SWitch *pSW, char *pValue);
  23. int ProcessLong(SWitch *pSW, char *pValue);
  24. int ProcessChar(SWitch *pSW, char *pValue);
  25. int ProcessSetFlag(SWitch *pSW, char *pValue);
  26. int ProcessResetFlag(SWitch *pSW, char *pValue);
  27. int ProcessYesNo(SWitch *pSW, char *pValue);
  28. char * ProcessArgs(SwitchList, char **aArgs);
  29. }