[BACK]Return to gentexi.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-contrib / packages / doc

Diff for /OpenXM/src/asir-contrib/packages/doc/Attic/gentexi.c between version 1.3 and 1.4

version 1.3, 2002/02/09 08:50:48 version 1.4, 2002/08/08 08:56:32
Line 1 
Line 1 
  /*  $OpenXM: OpenXM/src/asir-contrib/packages/doc/gentexi.c,v 1.2 2002/01/27 08:18:52 takayama Exp $  */   /*  $OpenXM: OpenXM/src/asir-contrib/packages/doc/gentexi.c,v 1.3 2002/02/09 08:50:48 takayama Exp $  */
   
 #include <stdio.h>  #include <stdio.h>
 int Debug = 0;  int Debug = 0;
Line 15  struct item {
Line 15  struct item {
   char *optv[VMAX];    char *optv[VMAX];
   char *shortDescription;    char *shortDescription;
   char *description;    char *description;
     char *algorithm;
   char *examplev[VMAX];    char *examplev[VMAX];
   char *exampleDescv[VMAX];    char *exampleDescv[VMAX];
   int examplec;    int examplec;
Line 137  struct item * newItem(){
Line 138  struct item * newItem(){
   }    }
   a->argc = 0; a->optc = 0; a->refc=0; a->examplec = 0;    a->argc = 0; a->optc = 0; a->refc=0; a->examplec = 0;
   a->category = a->category2 = a->name = a->shortDescription    a->category = a->category2 = a->name = a->shortDescription
     = a->description = a->author = NULL;      = a->description = a->author = a->algorithm = NULL;
   return a;    return a;
 }  }
   
Line 195  printItem(struct item *it) {
Line 196  printItem(struct item *it) {
     printf("shortDescription=%s\n",it->shortDescription);      printf("shortDescription=%s\n",it->shortDescription);
   if (it->description != NULL)    if (it->description != NULL)
     printf("description=%s\n",it->description);      printf("description=%s\n",it->description);
     if (it->algorithm != NULL)
       printf("algorithm=%s\n",it->algorithm);
   for (i=0; i <it->examplec; i++)    for (i=0; i <it->examplec; i++)
     printf("examplev[%d]=%s\n",i,it->examplev[i]);      printf("examplev[%d]=%s\n",i,it->examplev[i]);
   for (i=0; i <it->examplec; i++)    for (i=0; i <it->examplec; i++)
Line 329  struct item *getItem() {
Line 332  struct item *getItem() {
     /* Get Description or Examples */      /* Get Description or Examples */
     if (strcmp(key,"end:") == 0) break;      if (strcmp(key,"end:") == 0) break;
     if (strcmp(key,"description:") == 0 ||      if (strcmp(key,"description:") == 0 ||
           strcmp(key,"algorithm:") == 0 ||
         strcmp(key,"author:") == 0 ||          strcmp(key,"author:") == 0 ||
         strcmp(key,"example:") == 0 ||          strcmp(key,"example:") == 0 ||
                 strcmp(key,"example_description:") ==0 ) {                  strcmp(key,"example_description:") ==0 ) {
Line 358  struct item *getItem() {
Line 362  struct item *getItem() {
       if (strcmp(key2,"author:") == 0) {        if (strcmp(key2,"author:") == 0) {
         it->author = str2(&(S[pp]),pOld-pp);          it->author = str2(&(S[pp]),pOld-pp);
       }        }
         if (strcmp(key2,"algorithm:") == 0) {
           it->algorithm = str2(&(S[pp]),pOld-pp);
         }
     }else if (strcmp(key,"ref:") == 0) {      }else if (strcmp(key,"ref:") == 0) {
       argc = 0;        argc = 0;
       while ((pp=nextToken(key,LIMIT)) >= 0) {        while ((pp=nextToken(key,LIMIT)) >= 0) {
Line 464  printTexi(FILE *fp, struct item *it) {
Line 471  printTexi(FILE *fp, struct item *it) {
   
   if (it->description != NULL) {    if (it->description != NULL) {
     fprintf(fp,"%s\n\n",it->description);      fprintf(fp,"%s\n\n",it->description);
     }
   
     if (it->algorithm != NULL) {
       fprintf(fp,"\n\n@noindent\nAlgorithm: \n");
       fprintf(fp,"%s\n\n",it->algorithm);
   }    }
   
   if (it->examplec > 0) {    if (it->examplec > 0) {

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

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