⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 params.txt

📁 使用于OS/2下的小工具的C源程序,使用于OS/2下的小工具的C源程序
💻 TXT
字号:
                                                   ParamHandle
     
     int ParamHandle(  ParamBlock  *pblock,  int  *argc,  char
     *argv[]) ;
     
     ParamHandle  is   used  to   automate  the  command  line
     parameter  handling.   In  ParamBlock   it  is   given  a
     datastructure containing  parameter characters,  for each
     parameter a  function to  call, parameter  triggers and a
     set of flags to fine tune its behavior.
     
     Parameters
     
     
     Parameter       Description
     
     pblock          pblock contains a datastructure of type
                     ParamBlock. This datastructure contains
                     trigger characters (normally / and -),
                     which begin the options, all parameters,
                     a function for each parameter and a set
                     of flags.
     
     argc            This is pointer to the command line
                     count. ParamHandle modifies this value.
     
     argv            This is  pointer to  the original command
     line. ParamHandle  removes handled  parameters  from  the
     command line.
     
     
     #define IGNORECASE    0x0001
     #define NOIGNORECASE       0x0002
     #define PRIORITY      0x0004
     #define NOPRIORITY    0x0008
     #define TRIGGERSALLOWED   0x0010
     #define NOTRIGGERSALLOWED 0x0020
     
     Return Value
     
     Comments
     
     
     Example
     
     See also
                                                    ParamBlock
     #define INCL_PARAMS
     
     typedef struct {
        char *ParamStr ;
        int (*paramfn) (int argc, char *argv[], int index ) ;
        int cParams ;
     } ParamEntry;
     
     typedef struct {
        char *triggers ;
        unsigned long pflags ;
        ParamEntry *paramsa ;
     } ParamBlock;
     
     ParamBlock describes  the  different  options  a  program
     should recognize.  For each parameter it lists a function
     to call.
     
     Field            Description
     
     
     triggers      This  contains  as  a  string  the  trigger
     characters.  Triggers  are  characters,  which  begin  an
     option. Typically programs use / and - as triggers.
     
     
     pflags This  contains the  different flags  for modifying
     the behavior of parameter handlind. Different flags are:
     
     IGNORECASE Upper  and lower  case letters  are treated as
     equal. E.g.  /F and  /f are  the same option. This is the
     default behavior.
     
     NOIGNORECASE Upper and lower case letters are not treated
     as equal.
     
     PRIORITY  The   characters  in   paramsa  are  listed  in
     descending priority.  Normally parameters  are handled in
     the same  sequence as  they are on the command line. When
     this option  is set, first whole command line is searched
     for first  option char  and it  is handled, if found. The
     the remaining  command line  is searched  for the  second
     option char  and so  on. This  is useful  if some  of the
     options have  higher priority as others. E.g. /NOD option
     in FF  is used  to disable all attributes from search. It
     is nice to have it handled first.
     
     
     NOPRIORITY There  is no  priority between  option  chars.
     They are equal. This is the default.
     
     TRIGGERSALLOWED It  is allowed  to have option characters
     inside an other option characters XXX
     
     NOTRIGGERSALLOWED
     
     
     
        ParamEntry *paramsa ;
     
     ParamEntry contains
     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -