//Simple and fancy way of searching //See ::/Apps/Vocabulary/VocabQuiz.HC.Z //for another example of dictionary usage. #define ROWS_NUM 20 #define COLS_NUM 20 #define DIM_MAX MaxI64(ROWS_NUM,COLS_NUM) U8 m[ROWS_NUM][COLS_NUM]; U0 Init() { I64 x,y; for (y=0;y2;i--) { buf[i]=0; if ((ptr=ACDWordPtAt(buf)) && *ptr++==ACD_WORD_CHAR && !StrICmp(ptr,buf)) { "%s ",buf; } } } } U0 SimpleWordSearch() { Search(1,0); Search(0,1); Search(-1,0); Search(0,-1); Search(1,1); Search(-1,-1); Search(1,-1); Search(-1,1); '\n'; } //************************************ U8 words[ROWS_NUM*COLS_NUM*8][DIM_MAX+1]; U8 *word_ptrs[ROWS_NUM*COLS_NUM*8]; U0 CollectWords(I64 dx,I64 dy,I64 *_n) { I64 x,y,n=*_n; for (y=0;y*w1) break; if (!*w2) { if (StrLen(dict+1)>2) { k=i; while (k