Debian Codegraph @

texk/mendexk/mendex.h

raw
1 #include <c-auto.h>
2
3 #include <kpathsea/config.h>
4
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <string.h>
8
9 #ifdef WIN32
10 #define nkf_open fopen
11 #define nkf_close(fp) {clear_infile_enc(fp); fclose(fp);}
12 #endif
13
14 #define PAGE_COMPOSIT_DEPTH 10
15
16 struct page {
17 char *page;
18 char *enc;
19 int attr[PAGE_COMPOSIT_DEPTH];
20 };
21
22 struct index {
23 int num;
24 unsigned char words;
25 char *org[3];
26 char *dic[3];
27 char *idx[3];
28 struct page *p;
29 int lnum;
30 };
31
32 /* convert.c */
33 void initkanatable(void);
34 int convert(char *buff1, char *buff2);
35 int pnumconv(char *page, int attr);
36 int dicread(const char *filename);
37
38 /* pageread.c */
39 int lastpage(const char *filename);
40
41 /* sort.c */
42 void wsort(struct index *ind, int num);
43 void pagesort(struct index *ind, int num);
44 int alphanumeric(char *c);
45 int alphabet(char *c);
46 int numeric(char *c);
47 int japanese(char *buff);
48 int chkcontinue(struct page *p, int num);
49
50 /* styfile.c */
51 void styread(const char *filename);
52
53 /* fread.c */
54 char *mfgets(char *buf, int size, FILE *fp);
55 int idxread(char *filename, int start);
56
57 /* fwrite.c */
58 int fprintf2 (FILE *fp, const char *format, ...);
59 void warn_printf(FILE *fp, const char *format, ...);
60 void verb_printf(FILE *fp, const char *format, ...);
61
62 struct index;
63 void indwrite(char *filename, struct index *ind, int pagenum);
64
65 #undef fprintf
66 #define fprintf fprintf2
67
68 #undef fputs
69 #define fputs fputs2