"Fossies" - the Fresh Open Source Software Archive 
Member "statist-1.4.2/tools/inisetup.c" (29 Oct 2005, 726 Bytes) of package /linux/privat/old/statist-1.4.2.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "inisetup.c" see the
Fossies "Dox" file reference documentation.
1 /* This file is part of statist
2 **
3 ** It is distributed under the GNU General Public License.
4 ** See the file COPYING for details.
5 **
6 ** $Id: inisetup.c,v 1.1 2005/10/29 17:39:23 jakson Exp $
7 ***************************************************************/
8
9 #include<stdio.h>
10
11 /* This program creates a .bat file that popup a DOS window with the correct
12 * %PATH% variable to run statist. */
13
14 int main(int argc, char **argv){
15 char s[300];
16 int i;
17 strcpy(s, argv[0]);
18 i = strlen(s) - 1;
19 while(s[i] != '\\')
20 i--;
21 s[i] = 0;
22 FILE *F;
23 F = fopen("prompt.bat", "w");
24 fprintf(F, "set PATH=\"%s;%%PATH%%\"\ncd \\\n@echo Type EXIT to close this window.\nCOMMAND.COM\n@cls\n@exit\n", s);
25 fclose(F);
26 return 0;
27 }