home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / CLIPB52.ZIP / HUFF.ZIP / SAMPLE2.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-23  |  812 b   |  28 lines

  1.         /***** SAMPLE2.c  C Code  ****/
  2.  
  3. #include "nandef.h"     /* Clipper header files */
  4. #include "extend.h"
  5.                         /* Microsoftt's header file */
  6. #include "c:\msoft\include\direct.h"
  7.  
  8. #define     AND     &&
  9. #define     FAILED  0
  10.  
  11. CLIPPER make_dir()          /* like DOS's MKDIR command */
  12. /*------------------------------------------------------------------*/
  13. {
  14.     char path_string[64];       /* declared locally on the stack */
  15.  
  16.     int success = FAILED;
  17.  
  18.     if(PCOUNT == 1 AND ISCHAR(1)) /* copy path to our local variable */
  19.         strcpy(path_string, _parc(1));
  20.  
  21.     /* here's Microsoft's library function */
  22.     if(path_string AND mkdir(path_string) == 0)
  23.         success = TRUE;
  24.  
  25.     _retl(success); /* return state to Clipper */
  26.  
  27. }  /* EOF Make_Dir() */
  28.