home *** CD-ROM | disk | FTP | other *** search
- //************************************
- //
- // Name : Write.c
- //
- //************************************
-
-
- //**** Header files
-
- //** OS Include files
- #include <dos/dos.h>
-
- //** OS function prototypes
- #include <clib/dos_protos.h>
-
- //** OS function inline calls
- #include <pragmas/dos_pragmas.h>
-
- //** ANSI C includes
- #include <stdio.h>
-
- //** application include
- #include "Write.h"
- #include "Node.h"
-
-
- //**** non-local vars
-
- extern struct Library *DOSBase;
-
-
- //**** Write Tools file
-
- int WriteFile(STRPTR FileName) {
- BPTR fh;
- struct ProgNode *pn;
-
- if (NULL==(fh=Open(FileName,MODE_NEWFILE))) {
- return 0;
- } // if open
-
- for ( pn=(struct ProgNode *)List->lh_Head; pn->pn_Node.ln_Succ ; pn=(struct ProgNode *)pn->pn_Node.ln_Succ) {
- FPrintf(fh,"\"%s\" \"%s\" \"%s\" %ld %ld %ld\n",
- pn->pn_Node.ln_Name, pn->pn_Filename,
- pn->pn_Directory, pn->pn_LaunchCode,
- pn->pn_Stack, pn->pn_Priority
- ); // FPrintf
- } // for
-
- Close(fh);
-
- return 1;
- } // WriteFile
-
- //**** End of file
-