Only in src-1.0-sgi4irix6: .gdb_history diff -ru src-1.0/codegen.c src-1.0-sgi4irix6/codegen.c --- src-1.0/codegen.c Tue May 28 09:21:20 1996 +++ src-1.0-sgi4irix6/codegen.c Thu Apr 3 20:51:21 1997 @@ -7,7 +7,11 @@ #include #include +#ifndef unix #include +#else +#include +#endif #include"codegen.h" #include"defs.h" #include"fileio.h" Only in src-1.0-sgi4irix6: codegen.o diff -ru src-1.0/defs.h src-1.0-sgi4irix6/defs.h --- src-1.0/defs.h Tue May 28 09:44:10 1996 +++ src-1.0-sgi4irix6/defs.h Thu Apr 3 21:03:22 1997 @@ -8,6 +8,8 @@ #ifndef _defs_h_ #define _defs_h_ +#define SIZEDEF_FILE "/store/lib/html2rtf/sizes.def" + /*Symbole fuer eine Auswahl von Elementsymbolen aus einem HTML-Text*/ enum symbol{ HTML_SYM, /*Anfangs Symbole*/ HEAD_SYM, Only in src-1.0-sgi4irix6: defs.o diff -ru src-1.0/error.c src-1.0-sgi4irix6/error.c --- src-1.0/error.c Tue Apr 16 12:31:28 1996 +++ src-1.0-sgi4irix6/error.c Thu Apr 3 21:12:18 1997 @@ -5,6 +5,7 @@ Funktion : Funktionen zur Fehler- und Warnungsbehandlung */ #include +#include #include"error.h" #include"fileio.h" Only in src-1.0-sgi4irix6: error.o diff -ru src-1.0/fileio.c src-1.0-sgi4irix6/fileio.c --- src-1.0/fileio.c Thu Apr 18 17:09:22 1996 +++ src-1.0-sgi4irix6/fileio.c Thu Apr 3 20:47:36 1997 @@ -52,7 +52,7 @@ } } -char lies(void) +int lies(void) /* Rueckgabewert: char-Wert des naechsten Zeichens. Funktion: Aus der Quelldatei FpI wird ein Zeichen gelesen und die @@ -60,7 +60,7 @@ Vorbedingungen: Es muss ueber den Pointer FpI auf den Quelltext zugegriffen werden koennen. */ -{ char c=getc(FpI); +{ int c=getc(FpI); Spalte++; if(c=='\n'){ Zeile++; diff -ru src-1.0/fileio.h src-1.0-sgi4irix6/fileio.h --- src-1.0/fileio.h Thu Apr 18 10:34:56 1996 +++ src-1.0-sgi4irix6/fileio.h Thu Apr 3 20:47:44 1997 @@ -10,7 +10,7 @@ void openInput (char *); void closeInput (void); -char lies (void); +int lies (void); void actPos (unsigned *, unsigned *); void openOutput (char *); void closeOutput(void); Only in src-1.0-sgi4irix6: fileio.o diff -ru src-1.0/ftext.c src-1.0-sgi4irix6/ftext.c --- src-1.0/ftext.c Tue Apr 23 09:36:40 1996 +++ src-1.0-sgi4irix6/ftext.c Thu Apr 3 20:53:08 1997 @@ -8,6 +8,9 @@ #include #include +#ifdef unix +#include +#endif #include"ftext.h" #include"defs.h" Only in src-1.0-sgi4irix6: ftext.o diff -ru src-1.0/links.c src-1.0-sgi4irix6/links.c --- src-1.0/links.c Tue Apr 16 12:31:28 1996 +++ src-1.0-sgi4irix6/links.c Thu Apr 3 21:09:23 1997 @@ -6,7 +6,12 @@ */ #include +#ifndef unix #include +#else +#include +#include +#endif #include"links.h" extern char path[256]; Only in src-1.0-sgi4irix6: links.o diff -ru src-1.0/main.c src-1.0-sgi4irix6/main.c --- src-1.0/main.c Thu May 30 11:09:00 1996 +++ src-1.0-sgi4irix6/main.c Thu Apr 3 21:11:44 1997 @@ -5,7 +5,11 @@ Funktion : Hauptprogramm */ +#ifndef unix #include +#else +#include +#endif #include #include #include @@ -37,10 +41,14 @@ struct element elementDaten; enum symbol symbol; unsigned int warnings, errors; +#ifndef unix struct time zeit1, zeit2; +#endif int i, printDefaults; +#ifndef unix gettime(&zeit1); +#endif elementDaten.parameterPtr=NULL; puts("HTML-to-RTF Compiler 0.9, Robin Gressmann 1996"); @@ -56,7 +64,7 @@ split(nameI, path, name); creat_HPJ_Name(nameHPJ, name); creat_RTF_Name(nameRTF, name); - strcpy(nameDEF, "sizes.def"); + strcpy(nameDEF, SIZEDEF_FILE); strcpy(nameWindow, "Manual"); strcpy(HeadLabel, "top_of_file_label"); printDefaults=0; @@ -105,9 +113,13 @@ fileError("found a write-protected HPJ-file"); } value_of_WarningsErrors(&warnings, &errors); +#ifndef unix gettime(&zeit2); +#endif +#ifndef unix printf("\ntime in use : %.2f sec", diffTime(zeit1, zeit2)); +#endif printf("\nWarnings : %u", warnings); printf("\nErrors : %u", errors); printf("\nDEF-File : %s", nameDEF); @@ -116,6 +128,7 @@ printf("\nProjekt-File: %s", nameHPJ); printf("\nPath : %s", path); printf("\nName : %s\n\n", name); + return 0; } void check(char *nameI) @@ -205,12 +218,14 @@ void insert_in_HPJ_file(char *HPJ, char *RTF) { FILE *fp; char zeile[50], zeichen[2]; + int tmp = 0; int in=0; zeichen[1]=zeile[0]='\0'; if((fp=fopen(HPJ, "r+"))==NULL){ fileError("can not create projekt file"); } - while((zeichen[0]=getc(fp))!=EOF){ + while((tmp = getc(fp))!=EOF){ + zeichen[0] = (char)tmp; if(zeichen[0]=='\n'){ if(!stricmp(zeile,RTF)){ in=1; Only in src-1.0-sgi4irix6: main.o diff -ru src-1.0/makefile src-1.0-sgi4irix6/makefile --- src-1.0/makefile Thu May 30 11:09:36 1996 +++ src-1.0-sgi4irix6/makefile Thu Apr 3 21:29:42 1997 @@ -1,42 +1,43 @@ -para=-O2 -fomit-frame-pointer -funroll-all-loops +CC=gcc +CFLAGS=-Wall -O2 -fomit-frame-pointer -funroll-all-loops html2rtf.exe : main.o scanner.o error.o codegen.o parser.o sizes.o utils.o links.o fileio.o defs.o ftext.o - gcc *.o -lm + $(CC) *.o -lm mkexe.bat html2rtf copy html2rtf.exe c:\a\bin main.o : main.c main.h utils.h parser.h defs.h sizes.h fileio.h - gcc $(para) -c main.c + $(CC) $(CFLAGS) -c main.c scanner.o : scanner.c scanner.h defs.h error.h fileio.h ftext.h - gcc $(para) -c scanner.c + $(CC) $(CFLAGS) -c scanner.c defs.o : defs.c defs.h error.h - gcc $(para) -c defs.c + $(CC) $(CFLAGS) -c defs.c fileio.o : fileio.c fileio.h defs.h error.h - gcc $(para) -c fileio.c + $(CC) $(CFLAGS) -c fileio.c parser.o : parser.c parser.h defs.h error.h scanner.h codegen.h ftext.h - gcc $(para) -c parser.c + $(CC) $(CFLAGS) -c parser.c codegen.o : codegen.c codegen.h defs.h links.h fileio.h error.h ftext.h - gcc $(para) -c codegen.c + $(CC) $(CFLAGS) -c codegen.c sizes.o : sizes.c sizes.h error.h utils.h - gcc $(para) -c sizes.c + $(CC) $(CFLAGS) -c sizes.c error.o : error.c error.h - gcc $(para) -c error.c + $(CC) $(CFLAGS) -c error.c utils.o : utils.c utils.h error.h - gcc $(para) -c utils.c + $(CC) $(CFLAGS) -c utils.c links.o : links.c links.h - gcc $(para) -c links.c + $(CC) $(CFLAGS) -c links.c ftext.o : ftext.c ftext.h defs.h - gcc $(para) -c ftext.c + $(CC) $(CFLAGS) -c ftext.c clear : del *.o diff -ru src-1.0/parser.c src-1.0-sgi4irix6/parser.c --- src-1.0/parser.c Tue Apr 30 10:30:24 1996 +++ src-1.0-sgi4irix6/parser.c Thu Apr 3 21:12:48 1997 @@ -6,8 +6,10 @@ HTML-Befehle */ #include +#include #include #include"parser.h" +#include "fileio.h" #include"defs.h" #include"scanner.h" #include"codegen.h" Only in src-1.0-sgi4irix6: parser.o diff -ru src-1.0/scanner.c src-1.0-sgi4irix6/scanner.c --- src-1.0/scanner.c Thu Apr 18 16:09:58 1996 +++ src-1.0-sgi4irix6/scanner.c Thu Apr 3 21:06:35 1997 @@ -8,7 +8,11 @@ #include #include #include +#ifndef unix #include +#else +#include +#endif #include"defs.h" #include"scanner.h" #include"error.h" @@ -28,7 +32,7 @@ Anfangssymbol '--'. Nachbedingingen: FpI zeigt genau hinter das Kommentarendesymbol --'. */ -{ char c; +{ int c; while ((c=lies())!=EOF){ if(c=='-'){ if(lies()=='-'){ @@ -48,7 +52,7 @@ Anfangssymbol ''. */ -{ char c; +{ int c; while ((c=lies())!=EOF){ if(c=='>'){ return; @@ -64,7 +68,7 @@ Datei dann wieder vor dieses Zeichen. Vorbedingungen: FpI muss auf eine Datei mit Lesezugriff zeigen. */ -{ char c; +{ int c; long pos; do{ pos=ftell(FpI); @@ -298,8 +302,8 @@ Funktion: Scanner des Quellcodes (endlicher Automat) */ { static unsigned status=1; - char nextc, temp, - elementText[ELEMENT_TYP_MAX], + int nextc, temp; + char elementText[ELEMENT_TYP_MAX], attributNameText[ATTRIBUT_NAME_MAX], attributWertText[ATTRIBUT_WERT_MAX]; int textFlag=0, entityFlag=0, symbolFlag=0, gleichFlag=0; Only in src-1.0-sgi4irix6: scanner.o diff -ru src-1.0/sizes.c src-1.0-sgi4irix6/sizes.c --- src-1.0/sizes.c Thu Apr 25 13:03:46 1996 +++ src-1.0-sgi4irix6/sizes.c Thu Apr 3 20:52:17 1997 @@ -6,7 +6,9 @@ */ #include #include +#ifndef unix #include +#endif #include"sizes.h" #include"error.h" #include"utils.h" @@ -246,7 +248,7 @@ } int newLine(char *line) -{ char c; +{ int c; int i=0; while((c=getc(fp))!='\n'&&c!=EOF&&i #include +#ifndef unix #include +#else +#include +#endif #include"utils.h" #include"error.h" @@ -54,12 +58,15 @@ return 0; } +#ifndef unix double diffTime(struct time z1, struct time z2) -{ return fabs(3600*(z2.ti_hour-z1.ti_hour)+ +{ + return fabs(3600*(z2.ti_hour-z1.ti_hour)+ 60*(z2.ti_min-z1.ti_min)+ (z2.ti_sec-z1.ti_sec)+ (double)(z2.ti_hund-z1.ti_hund)/100); } +#endif void appendString(char *string, char zeichen, unsigned max) /* @@ -78,4 +85,18 @@ }else{ fatalError("String buffer overflow!"); } +} + +void strlwr(char *str) +{ + if (NULL == str) + return; + while (*str != '\0') { + *str=tolower(*str); + str++; + } +} +int stricmp(char *s1, char *s2) +{ + return strcasecmp(s1,s2); } diff -ru src-1.0/utils.h src-1.0-sgi4irix6/utils.h --- src-1.0/utils.h Tue Apr 16 12:31:28 1996 +++ src-1.0-sgi4irix6/utils.h Thu Apr 3 20:45:27 1997 @@ -11,7 +11,14 @@ void my_itoa(int, char *); int whichValue(char *, char *, struct attribut *); +#ifndef unix double diffTime(struct time, struct time); +#endif void appendString(char *, char, unsigned); + +#ifdef unix +int stricmp(char *, char *); +void strlwr(char *); +#endif #endif Only in src-1.0-sgi4irix6: utils.o