routines for command-line options in C

Copyright (C) 1994-1999 Taiji Yamada <taiji@aihara.co.jp>

[Back] [Japanese Page]


option.h - command-line option scanner

option.h can analyze command-line options as the following styles:
 


The scan_option is based on scanf routine. You can design command-line options with key strings according to scanf format. Also, a return value of scan_option is the index of the position of the argument matched to key in command-line arguments, so you can write more detailed code to scan subsequent arguments to matched position.
 

options.h - command-line options scanner

options.h can analyze command-line options as the following style:
  The styles of key on set_option and set_options is the same as scan_option but maching keys and substituting into vairables are performed at one time of executing scan_options. You can get the result whether the key exists in commnad-line arguments and which expresses the position of the argument matched to key by is_option.

Manual pages

Distributions


Questions or comments regarding this service? taiji@aihara.co.jp.

Copyright (C) 1998-1999 Taiji Yamada, AIHARA Electrical Engineering Co., Ltd.
All right reserved.