[BACK]Return to oxlistlocalf.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / util

Diff for /OpenXM/src/util/oxlistlocalf.c between version 1.2 and 1.3

version 1.2, 2015/10/13 06:18:26 version 1.3, 2020/10/03 08:24:14
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/util/oxlistlocalf.c,v 1.1 2014/03/25 07:08:25 takayama Exp $ */  /* $OpenXM: OpenXM/src/util/oxlistlocalf.c,v 1.2 2015/10/13 06:18:26 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include <ctype.h>  #include <ctype.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 7 
Line 7 
 #include <string.h>  #include <string.h>
 #include "oxlistlocalf.h"  #include "oxlistlocalf.h"
   
   int readcomment();
   int readcomment2();
   char *readstring();
   int readchar();
   void putchar0(int c);
   void printf0(char *s);
   void printf1(char *s);
   int isReserved(char *s);
   int shouldReplace(char *s);
   int fsgetc(FILE *fp);
   
   
   
   
   
 objectp KClval;  objectp KClval;
 int Replace = 0;  int Replace = 0;
 int Linenumber = 0;  int Linenumber = 0;
Line 354  int KClex() {
Line 369  int KClex() {
 }  }
   
   
 readcomment() {  int readcomment() {
   int c;    int c;
   while (1) {    while (1) {
     c = fsgetc(Inop);      c = fsgetc(Inop);
Line 369  readcomment() {
Line 384  readcomment() {
   }    }
 }  }
   
 readcomment2() {  int readcomment2() {
   int c;    int c;
   while (1) {    while (1) {
     c = fsgetc(Inop);      c = fsgetc(Inop);
Line 429  char *readstring() {
Line 444  char *readstring() {
 }  }
   
   
 readchar() {  int readchar() {
   int c;    int c;
   if (Replace) putchar0('\'');    if (Replace) putchar0('\'');
   c = fsgetc(Inop); /* 'c.'   '\.c' */    c = fsgetc(Inop); /* 'c.'   '\.c' */
Line 456  readchar() {
Line 471  readchar() {
   return(c);    return(c);
 }  }
   
 putchar0(c)  void putchar0(int c)
   int c;  
 {  {
   if (c > 0) putchar(c);    if (c > 0) putchar(c);
 }  }
   
 printf0(s)  void printf0(char *s)
   char *s;  
 {  {
   int i = 0;    int i = 0;
   while (s[i] != '\0') putchar0(s[i++]);    while (s[i] != '\0') putchar0(s[i++]);
 }  }
   
 printf1(s)  void printf1(char *s)
   char *s;  
 {  {
   int i = 0;    int i = 0;
   /* putchar0('K'); */   /* do your own replacement */    /* putchar0('K'); */   /* do your own replacement */
   while (s[i] != '\0') putchar0(s[i++]);    while (s[i] != '\0') putchar0(s[i++]);
 }  }
   
 isReserved(s)  int isReserved(char *s)
   char *s;  
 {  {
   char *r[] = {"auto","break","case","char","const","continue",    char *r[] = {"auto","break","case","char","const","continue",
                "default","do","double","else","enum","extern",                 "default","do","double","else","enum","extern",
Line 514  isReserved(s)
Line 525  isReserved(s)
   
 }  }
   
 shouldReplace(s)  int shouldReplace(char *s)
   char *s;  
 {  {
   char *r[] = {"dummy"};    char *r[] = {"dummy"};
   int n = 1;    int n = 1;

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

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