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

📄 std_cmdl_local.h

📁 JPEG2000实现的源码
💻 H
字号:
/*****************************************************************************/
/* Copyright 1998, Hewlett-Packard Company                                   */
/* All rights reserved                                                       */
/* File: "std_cmdl_local.h"                                                  */
/* Description: Private definitions for "std_cmdl.c".                        */
/* Author: David Taubman                                                     */
/* Affiliation: Hewlett-Packard and                                          */
/*              The University of New South Wales, Australia                 */
/* Version: VM6.0                                                            */
/* Last Revised: 19 January, 2000                                            */
/*****************************************************************************/
#ifndef STD_CMDL_LOCAL_H
#define STD_CMDL_LOCAL_H

#define CMDL_MEM_KEY "COMMAND-LINE OBJECT MEMORY"

/*****************************************************************************/
/*                                  cmd_list                                 */
/*****************************************************************************/

typedef
  struct cmd_list {
    char *arg;
    int arg_length;
    int tnum;
    int recognized;
    int num_params;
    char **params;
    struct cmd_list *next;
  } cmd_list, *cmd_list_ptr;
  /* This structure is used to build a list of partially parsed command
     line arguments, together with state information to identify whether
     or not the argument has been parsed -- this facilitates the
     identification of unrecognized command-line arguments.  Each element
     in the list contains a single argument, which is any text string
     commencing with a `-' character, followed immediately by an alphabetical
     character.
         This argument string is identified by the `arg' field.
     Note that the string is not dynamically allocated; the field simply
     points into the actual command-line argument list.  Only the first
     `arg_length' characters should be considered part of the argument
     name, which may be fewer than the original argument.  To understand
     this, consider a simple argument such as "-Flev" which identifies the
     number of levels of Wavelet decomposition.  If "-Flev" appears on the
     command-line, the `arg_length' field will be set to 5.  On the other
     hand, one can specify tile-specific arguments using the form,
     "-Flev+<tnum>" where <tnum> is a zero-based tile number.  Thus, the
     number of resolution levels for the third tile may be independently
     specified using "-Flev+2".  In this case, `arg_length' again holds 5,
     i.e. the argument string is considered to be that part of the original
     string which excludes the tile specifier.  The `tnum' field holds the
     tile specifier - 1, i.e. `tnum' is a zero-based tile-index.  A `tnum'
     value of -1 is used for arguments which do not have the tile specifier.
         The `recognized' field indicates whether or not the argument has been
     recognized by some module in the compression/decompression system as
     appropriate.
         Each element in the list also contains a reference to each of the
     argument's parameters.  All entries in the argc/argv list which appear
     between valid argument identifiers are considered to be parameters.
     The `num_params' field indicates the number of parameters and the
     `params' field points into the original argv array to the first
     parameter string -- subsequent parameters are consecutive entries in the
     argv array. */
    
/*****************************************************************************/
/*                                 std_cmdl_obj                              */
/*****************************************************************************/

typedef
  struct std_cmdl_obj {
    cmdl_obj base;
    char *prog_name;
    cmd_list_ptr list;
  } std_cmdl_obj, *std_cmdl_ref;

#endif /* STD_CMDL_LOCAL_H */

⌨️ 快捷键说明

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