throbber
(cid:23)(cid:27)(cid:19)
`
`ELASTIC - EXHIBIT 1002 - Part 3 of 3
`
`

`

`iflEg‘EESg‘ melanoma
`
`PATENT
`Docket No.: 4428-4001
`
`prompts = columnTerms = rowTerms = NULL;
`scoring = thesaurus = indexList = menuList = NULL;
`
`r'* read data in the arrays ‘1'
`numMenu = loadMenuTree-(fp, "[MENUTREE]");
`numIndex = readArray(fp, "[PROMPTS]", &prompts, 1, NULL, 0, 0);
`numColumn = readArray(fp, "[INDEX]", &columnTerms, l, &indexList, numlndex, 0);
`numOrgRow = readArray(fp, "[THESAURUS]", &rowTerms, 1, &thesaurus, numColumn, 0);
`numRow = readArray(f2, "[EXT-THESAURUS]", &rowTerms, l, &thesaurus, numColumn,
`numOrgRow);
`numScore = readArray(f2, "[SCORINGT', NULL, 0, &scon'ng, numColumn + l, 0);
`
`fclo se( fp);
`fclose(f2);
`
`} f
`
`¥****¥*********************#*******¥***¥¥************¥********¥****¥¥***$$
`
`readAnay : Reads the file and fills the rows and columns of the given arrays
`*********tt*****$*****#***$***#************#******$*******#**¥*¥***#$*****;
`
`int readAnay(FILE *fin, char *head, char ***ch_array, int ccount, int ***int_array, int icount, int
`SP)
`
`{ c
`
`har buf[256];
`int i,j, start = 0, we = 0;
`int k, 0;
`char ”Imparray; F‘To store the pointers to the wordsfnumbers from the string"?r
`c = sp;
`
`if(icount != 0)
`tmparray = (char **)malloc((icounl + 1) * sizeofIchar *));
`
`fseek(fp, 0, 0); 1’“ Go to Top *I
`
`while (fgets(buf, 255, fp) != NULL) I“ read lines till end offile *f
`
`{ a
`
`llTrim(bui);
`j = Strlen(bufl;
`if(buf[j - l] = '\n') bqui — 1] = 0;
`if (start)
`
`{ i
`
`f (strlen(buf) = 0) a” if blank line, stop reading *I
`break;
`if(icount = 0) 1"“ i.e. no integer array *l
`
`728851 v1
`
`78
`
`(cid:23)(cid:27)(cid:20)
`481
`
`

`

`imaggsfiq uiiigfla
`
`PATENT
`Docket Nth: 4428—4001
`
`else
`
`addWord(ch_array, buf, -H-c);
`3“ read first word string *1'
`{ I“ rest are columns of int array *!
`we = readValues(buf, trnparray);
`c-H-;
`
`(*int_anay) = (int **)realloe(*intflarray, e * sizeoflint *));
`(*int_array)[c ~ 1] = (int *)malloc(i00unt * sizeof(int));
`if (ccount != 0)
`addWord(ch_array, tmparray[0], c);
`
`else
`
`(*int_array)[c - 1][0] = atoi(tmparray[0]);
`for (k = l; k < icount; k++)
`if (k C we)
`(*int_array)[c - l][k - ccount] = atoi(tmparray[k]);
`
`else
`
`(*int_array)[c - l][k - ecount] = 0;
`
`}
`
`}
`
`else
`
`if (lstrcmp(head, bufl)
`start = 1;
`
`}
`return c;
`
`} f
`
`¥$$¥¥¥¥*¥*******¥*********$**************¥**¥***¥¥**¥*¥******¥*¥***
`
`loadMenuTree : loads the menutree from file to menuList array
`*¥$*¥**¥*¥*****************$$****¥***********$*¥$*¥**¥**¥*****¥****I
`
`int loadMenuTree (FILE ‘11), char *head)
`
`{ c
`
`har buf[256};
`int i, j, start = 0, count = 0;
`fseek(fp, 0, 0);
`while (fgets(buf, 255, fp != NULL)
`{
`j = strlen(buf);
`if(buf[i - 1] = '\n‘)
`buffi - I] = 0;
`
`if (start)
`
`{ i
`
`f (strlen(buf) = 0)
`break;
`menuList = (int **)realloc(menuList, (count + 1) * sizeof(int *));
`
`72885] VI
`
`79
`
`(cid:23)(cid:27)(cid:21)
`482
`
`

`

`iflEQ'g'EE‘T-El a iiigflm—i
`
`PATENT
`Docket No.: 4428-4001
`
`menuList[count] = (int *)malloc(3 * sizeof(int));
`sscanf(buf, "%d,%d,%d ", &menuList[count][0],
`&menuList[count][1],&menuList[c0unt][2]);
`count++;
`
`} i
`
`f (Estrempfluead, buf))
`start = 1;
`
`else
`
`}
`return count ;
`
`}
`
`readini(char * filenm)
`{
`
`FILE * fp;
`char bquSO], key[80], value[80], cornment[80];
`int cm;
`if ((fp=fopen(filenm,"r"))=NULL)
`{
`
`perror(filenm);
`exit(1);
`
`} w
`
`hile (fgets(buf,79,fp)!=NULL)
`
`{ s
`
`scanfibuf,"%s %s %s",key,value, comment);
`if (Islrcmp(key, "sdoc"))
`sdoc=strdup(valuc);
`if (lstrcmp(key, "fdoc“))
`fd0c=strdup(value);
`if (lstrcmp(key, "xdoc"))
`xdoc=strdup(value);
`if (lstrcmp(key, "cfg"))
`cffstrdupWalue);
`if (1strcmp(key, "Icfg"))
`lcfg=strdl1p(value);
`if (1strcmp(key, "rninprompt“))
`minPromptCount=atoi(value);
`if (Istrcmp(key, "timeout"))
`timeout=atoi(valuc);
`
`}
`
`72885] v]
`
`80
`
`(cid:23)(cid:27)(cid:22)
`483
`
`

`

`lBEgQEEq ”11:1an
`
`PATENT
`Docket No.: 4428-4001
`
`interactivec: This program contains funtions related to user interaction
`flit:*4:*$4:itat*ata:=l:a:*1:allaltar*Il:tt***t***til!tit********$¥****$t**$t#*$¥*$****$****
`
`Interactive : function to accept a sentence from the user and then
`generate the response.
`
`thesaurusF lag = is 1 if there is atleast 1 thesaurus!learned word in query
`updateFlag = is set to l ifthe program needs to learn (i.e. main menu was
`selected during the prompt navigatiOn)
`interPrompts = Intersection of prompts
`unionPrompts = Union of prompts
`interUnionPrompts = Intersection of Union
`numInter = number of prompts in InterPrornpts
`numInterUnion = norm of prompts in Intersection of UniOn
`numUnion = num of prompts in Union
`numUnknown = num of unknown words
`*********$$*****tt*$********¥*¥***¥***********IF*$*******#****t********r‘
`
`#include <stdio.h>
`
`#include <signal.h>
`#include <string.h>
`#include €unistd.h>
`
`#include "globalvarh"
`#include "arraylibh"
`#include "formsh"
`
`#define max(a,b) (a > b)? a: b
`#define min(a,b) (a é b)? a: b
`#define swap(a,b) (a "= b, b "= a, a "= b)
`
`extern int numScore, "scoring;
`int updateFlag = 0, leamF lag, nquueryList = 0;
`FILE *lf, *pf;
`char ** uWList=NULL, *queryTerms[50];
`int uWNurn;
`extern int minPromptCount, timeout;
`char query[2 56], **queryList = NULL;
`char *affrmWordsfl = { ”yes", "right", "correct"};
`char *negWordsfl = { "no", "neither"};
`extern char * fdoe;
`int otheFlag = 0;
`int unknownWords[20], nquuery = 0, numUnknown;
`char **uWords; I! Added this array to facilitate learning wven if lateral shift
`int numUW;
`2’! Added this to facilitate learning wven if lateral shift
`void sayOtherO;
`
`728851 VI
`
`81
`
`(cid:23)(cid:27)(cid:23)
`484
`
`

`

`lflflggfifig “lilgfla
`
`PATENT
`Docket No.: 4428-4001
`
`void Interactive(char *flnm)
`{
`
`int InterPrompts[20], unionPrompts[20], t1Prornpts[20];
`int interUnionPrompts[20], numlnterUm'on, t2PrompIs[20], numTZ;
`int i, j, k, 1;
`int start, numUnion, numlnter, numTl;
`int n, selectedPrompt, thesaurusFlag = 0;
`char *interlog, *processlog, o;
`
`numUnknown = numUW = 0;
`for(i=0; i < 20; i++)
`unknownWords[i] = 0;
`uWords=NULL;
`
`if ((interlog = (char *)getenv("TII\/IEOUT")) != NULL)
`timeout = atoi(interlog);
`
`if ((interiog = (char *)getenv("MINPROMPT")) != NULL)
`minPromptCount = atoi(inleriog);
`
`if ((inteflog = (char *)getenv("[NTERLOG")) = NULL)
`interlog = "testhtml";
`
`if ((processlog = (char *)getenv("PROCESSLOG“)) = NULL)
`processlo g — processhtml";
`
`signal(SIGALRM, &say0ther);
`lf= fileOpen(interlog,"w" ;
`
`pf = fileOpen(processlog,"w" ;
`fprintfflf, "<HTML>\n<TITLE>%s<fl‘ITLE>\n€BODY>-<FONT SIZE=Sb\n", interlog);
`fpn‘ntf(pf, "<HTML>\n<l"ITLE>%S<!TITLE>\n<BODYXFONT SIZE=5>\n", processlog);
`
`system("c1ear");
`printh'Thank you for calling the New Hera]d.\n");
`printf("How may we help you?\n\n");
`fprintfflf,"\nThank you for calling the New Herald.€BR>");
`fprintfflf,"How may we help you. <P3'");
`fgets{query, 25 5, stdin);
`f“ accept the user input *!
`
`while (1)
`{
`
`72335: v]
`
`82
`
`(cid:23)(cid:27)(cid:24)
`485
`
`

`

`JUEQQESQ miilqfllfl
`
`PATENT
`Docket No.: 4428-4001
`
`addWord(&queryList, query, HnquueryList);
`nquuery = thesaurusFlag = 0;
`if (strlen(query) == 0)
`break;
`fprintf(lf, "CI? %s<fl> <Pb", query);
`
`nquuery = createArray(query, queryTenns);
`
`{13*IktIFIFtit*‘k**t1:*X******ik1:¥*#******ti***********************l
`
`fprintf(pf, “Terms in Query: ");
`for (j = 0;j < nquuery; j++)
`fpn'ntf(pf, " %s“, queryTennsfiD;
`fprintf(pf, “<BR>");
`{*ttlk’lfllflk**$*****$**#*$*$$*$$****ilflkitIt$*$**$$*$**$$*$**$****$Jf
`
`i'* initialize InterPrompts and unionPrompts array *1“
`for (i = 0; i < 20; i-|-|-)
`
`{ t
`
`2Prompts[i] = thrompts[i] = 0;
`InterPrompts[i] = unionPrompts[i] = interUnion?rompt5[i] = 0;
`}
`start = l;
`numInterUnion = numT2 = numTl = numInter = numUnion = 0;
`
`3* Scan thru all the words to generate unioniintersection of prompts *i
`for (i = 0; i < nquuery; iH)
`
`{I
`
`“ if not in index words check thesaurus *a’
`
`if (linArray(columnTerms, queryTenn5[i}, numColumn))
`
`{ l
`
`eamJ-"lag = numTl = numT2 = O;
`scanThesaurus(queryTerms{i], tl Prompts, t2Prompts, &numT l ,
`
`f“ if unknownflearned word save it to array *f
`if (learnF lag)
`
`{ u
`
`nknownWords[numUnknown] = i, numUnknoer-I-F;
`addWord(&uWords, queryTerms[i], HnumUW);
`if (numTl = 0 && numTZ = 0)
`continue;
`
`else
`
`}
`
`thesaurusFlag = 1;
`
`33
`
`(cid:23)(cid:27)(cid:25)
`486
`
`&numT2);
`
`72885l v:
`
`

`

`1933929935? ”11191332
`
`PATENT
`Docket No.: 4428-4001
`
`else
`
`}
`
`else
`
`thesaurusFlag = 1;
`
`{ n
`
`umTl = fetchPrompts(queryTeHn5[i], thrompts);
`numTZ = fetchPrompts£queryTerms[i], t2Prompts);
`}*$*********#*******t****************t*******$**i
`
`fprintflpf, "%5 (index) :", queryTerms[i]);
`for (j = 0;j < numT1;j++)
`fprirltfipf, " %d“, thromptsUD;
`fprintf(pf, "<BR>");
`filushfifi);
`f¢**********¥**$*********$*****$*$$********t*$*$l
`
`}
`
`if(start) 1* if first word *f
`
`{ n
`
`um Inter = Promthnion(k1terPrompts, tZPrompts, numlnter, numTZ);
`numUnjon = Promthnion(unionPrompts, thrompts, numUnion,
`
`numTl);
`
`numlnterUnion = Promthnion(interUnionPrompts, thrompts,
`numInterUnion, numTl );
`start = 0;
`
`}
`
`{ n
`
`else
`
`umlnter = Promptlntersection([nterPrompts, t2Prompts, numlnter,
`
`numT2);
`
`numTl);
`
`numUnion = Promthnion(unionPrompts, t1 Prompts, numUnjon,
`
`numlnterUnion = PromptlntersectionfinterUnionPrompts, tl Prompts,
`numlnterUnion, numTl);
`
`}
`
`}l
`
`¢*************¥****$¥¥**¥*¥**¥*¥*************¥*******$I
`
`fprinlfipf, "Final Intersection Result: ");
`for (j = 0;j < numInter;j++)
`fprintfipf," %d", h1terPromptsLiD;
`fprintf(pf, "<BR>");
`fprintflpf, "Final Intersection of Union Result: “);
`for (j = 0;j < numInterUnion; j++)
`
`?28851 vl
`
`84
`
`(cid:23)(cid:27)(cid:26)
`487
`
`

`

`inflowsao g. iligUE
`
`PATENT
`Docket No.: 4428-4001
`
`fpfintflpi‘, " %d", interUnionPromptsLiD;
`fprintf(pf, "<BR>");
`fprintf(pf, "Final Union Result: ");
`for (i = 0;j < numUnion; j-H-)
`fprintf(pf, " %d", unionPromptsLiD;
`fprintf(pf, "<BR>");
`fflush(pf);
`l*¥************i:I“:*IIHIHHIHIHt**$*****$****$***$¥¥*********¥f
`
`if (numInter < minPromptCount && thesaurusFlag)
`
`{ i
`
`f (numInterUnion < minPromptCount)
`numlnter = PromthnionflnterPrompts, unionPrompts, numlnter,
`
`numUnion);
`
`else
`
`numlnter, numlnterUnion);
`}
`
`numInter = PromthnionflnterPrompts, interUnionPrompts,
`
`fprintf(pf, “Final Selection : ");
`fflush(pf);
`for (j = 0;j < numlnter; j++)
`fprintfipf, " %d“, InterPromptsLiD;
`fprintffiaf, "<BR>");
`fflush[pf);
`numlnter = orderPrompts(InterPrompts, numInier);
`numlnter = removeChildflnterPrompts, numImer);
`If eliminate prompts 2' 3
`for (j = 3;j é numInter; j-H-)
`InterPromptsLi] = 0;
`numlnter = min(numlnter, 3);
`fprinthpf, "Selection After Elimination of descendants: ");
`fflush(pf);
`for (j = 0; j < numInter; j-H-)
`fprintf(pf, " %d", InterPromptsUD;
`fprintf(pf, ”<BR3'");
`fflush(pl);
`selectedPrompt = GetPrompt(InterPrompts, numlnter);
`if (selectedPrompt = 100)
`continue;
`
`If if (updateFlag)
`learn'I'hesaurus(selectedPrompt, unknownWords, numUnknown, flnm);
`
`723351 v:
`
`85
`
`(cid:23)(cid:27)(cid:27)
`488
`
`

`

`lflflggfifig “111914533
`
`PATENT
`Docket No.: 4428—4001
`
`updateFlag = 0;
`forU = 0; (j < numMenu) && (menuListU][1] != selectedPrompt); j-H-);
`if (menuListfiHZj 5= 99)
`
`{ f
`
`or (i = 0; i < numPF; i++)
`
`{ i
`
`f (Estrcmp(Fprompts[i][l],prompts[selecledPrompl - 1]))
`
`{ f
`
`or(k = 0; k < numFon'ns; kH)
`if(lstrcmp(Fprompts[i][0],formlist[k]->name))
`
`{ f
`
`illFonn(fonnlist[k], queryList, nquueryList);
`processFonn(fonnlist[k]);
`break;
`
`}
`
`break;
`
`}
`
`}
`if (i = numPF)
`
`{ s
`
`ystem("clear");
`p1-intf("‘mYour query has been understood.\11");
`printlI"Please wait to be transferred to the relevant department.\n\n");
`fprintf(lf,"<P>Your query has been understoodfiLIb");
`fprintitlfleease wait to be transferred to the relevant departm ent.4<HR>");
`break;
`
`}
`
`}
`
`else
`
`{ p
`
`rinth"\n%s\n\n",prompt5[menuListfj][2] - 1]);
`fprintfa f, "\n<P>%s<HR>",prompts[menuList[i][2] - 1]);
`
`} 1
`
`'! modified for the loop
`printf("Do you have another query?\n\n");
`fgets(query,80,stdin);
`if (IchkNegtn(query))
`
`{ f
`
`or(i = 0; i < nquueryList; i++)
`free(queryList[i]);
`for(i = 0; i < numForms; iH)
`fi-ee(formlist[i]);
`free(formlisl);
`
`72885] vl
`
`86
`
`(cid:23)(cid:27)(cid:28)
`489
`
`

`

`iEflET-EQESQ Hillgfla
`
`PATENT
`Docks! No.: 4428-4001
`
`free(queryList);
`queryList = NULL;
`numForms = loadForms(fdoc);
`nquueryList = 0;
`l!printf‘(“Please tell us your query.\n “);
`Hfgets(query,255,stdin);
`continue;
`}
`system("olear");
`printft"\nThank you for calIing.\nGoodbye.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
`break;
`
`} f
`
`printf(lf, "<fI-ITM[>\n<!BODY>\n");
`fprintf(pf, "<!HTML>m<xBODY>\n");
`fclose(lfl;
`fclose(pf);
`
`} i
`
`nt scanThesaurus(char *word, int *thrompls, int *IZPrompts, int* n1, int * n2)
`
`{ i
`
`nti,j, k=0, 1;
`int m, tp[20], sflg = l;
`
`for (i = 0; i < 20; i++)
`11Prompts[i] = l2Prompts[i] = mm = 0;
`
`for (l = 0; l < numRow; l++)
`if (Estrcmp(w0rd, r0chrms[l]))
`break;
`
`f“ if the word is not present in thesaurus *l
`if (1 = numRow)
`
`{ f
`
`printf(pf, "%5 (unknown) <BR>", word);
`leamFlag = 1;
`.
`return 0;
`}
`
`{ i
`
`f (I >= numOrgRow)
`
`else
`
`{ f
`
`printf(pf, "%s (leamod):<BR>", word);
`
`723851 v]
`
`8?
`
`(cid:23)(cid:28)(cid:19)
`490
`
`

`

`_
`
`-
`
`mmaeegfiqmiiigna
`
`PATENT
`Docket No.: 4428-4001
`
`leamFlag = l;
`
`} f
`
`else
`
`printf(pf, ”%s (thesaurus):<BR>", word);
`
`for (j = 0; thesaurus[l]U] &&j < numRow; jH)
`
`{ m
`
`= fetehPrompts(columnTenns[thesaurus[l]U] - 1], tp);
`{*#********#*#***$*******¥*******¥******¥*¥*****¥*¥¥******!
`
`fpn'ntf(pf, "<LI)%s (index) :", eolumnTenns[thesaurus[l][j] - 1]);
`for (k = 0; k < m; kH)
`fpl'intflpfl " %d", tPUG);
`fprintttpf, "<BR>");
`f********##3##***¥**¥***************#***#*#********#$##*$*;
`
`*nl = Promthnion(thrompts, 1213, *nl, m);
`if (sfig)
`
`{ *
`
`n2 = Promthnion(t2Prompts, tp, *n2, m);
`sflg = 0;
`
`} { *
`
`}
`
`else
`
`n2 = Prompth1terseetion(t2Prompts, tp, *n2, m);
`
`}
`fprintflpf, "Union Result: ");
`for (k = O; k < *nl; k4+)
`fprintffiaf, " %d", thrompts[k]);
`fprimfuaf, "<BR>");
`fprintflpf, "Intersection Result: ");
`for (k = 0; k < *n2; k++)
`fprintf(pf, " %d", t2Prompts[k]);
`fpn'ntf(pf, "<BR‘9");
`}
`
`return k;
`
`}J
`
`***************¥*¥**¥************#****#*##*#******#*#********
`
`Promthnion : does a union of arrays pointed by pl and p2 and
`stores in pl. returns the total elements in result
`*i********¥**$$*$*****$*¥¥**$***t***$**$$*$*$$*****#*$*8***$$;
`
`728351 v]
`
`88
`
`(cid:23)(cid:28)(cid:20)
`491
`
`

`

`LILHEQIQES’Q .1119DE
`
`PATENT
`Docket No.: 4428—4001
`
`int Promthnion(int *pl, int *p2, int 111, int 112)
`
`{ i
`
`nt i, j;
`for (i = 0; i < 112; i-H)
`
`{ f
`
`or (i = 0;j < nl;j++)
`”(1310] = MN)
`break;
`
`if(j = n1)
`
`{ P
`
`lfi] =p2li};
`n1++;
`
`}
`
`}
`return n1;
`
`} {
`
`***#**$*****#*****#**¥**********$**********t****¥***********$*¥***********
`
`Promptlntersection : does a intersection of arrays pointed by pi and p2 and
`stores in p1. returns the total elements in result
`*$***************#******$*$$*$$*$***$****$**$$*$**$*$$**$$$$$$$$$$$$$$$$$$f
`
`int Prompthitersectionfint *pl, int *p2, int 111, int 112)
`
`{ i
`
`nt i,j;
`for(iIO;i<n1; iH)
`
`{ f
`
`or (i = 0;j < n2;j++)
`if(pl[i1= pzm)
`break;
`
`iffi = :12) I“ not there *t’
`
`{ f
`
`0r0=i;j <n1;j++)
`plijJ=P1U +1];
`
`nl-—;
`i--;
`}
`
`}
`return n1;
`
`}l
`
`***¥**#****¥******$#$#***********#*##***$*#*******#**#**t*$#****
`
`fetchPrompts : Will fetch all the prompts for ‘word' into
`Arraylist pointed by t1 Prompts;
`**********¥¥*¥*******¥*********$****************$**¥**¥$******¥*f
`
`72885] v:
`
`89
`
`(cid:23)(cid:28)(cid:21)
`492
`
`

`

`lflEQQESQ m iiigflfi
`
`PATENT
`Docket No.: 4428-4001
`
`int fetchPrornpts(char *word, int *thrornpts)
`
`{ i
`
`nt i, j, k, l;
`for (i = 0; i < 20; i-H)
`thrompts[i] = 0;
`if ((i = inArray(coluanemls, word, numColumn)) = 0)
`return 0;
`
`l";
`
`for (j = 0; (thromptsm = indexList[i]Li]) && (j < numIndex); j++);
`return j;
`
`} [
`
`*t***#***********¥***$**$*$********$***$************************
`
`GetPrompt: Returns the final prompt selected by user
`******************¥**********************************#***t*****$;
`
`int GetPrompt(int *Parray, int pent)
`
`{ i
`
`nt i, j, k, 1;
`int mmflag = 0, af= 0;
`char ans[80];
`
`while (1)
`
`{ s
`
`ystem("clear");
`printf("\n");
`fprintfflf, "<P>");
`If Removed the comments to reintroduce last prompt
`if (pent = 1 && isLeafIParray[0]) && numUnknown > 0)
`af = ;
`if ----------------------------------------
`
`if((pcnt>1)|l(pcnt= 1 && af= 1))
`{
`
`if sortPrompts(Parray, pent);
`orderPrornpts(Parray, pent);
`for (i = 0; i < pent; i++)
`
`{ p
`
`rintf(“%s\n\n", promptsfParrayfi] - 1]);
`fpn'ntfflf, "<LI>%s", promptsfParrayfi] — 1]);
`}
`if (Immflag)
`
`{ o
`
`theFlag = 0;
`alarm(timeout);
`
`72885| VI
`
`90
`
`(cid:23)(cid:28)(cid:22)
`493
`
`

`

`,
`
`iflEggTfiEg “11.1983
`
`PATENT
`
`MW
`
`}
`fgets(ans, 80, stdin); F accept the user input *I’
`alarm(0);
`fpn'ntfflf, "<P><I>%s<fl><P>", ans);
`fflushflt);
`if (otheFlag = 1 && ehkAfim(ans))
`j = 0;
`
`else
`
`{
`
`if (chkNegtn(ans) && otheFlag != l)
`j = 0;
`
`else
`
`{
`
`} o
`
`addWord(&queryList, ans, ++nquueryLi5t);
`j = ehkAns(ans, Parray, pent);
`
`theFtag = 0;
`
`} i
`
`f ( j = ~99)
`{
`
`updateFlag = 1;
`return 100;
`
`} i
`
`f (j c 0)
`{
`
`pent = removeZeros(Panay,pcnt);
`continue;
`
`} m
`
`}
`
`mflag = O;
`
`else
`
`j = pent;
`if (j = 0)
`
`{ p
`
`ent = getNodesG, Farray);
`mmflag = updateFlag = 1;
`}
`
`{ i
`
`f (isLeaf(Parray[j - 11))
`{
`
`else
`
`return Farrayfi - 1];
`
`}
`
`72885! v!
`
`91
`
`(cid:23)(cid:28)(cid:23)
`494
`
`

`

`iflfiqgfifig .3 112195312
`
`PATENT
`Docket No.: 4428-4001
`
`else
`
`}
`
`af = ;
`
`}
`
`pcnt I getNodes(Pan-ayfi - 1], Pal-ray);
`
`} f
`
`#**********¥**¥*¥*****¥*tt¥¥$t¥***$**tit******$*tttt***¥**&t*#*******
`
`isLeaf: Returns 1 if ‘node‘ is a leaf in the menutree, else 0
`*$*****************t*******$*******¥*********¥*****************$*$***;
`
`int isLeaf(int node)
`.{
`-
`Int 1;
`
`for (i = 0; i < numMenu; i++)
`if (menuList[i][1] E node)
`break;
`if(i = numMenu)
`return 0;
`
`return menuList[i][2];
`
`} i
`
`nt getNodesfint pnode, int *parray)
`i
`_
`.
`mt 1,];
`for (i = O,j = 0; i < numMenu; i++)
`if(menuList[i][0] = pnode)
`
`{ p
`
`anayfj] = menuList[i][1];
`j++;
`}
`
`‘
`panayp] = 0;
`return J;
`
`} {
`
`*#$*t**************$*****$*****$*#*******¥********¥¥****************#****#*$*
`
`leamThesaurus : re-writes the thesaurus with releamed pattern and newly
`learned word.
`$$*******t*t**************¥*¥*t***¥*******3t************¥***¥*¥****¥******¥**I
`
`learnThesaurus(int pmpt, int unknownWordsfl, int numUnknown, char *flnm)
`
`92
`
`(cid:23)(cid:28)(cid:24)
`495
`
`{ i
`
`nt i, j, k, 1;
`FILE *fp;
`int *tmpLi st, tmpCount;
`
`72835! v:
`
`

`

`153335393533] "1119mm
`
`PATENT
`Docket NIL: 4428—4001
`
`I“ create and initialize a tmp Array *f
`tmpList = (int *)cal]0c(numColumn, sizeof(int));
`for (i = tmpCount = 0; i < numColumn; iH)
`tmpList[i] = 0;
`I
`
`f“ scan tth the query words and gather a list of unique keywords in tmp array“;
`tmpCount = getKeyWords(queryTerms, nquuery, tmpList);
`1* Locate the row for select prompt. if not create new row ”'5’
`for (k = 0; k < numScore && scoringfk][0] != pmpt; kH);
`if (k >= numScore)
`{
`
`scoring = (int **)realloc(scoring, (k + 1) * sizeoffint *));
`Scoring[k] = (int *) malloc((numColurnn + l) * sizeof(int));
`for (j = 0;j <= numColumn; j-H)
`Scoring[k][j] = 0;
`numScorc-H';
`
`} s
`
`coring[k][0] = pmpt;
`for (j = 0;j < tmpCount;j++)
`scoring[k][tmpList[j]]++;
`
`/******************it$$$$$$$$$$$$$$$$$**$*$$**$*$*#*#**************t.{
`
`for (i = tmpCount = 0; i < numColumn; i++)
`tmpList[i] = 0;
`
`for (j = i = 0;j é numColumn; j++)
`
`{ f
`
`or (k = 0; k < numlndex && index ListU][k] != 0; k++)
`if (indexList[j][k] = pmpt)
`break;
`if (k < numlndex && indexListhHk] != 0)
`
`{ t
`
`mpList[i] =j + 1;
`i++;
`
`}
`
`}
`tmpCount = i;
`fp = fileOpen(flnm, “w" ;
`fprintflpf, "<BR><B>Learned wordsflBxBRV‘);
`fprintf(fp, "[%s]\n", “EXT-THESAURUS");
`
`72335: v]
`
`93
`
`(cid:23)(cid:28)(cid:25)
`496
`
`

`

`-
`

`
`iflflggfifig miligfla
`
`PATENT
`Docket No.: 4428—4001
`
`for (i = numOrgRow; i < numRow; i-H-)
`
`rowTennsnD;
`
`{ f
`
`printf(fp, "%s:
`
`if (updateFlag && inArray(uWords, rowTenns[i], numUW))
`
`{ f
`
`printfipf, "%s (releamed)<BR>original: ", queryTenns[unknownWordsLi]]);
`for (k = 0; k < numColumn; k++)
`
`{ i
`
`f (thesauru5[i][k] != 0)
`fprimf(pf, " %d", thesaurus[i][k]);
`if (thesaurus[i][k] = 0)
`break;
`
`} f
`
`pn'ntflpf, "<BR>");
`k = Promthnion(thesaurus[i], tmpList, k, tmpCoum);
`fin‘intflpf, "new :" ;
`forfi =0;j <k;j-H-)
`fprintf(pf, " %d", thesaurus[i][j]);
`1‘pnintf(pf, "<BR><BR>");
`
`}
`
`for (j = 0; j < numColun-m; j++)
`{
`
`if (thesaurus[i][j] = 0)
`break;
`
`fprintflfp, "%d,", thesaurus[i][j]);
`
`}
`fprintf(fp, "\n");
`}
`for (i = 0; updateFlag && i < numUW; i++)
`
`{ i
`
`f (inAnay(rowTenns, uWords[i], numRow))
`continue;
`
`fprintfifp, "%s: ", uWords[i]);
`fprintf(pf, "%s(new-Ieamed) :", uWords[i]);
`addWord(&rowTenns, uWords[i], ++numRow);
`thesaurus = (int **)realloc(thesaurus, numRow * sizeoffint *));
`thesaurus[numRow - l] = (int *)malloc(numColumn * sizeof(int));
`for (j = 0; j < numColumn; j++) thesaurus[numRow -1]Li] = 0;
`for (j = 0;j < tmpCount; j++)
`{
`
`?28351 VI
`
`94
`
`(cid:23)(cid:28)(cid:26)
`497
`
`

`

`snaggzgg .. 1119332
`
`PATENT
`Docket No.: 4428-4001
`
`thesaurus[numRow - 1]fi] = tmpListLi];
`fpfintflfp, "%d,", tmpListUD;
`fprintflpf, " %d", tmpList[j]);
`}
`fprintflfp, "\n");
`fprintf(pf, "<BR><BR>");
`}
`
`fprintf(fp, "\n");
`
`I“ write the scoring in the file *1
`fprintttfp, "[%s}\n", "SCORING");
`for (i = 0; i < numScore; i++)
`
`{ f
`
`printf(fp, "%d,", scoring[i][0]);
`for(j = 1;j <= numColumn;j++)
`fpfin‘ftfp, "%d,", scoringiiHjD;
`fpn'ntfifpg "\Il");
`}
`fprintf(fp, "\n");
`fclose(fp);
`
`} f
`
`¥$$t$$$$$$$$$$$$$$$$$*$***$*********t*****#****************************$*
`removeChild: removes deSCendents of all the elements from the list
`****¥***$****¥$*¥**¥*#*#******$$*******************i*****¥**********¥*¥**fi
`
`int removeChild(int *array, int tot)
`
`{ i
`
`nt i, j, k, em = 0;
`int *tmparray, m = 99;
`
`tmpan'ay = (int *)calloc(num1ndex, sizeof(int));
`
`x“ Remove any prompts that are responses rather than choices *I‘
`for (i = 0; i < tot; i-H-)
`
`{ f
`
`}
`
`or(i = 0;j < numMenu; jH)
`if(menuList[j][1] == array[i] && menuListU][2] m 100)
`array[i] = 0;
`
`P" Remove any prompts that are root node and have a child which is not a leaf rather than
`choices ‘7
`
`72385: v]
`
`95
`
`(cid:23)(cid:28)(cid:27)
`498
`
`

`

`iflflggfifig .1. 1119mm
`
`PATENT
`Docket No.: 4428—4001
`
`for (i = 0; i < tot; i++)
`
`{ i
`
`f(array[i] = 0) 3” already removed so go to next ‘7
`continue;
`
`3* if(isLeaf[array[i]))
`continue; *a’
`
`m = arrayli];
`while(l)
`
`{ f
`
`ora = 0; j < numMenu; j++)
`if (menuListU][l] = 111)
`break;
`
`if (menuListfi][0] = 0)
`break;
`
`m = menuListU][0];
`}
`if( m != array[i])
`
`{ f
`
`or (j = 0;j C tot;j++)
`
`{ i
`
`f (arraym = m)
`arrayLi] = O;
`
`}
`
`}
`
`}
`
`for (i = 0; i < tot; H—F)
`
`{ i
`
`f (array[i = 0) P" already removed so go to next ‘5’
`continue;
`for (j = 0;j < numlndex;j++) l” initialize tmparray *f
`thaITayLi] = 0;
`cnt = getChildren(array[i], tmparray); I" get children & grand-children of i *l
`for (j = 0;} < tot; j++)
`I’“ scan thru the array to check for child *f
`if (j I: i) f“ ignore self from checking *z’
`for (k = 0; k < cnt; k++)
`if (arraym = tmparray[k])
`
`{ a
`
`rrayfj] = 0; P“ ifj is child ofi, make it 0 *f
`break;
`
`‘3'2885l v]
`
`96
`
`(cid:23)(cid:28)(cid:28)
`499
`
`

`

`llElE'g'glESg willgfla
`
`PATENT
`Docket No.: 4428-400]
`
`}
`
`}
`l" Shifl All non-zeroes upwards *I
`for (i = 0; i 4 tot; i++)
`
`{ i
`
`f(array[i] = 0)
`
`{ f
`
`or(j =i+ I;j Ctot;j-H-)
`if(axray[j] != 0)
`break;
`
`if (j < tot)
`
`{ a
`
`rrayfil = arrayfi];
`anaYLl] = 0;
`}
`
`}
`
`}
`3”“ count no of elements *i
`
`for (j = 0;j < tot;j+—|r)
`
`i{f(arraym = 0)
`
`break;
`
`‘}
`return J;
`
`} f
`
`************#*#**¥**********¥********¥**¥¥****¥*¥*¥**¥$************$
`
`getChildren: fetches all the dcscendents of pmpt into array
`***************$***#*#***********************#***$**************$**¥f
`
`int getChildren(int pmpt, int *array)
`
`{ i
`
`nt i,j, k, 1;
`int t, t1, t2;
`
`int *tmparrayl, *tmparrayz;
`
`if (isLeaf(pmpt)) :’* if node is leaf no children 50 return 0 *f
`retum O;
`
`trnparrayl = (int *)calloc(numh1dcx, sizeof(int)); l* child of child in every loop *1
`tmparray2 = (int *)calloc(num Index, sizeoffint»; F union of all scanned children *i
`t = t1 = 12 = 0;
`for (i = 0; i < numMenu; i++)
`{
`
`128851 v]
`
`97
`
`(cid:24)(cid:19)(cid:19)
`500
`
`

`

`.
`
`lifllEQQEEgnlllgflE
`
`PATENT
`Docket No.: 4428-4001
`
`if (menuLisl[i][0] = pmpt && menuList[i][2] != 100)
`
`{ a
`
`rray[t] = menuList[i][1];
`t1 = gctChildren(array[t], tmparrayl);
`t2 = Promthnion(trnparray2, tmparrayl, t2, t1);
`H—F;
`
`}
`
`}
`t = Promthnion(a.rray, lmparrayZ, t, t2);
`return I;
`
`}
`
`int chkAns (char * ans, int * Parray, int pcnt)
`
`{ c
`
`har locquery[256];
`int i,j, tmplcnt = O, tmp2cnt = 0;
`char *resWords[50], start = 'Y';
`int numWords, ImpArrayl [20], tmpAIray2[20];
`int uwFlag = 0, rowOrColWord = 0;
`
`strcpy(locquery,ans);
`numWords = breakStr(ans, resWords);
`if ( strcmp(resWords[0],"other") = 0 && strcmp(resWords[l],"options") = 0)
`
`{ r
`
`eturn 0;
`
`}
`numWords = processArray(resWords, numWords, 1);
`for (i = O; i < 20; i++)
`tmpAn‘ayl [i] = tmpArray2[i] = 0;
`fprintf(p£”<li>1nitialized Temp Arraym"); fflush(pf);
`
`for (i = 0; i < numWords; i++)
`
`i{f(EinArray(colurrmTenns, resWordsfi], numColumn))
`i{f(1inArray(rowTenns,resWords[i],numCqumn))
`i{f(IinArray(uWList, resWords[i], uWNum))
`iddWord(&uWList, resWords[i], HuWNum);
`iflushflt);
`
`723851 VI
`
`98
`
`(cid:24)(cid:19)(cid:20)
`501
`
`

`

`inagqgao m 11.113383
`
`PATENT
`Docket No.: 44284001
`
`else
`
`.
`{
`fprintf(pf,"<li>Unknown Word: %s\n",resWords[1]);
`fflush(pl);
`uwFlag' = l; 1* unKnown word encountered twice ‘3’
`}
`
`}
`
`else
`
`rowOrColWord++;
`continue;
`
`}
`
`else
`
`rowOrColWord++;
`
`tmp 1 out = fetchPrompts(re5Words[i], tmpArrayl );
`if (start = 'Y')
`
`{ t
`
`mp2cnt = Promthnion(tmpArray2, tmpArrayl , tmpZCnt, tmplcnt);
`start=’N';
`
`}
`
`else
`
`tmp2cnt = PrompthitersectionflmpArrayZ, tmpArrayl , tranCnt, tmplcnt);
`
`tmpZCnt = Promptlntersection(tmpArray2, Parray, tmpZCnt, pent);
`}
`if (tmchnt != 1)
`{
`
`if(tmp20nt = 0 && pcnt == 1 && numWords = 1) fl i.e. only one prompt &
`
`not selected
`
`{
`
`strcpy(ans, locquery);
`if (chkAfnn(ans))
`return 1;
`
`} i
`
`f (tmplcnt 3* 1) fl i.e. multiple prompt selection then do score
`{
`
`strcpy(ans, locquery);
`return checkscore(ans, Parray, pent);
`
`if (uwFlag)
`if (AskforOpO)
`return -99;
`
`72335: VI
`
`99
`
`(cid:24)(cid:19)(cid:21)
`502
`
`

`

`-
`
`‘
`
`ill-JEEGJQES‘Q “lilgflfl
`
`PATENT
`Docket NIL: 4428-4001
`
`else
`
`return -1;
`
`else
`
`if (rowOrColWord)
`
`{ s
`
`trepy(query,loequery);
`return ~99;
`}
`
`}
`for (i = 0; Parray[i]; i++)
`if (Panay[i] = tmpArray2[0])
`return i + l;
`
`} i
`
`nt AskforOpO
`¢{
`1
`I
`Int 1,] ;
`char *resWords[50];
`int numWords ;
`
`system("elear");
`printf("Your request was not understood.\n");
`pri nttI"Would you prefer to speak to an operator or try again with a new request?\n");
`fprinttIIf, "<P>Your request was not understood.<LI>");
`fpr‘intfllf, "Would you prefer to speak to an operator or try again with a new request?\n");
`fi'lushflf);
`I* accept the user input *I
`fgets(query, 255, stdin);
`addWord(&queryList, query, ++nquueryList);
`fprintfflf, "<P><I> %s<lI>", query);
`numWords = breakStr(query, resWords);
`if ( inArray(resWords,"Operator",numWords))
`
`{ p
`
`rintf(“\n\nPlease wait for the operator ...\n");
`fpr‘intf(lf,"*CP>Please wait for the operator ...");
`fflushflf);
`exit(0);
`}
`if( inAnay(resWords,"try",numWords) && inArray(resWords,"again",numWords))
`
`{ s
`
`ystem("elear");
`printf("Please tell us your new requestm");
`fprintfflf, "<P>Please tell us your new requestm");
`fflushfit);
`
`T2885] VI
`
`100
`
`(cid:24)(cid:19)(cid:22)
`503
`
`

`

`iflflgQBSg .. iii'glflfl
`
`PATENT
`Docket No.: 4428-4001
`
`3"“ accept the user input *I'
`fgets(query, 255, stdin);
`addWord(&qucryList, query, HnquueryList);
`}
`return 1;
`
`} v
`
`oid sayOtherO
`
`{ p
`
`rintf(”\nWould you Iike to hear other options?\n\n");
`fprintfaf, "<LI>Would you like to hear other options?<P>");
`otheFlag = 1;
`
`} i
`
`nt checksaore(char *ans, int *Parray, int pent)
`{
`
`char * resWords[50], *pmptWords[SO];
`int i, j, *score, *scorel;
`int numWords, numpWords, maxscore;
`
`score = (int *)malloc(pcnt * sizeoflint»;
`score] = (int *)ma!loc(pcnt * sizeoftintn;
`for (i = 0; i c pcnt; i++)
`score[i] = score] [i] = 0;
`
`numWords = breakStr(ans, resWords);
`for (i = 0; i < pent; i++)
`{
`
`numpWords = breakStr(prompts[Parray[i]-1], pmptWords);
`for (j = 0;j < numWords; jH)
`if (inArray(pmptWords,resWordsLij, numpWords))
`score[i]++;
`
`} f
`
`or (i = maxscore = 0; i < pcnt; i++)
`maxscore = (maxscore < score[i])?score[i]:maxscore;
`
`for (i =j = O; i < pent; i++)
`j += (score[i] — maxscom)?l :0;
`
`if ( j = 1) .3“ single prompt selection ‘7
`{
`
`for (i = 0; i < pcnt; i++)
`if (score[i] = maxscom)
`return i + 1;
`
`}
`
`723351v1
`
`101
`
`(cid:24)(cid:19)(cid:23)
`504
`
`

`

`‘
`
`iflEQQE‘iE‘g ”111915117.”
`
`PATENT
`Docket No.: 4428-4001
`
`else
`
`{
`
`for (i = 0; i < pent; i++)
`{
`
`numpWords = breakStr(prompts[Parray[i] - l], pmptWords);
`score] [i] = getscore1(resWords, numWords, pmptWords, numpWords);
`
`} m
`
`ax score = 0;
`
`for (i = 0; i < pent; i++)
`maxscore = (scorel [i] b maxscore)?scorel [i]:maxscore;
`for (i =j = 0; i < pent; i++)
`j += (scorel [i} = maxscore)?1 :0;
`if(j = 1) l'“ single prompt selection *I
`{
`
`for (i = 0; i < pent; i++)
`if (scorel [i] = maxscore)
`return i + 1;
`
`for (i = 0; i < pent; i++)
`if (score[i] != maxscore)
`Parray[i] = 0;
`return -1;
`
`}e
`
`{
`
`}
`
`lse
`
`}
`
`} i
`
`nt chkAfim( char * str)
`{
`
`int i,j, numWords;
`char * resWords[50];
`
`numWords = breakStr(str, resWords);
`for (i = 0; i < numWords; i +4“)
`if (inArray(affimWords, resWordsfi], 3))
`return 1;
`
`return 0;
`
`102
`
`(cid:24)(cid:19)(cid:24)
`505
`
`} i
`
`nt chkNegtn( char * str)
`{
`
`72385] V1
`
`

`

`inaqgfiag miligflfl
`
`PATENT
`Docket No.: 4428-4001
`
`int i ,j, numWords;
`char * resWords[50];
`
`numWords = breakStr(str, resWords);
`for (i = 0; i < numWords; i H)
`if (inArray(negWords, resWords[i], 2))
`return 1;
`
`return 0;
`
`} i
`
`nt getscorel(char “Wordl, int numl, char **Word2, int num2)
`{
`
`int i, j, set = 0;
`int lsmatch = 0;
`
`for(i = 0; i < num1;i++)
`{
`
`for(j = lsmatch;j < num2; jH)
`if (lstrcmp(Word1[i],Word2fi]))
`{
`
`sari-F;
`break;
`
`}
`if (j < num2)
`lsmatch =j + l;
`
`} r
`
`eturn scr;
`
`} i
`
`nt orderPrompts(int *InterPrompts,int numInter)
`{
`
`int i, j, k, 1;
`int *tmpArray[2]; 2” 0 - score -, 1 - level; 3 - menu order *f
`int *tmpList, tmpCount;
`
`tmpArray[0] = (int *)malloc(num1nter * sizeoflint»;
`tmpArrayU] = (int *)malloc(num1nter * sizeottint»;
`
`tmpList = (int *)malloc(numColumn * sizeofiint»;
`for (i = 0;
`i < numColumn; i++)
`tmpListfi] = 0;
`If get the list of keywords from queryTenns
`
`72335: v]
`
`103
`
`(cid:24)(cid:19)(cid:25)
`506
`
`

`

`iflflggfifig "111983
`
`PATENT
`Docket No.: 4428-4001
`
`tmpCount = getKeyWords(queryTenns, nquuery, tmpList);
`
`for (i = 0; i < numlnter; i++)
`{
`
`!* get the maxscore for the prompt *!
`tmpArray[0][i] = 0;
`for (j = 0; (j < numScore) && (scoringfi][0] != InterPromptsfiD; j++);
`a” if any previous scoring present *I
`if (G < numScore) && (Scoringfj][0] = InterPrompls[i]))
`{
`
`I! get the max score
`for ( k = 0; k < tmpCount; k++)
`tmpArray[O][i] = max(tmpA1-ray[0][i] , scofingfi][tmpList[k]]);
`
`} t
`
`mpArray[ l ][i] = getLevelflnterPromptsfi]);
`
`} I
`
`! sort the array in order of score, level and menu-order
`for( i = 0; i < (numInter - 1); iH)
`{
`
`for (j = i + 1;j < numInter; jH)
`if (lgThan(tmpArray[0][i], tmpArrayHHi], InterPromptsfi],
`tmpArray[0][j], tmpArray[ l ][j], InterPromptsUD)
`{
`
`swap(tmpAIray[0][i], tmpArray[0][i]);
`swapflmpArrayUHiL tmpArrayl 11m);
`swap(1nterPrompts[i], InterPromptsUD;
`
`}
`
`} r
`
`eturn numInter;
`
`} i
`
`nt getKeyWords(char **queryTenns, int nquuery, int *tmpList)
`{
`
`int i,j, k, 1;
`int count = 0;
`
`for (j = 0; j d nquuery; j”)
`{
`
`P" Check ifthe word is keyword *a’
`if ((k = inArray(columnTerms, queryTermsfi], numColurnn)) != O)
`{
`
`723351 VI
`
`104
`
`(cid:24)(cid:19)(cid:26)
`507
`
`

`

`151399991359 13.111932
`
`PATENT
`Docket No.: 4428-4001
`
`I“ add in temp list only if not present *I
`for (i = 0; i < count && tmpList[i] != k ; i++);
`if (i >= count)
`tmpList{count++] = k;
`continue;
`
`} 3
`
`* check if the word is Thesaurusteamed Word *i
`
`if ((k z inArray(rowTerms, queryTerrnsU], numRow)) != 0)
`{
`
`l“ pick-up all keywords for that word *1
`for (i = 0', thesaurus[k - 1][i] != 0; i++)
`{
`
`for (l = 0; l < count && tmpList[l] != thesaurus[k - 1][i] ; l-l-F);
`if (1 >= count)
`tmpList[counH—F] = thesaurus[k - 1][i];
`
`}
`
`}
`
`} r
`
`eturn count;
`
`} i
`
`nt getLeveIfint pmpt)
`{
`
`int i, k, l;
`
`for (i = 0; i < numMenu && menuList[i][l] != pmpt; i++);
`k = menuList[i][0];
`for (l = 0; k > 0;I++)
`{
`
`for (i = 0; i < numMenu && menuList[i][1] != k; i++);
`k = menuList[i][0];
`
`105
`
`(cid:24)(cid:19)(cid:27)
`508
`
`} r
`
`eturn I;
`
`} i
`
`nt gThan(int 3, int b, int c, int p, int q, int r)
`{
`.
`if Desc order here
`if (a > p) return 1;
`if(a C p) return 0; {I Desc order here
`if (b b q) return 0;
`if Ase order here
`
`728851 v1
`
`

`

`.
`
`‘
`
`1112113991359 ”lilgfla’
`
`PATENT
`Docket No.: 4428-4001
`
`if (b < q) return 1; fl Asc order here
`if (c > r) return 0;
`If Asc order here
`return 1; f! Asc order here
`
`formlib.c: This program contains fimctions for forms processing
`#include <stdio.h)
`
`#include <string.h>*'
`#include “arraylibh”
`
`struct input {
`char *Ty-pe;
`Char *APrornpt;
`char *RPrompt;
`char *Name;
`char *Value;
`char “Choice;
`int numChoice;
`};
`
`struct form {
`char * name;
`
`struct input ”fields;
`int numFields;
`};
`
`char * split(char * , char);
`
`int loadForm(FILE *f, struct form *frm, char *name)
`
`106
`
`(cid:24)(cid:19)(cid:28)
`509
`
`{ i
`
`nt j, start=0;
`char buf[512];
`char fname{20];
`
`spfintf(fname,"[%s]“,name);
`fseek(f,SEEK_SET,0);
`while(fgets(buf,512,f) != NULL) {
`j = strlen(buf);
`if(buf{j -1]=‘\n')buf[j - 1] =0;
`if (start)
`{
`
`728851 u:
`
`

`

`.
`
`'
`
`iflflggfifig miligflfl
`
`PA

This document is available on Docket Alarm but you must sign up to view it.


Or .

Accessing this document will incur an additional charge of $.

After purchase, you can access this document again without charge.

Accept $ Charge
throbber

Still Working On It

This document is taking longer than usual to download. This can happen if we need to contact the court directly to obtain the document and their servers are running slowly.

Give it another minute or two to complete, and then try the refresh button.

throbber

A few More Minutes ... Still Working

It can take up to 5 minutes for us to download a document if the court servers are running slowly.

Thank you for your continued patience.

This document could not be displayed.

We could not find this document within its docket. Please go back to the docket page and check the link. If that does not work, go back to the docket and refresh it to pull the newest information.

Your account does not support viewing this document.

You need a Paid Account to view this document. Click here to change your account type.

Your account does not support viewing this document.

Set your membership status to view this document.

With a Docket Alarm membership, you'll get a whole lot more, including:

  • Up-to-date information for this case.
  • Email alerts whenever there is an update.
  • Full text search for other cases.
  • Get email alerts whenever a new case matches your search.

Become a Member

One Moment Please

The filing “” is large (MB) and is being downloaded.

Please refresh this page in a few minutes to see if the filing has been downloaded. The filing will also be emailed to you when the download completes.

Your document is on its way!

If you do not receive the document in five minutes, contact support at support@docketalarm.com.

Sealed Document

We are unable to display this document, it may be under a court ordered seal.

If you have proper credentials to access the file, you may proceed directly to the court's system using your government issued username and password.


Access Government Site

We are redirecting you
to a mobile optimized page.





Document Unreadable or Corrupt

Refresh this Document
Go to the Docket

We are unable to display this document.

Refresh this Document
Go to the Docket