home *** CD-ROM | disk | FTP | other *** search
- /***** SAMPLE2.c C Code ****/
-
- #include "nandef.h" /* Clipper header files */
- #include "extend.h"
- /* Microsoftt's header file */
- #include "c:\msoft\include\direct.h"
-
- #define AND &&
- #define FAILED 0
-
- CLIPPER make_dir() /* like DOS's MKDIR command */
- /*------------------------------------------------------------------*/
- {
- char path_string[64]; /* declared locally on the stack */
-
- int success = FAILED;
-
- if(PCOUNT == 1 AND ISCHAR(1)) /* copy path to our local variable */
- strcpy(path_string, _parc(1));
-
- /* here's Microsoft's library function */
- if(path_string AND mkdir(path_string) == 0)
- success = TRUE;
-
- _retl(success); /* return state to Clipper */
-
- } /* EOF Make_Dir() */
-