home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 November / VPR0311.ISO / OLS / TAR32223 / tar32223.lzh / tar32_2 / src / Cmdline.h < prev    next >
C/C++ Source or Header  |  2003-01-17  |  1KB  |  44 lines

  1. /*
  2.     cmdline.h
  3.  
  4.         by Yoshioka Tsuneo(QWF00133@niftyserve.or.jp)
  5.         welcome any e-mail!!
  6.         You can use this file as Public Domain Software.
  7.         Copy,Edit,Re-distibute and for any purpose,you can use this file.
  8.  
  9. */
  10.  
  11. #ifndef ___CMDLINE_H
  12. #define ___CMDLINE_H
  13.  
  14. #ifdef __cplusplus
  15. extern "C"{
  16. #endif
  17.  
  18. /* ptr の配列の長さを求める(NULLポインタが終端) */
  19. int ptrarraylen(void  **ptr);
  20.  
  21. /* 文字列の配列をまるごとコピー(複製)する */
  22. /* 一列にまとめることで一回freeを呼ぶだけで配列まるごと開放できる*/
  23. char **strarraydup(char **ptrptr);
  24.  
  25. /*    コマンドライン引数を分割する
  26.     (レスポンスファイルは利用しない。)*/
  27. char ** split_cmdline(const char *cmdline);
  28.  
  29. /*ファイルを読み込んで文字列に入れる*/
  30. char *loadfile(char *fname);
  31.  
  32. /* reallocを呼んで返り値を*ptrに入れる (NULLの場合は入れない)*/
  33. void *realloc2(void **ptr,int size);
  34.  
  35. /* コマンドラインを展開 */
  36. /*  @ではじまるレスポンスファイルがあればそれも展開する。*/
  37. char **split_cmdline_with_response(const char *cmdline);
  38.  
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* CMDLINE_H */
  43.  
  44.