[BACK]Return to oxapp.c CVS log [TXT][DIR] Up to [local] / OpenXM / misc / packages / Windows

Diff for /OpenXM/misc/packages/Windows/oxapp.c between version 1.1 and 1.2

version 1.1, 2002/01/06 08:47:36 version 1.2, 2002/01/10 03:55:10
Line 1 
Line 1 
 /* $OpenXM$ */  /* $OpenXM: OpenXM/misc/packages/Windows/oxapp.c,v 1.1 2002/01/06 08:47:36 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #define LINESIZE 4096  #define LINESIZE 4096
   
   int ThereIsLoad = 0;
 main(int argc,char *argv[]) {  main(int argc,char *argv[]) {
   char s[LINESIZE];    char s[LINESIZE];
     int i;
   int removeSharp = 0;    int removeSharp = 0;
   if (argc > 1) {    int checkLoad = 0;
         if (strcmp(argv[1],"--removeSharp") == 0) {    extern ThereIsLoad;
     for (i=1; i<argc; i++) {
           if (strcmp(argv[i],"--removeSharp") == 0) {
           removeSharp = 1;            removeSharp = 1;
           }else if (strcmp(argv[i],"--load") == 0) {
             checkLoad = 1;
         }          }
   }    }
   while (fgets(s,LINESIZE,stdin) != NULL) {    while (fgets(s,LINESIZE,stdin) != NULL) {
Line 25  main(int argc,char *argv[]) {
Line 31  main(int argc,char *argv[]) {
   if (removeSharp == 0) {    if (removeSharp == 0) {
         printf("end$\n");          printf("end$\n");
   }    }
     if (checkLoad) {
           fprintf(stderr,"checkLoad status = %d\n",ThereIsLoad);
           if (ThereIsLoad) exit(0);
           else exit(1);
     }
 }  }
   
 edit(char s[]) {  edit(char s[]) {
   int k,i,j;    int k,i,j;
   char t[LINESIZE*2];    char t[LINESIZE*2];
     extern int ThereIsLoad;
   if (strlen(s) == 0) return;    if (strlen(s) == 0) return;
   t[0] = 0;    t[0] = 0;
   if ((k = find(s,"load(")) >= 0) {    if ((k = find(s,"load(")) >= 0) {
Line 54  edit(char s[]) {
Line 66  edit(char s[]) {
           t[i] = s[i]; t[i+1] = 0;            t[i] = s[i]; t[i+1] = 0;
         }          }
     strcat(t,"#include ");      strcat(t,"#include ");
           ThereIsLoad = 1;
         j=k+5;          j=k+5;
         for (i=strlen(t); i<LINESIZE*2-1; ) {          for (i=strlen(t); i<LINESIZE*2-1; ) {
           if (s[j] == 0) break;            if (s[j] == 0) break;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>