home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / FILNAMES.H < prev    next >
C/C++ Source or Header  |  1997-07-05  |  1KB  |  46 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  FILNAMES.H - Header file for SNIPPETS DOS file name processing functions.
  5. */
  6.  
  7. #ifndef FILNAMES__H
  8. #define FILNAMES__H
  9.  
  10. #include "sniptype.h"
  11.  
  12. char *fln_fix(char *path);
  13. int   flnorm(char *in_name, char *out_name);
  14. char *unix2dos(char *path);
  15. char *dos2unix(char *path);
  16. char *chgext(char *path, char *oldext, char *newext);
  17.  
  18. Boolean_T valid_fname (const char *fname, Boolean_T wild_check);
  19.  
  20. /*
  21. **  FNSPLIT.C prototypes and definitions
  22. */
  23.  
  24. #define Extension_ 1
  25. #define Filename_  2
  26. #define Directory_ 4
  27. #define Drive_     8
  28. #define Wildname_  16
  29. #define Wildpath_  32
  30.  
  31. Boolean_T has_wild(char *pname);
  32. int       fnSplit(char *spec, char *drive, char *pname, char *path,
  33.                   char *fname, char *name, char *ext);
  34. char     *fnMerge(char *spec, char *drive, char *pname, char *path,     
  35.                   char *fname, char *name, char *ext) ;
  36.  
  37. /*
  38. **  Macros for backwards compatibility with previous SNIPPETS, also more
  39. **  compatible with Borland psplit(), Microsoft _splitpath(), et al.
  40. */
  41.  
  42. #define psplit(str,drv,dir,nam,ext) fnSplit(str,drv,NULL,dir,NULL,nam,ext)
  43. #define pmerge(str,drv,dir,nam,ext) fnMerge(str,drv,NULL,dir,NULL,nam,ext)
  44.  
  45. #endif /* FILNAMES__H */
  46.