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

Diff for /OpenXM/src/util/oxgreph.c between version 1.3 and 1.5

version 1.3, 2006/03/05 04:01:17 version 1.5, 2020/10/03 08:24:14
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/util/oxgreph.c,v 1.2 2006/03/04 10:43:38 takayama Exp $ */  /* $OpenXM: OpenXM/src/util/oxgreph.c,v 1.4 2009/02/22 17:30:03 ohara Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 16 
Line 16 
    Example:     Example:
    export LC_ALL="C"     export LC_ALL="C"
    s.txt contains "insubunkai"     s.txt contains "insubunkai"
    oxgreph  "`nkf -w s.txt`" $OpenXM_HOME/doc/cfep/html-ja_JP.utf8/html-jp/*.html >t.html     oxgreph  "`nkf -w s.txt`" $OpenXM_HOME/doc/cfep/html-ja_JP.utf8/html-ja/*.html >t.html
    oxgreph --sjis "`nkf -s s.txt`" $OpenXM_HOME/doc/cfep/html-ja_JP.sjis/html-jp/*.html >t.html     oxgreph --sjis "`nkf -s s.txt`" $OpenXM_HOME/doc/cfep/html-ja_JP.sjis/html-ja/*.html >t.html
 */  */
   
 int Sjis = 0;  int Sjis = 0;
 int LeaveTag = 0;  int LeaveTag = 0;
 main(int argc, char *argv[]) {  int main(int argc, char *argv[]) {
   int i,m,pid,n, cpos,start;    int i,m,pid,n, cpos,start;
   char *com;    char *com;
   char workf[256];    char workf[256];
Line 30  main(int argc, char *argv[]) {
Line 30  main(int argc, char *argv[]) {
   char s[SSIZE];    char s[SSIZE];
   char ss[SSIZE*2];    char ss[SSIZE*2];
   FILE *fp;    FILE *fp;
     int r;
   m = 256;    m = 256;
   pid = getpid();    pid = getpid();
   if (argc < 2) {    if (argc < 2) {
Line 56  main(int argc, char *argv[]) {
Line 57  main(int argc, char *argv[]) {
   }    }
   sprintf(workf,"/tmp/tmp-oxgreph-%d.txt",pid);    sprintf(workf,"/tmp/tmp-oxgreph-%d.txt",pid);
   sprintf(&(com[strlen(com)]),">%s",workf);    sprintf(&(com[strlen(com)]),">%s",workf);
   system(com);    r=system(com);
   
   printf("<ol>\n");    printf("<ol>\n");
   fp = fopen(workf,"r");    fp = fopen(workf,"r");
Line 93  main(int argc, char *argv[]) {
Line 94  main(int argc, char *argv[]) {
   }    }
   printf("</ol>\n");    printf("</ol>\n");
   sprintf(com,"rm -f %s",workf);    sprintf(com,"rm -f %s",workf);
   system(com);    r=system(com);
     return 0;
 }  }

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

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