Simplify structure

This commit is contained in:
Filip Gralinski 2019-12-02 19:48:55 +01:00
parent 6de49ddc0e
commit 67b5dfe58e
35 changed files with 0 additions and 8517 deletions

View File

@ -1,26 +0,0 @@
ext/plmindex/plmindex
sample/sample.aux
sample/sample.bbl
sample/sample.blg
sample/sample.brf
sample/sample.idx
sample/sample.ind
sample/sample.lof
sample/sample.log
sample/sample.lot
sample/sample.out
sample/sample.pdf
sample/sample.toc
*~
*.aux
*.bbl
*.blg
*.brf
*.idx
*.ind
*.lof
*.log
*.lot
*.out
*.toc
{{cookiecutter.thesis_surname}}.pdf

View File

@ -1,28 +0,0 @@
#!/bin/bash
check()
{
if [[ "$CHECK" == "1" ]]
then
bash ./check.sh $MGRDIR
fi
}
# pomocniczy skrypt generujący daną pracę magisterską z czystej kopii z repozytorium
if [[ "$1" == "--check" ]]
then
shift
echo "will be checking"
CHECK=1
fi
MGRDIR=$1
if [[ ! -d "$MGRDIR" ]]
then
echo "unknown name: $MGRDIR"
exit 1
fi
(cd ext/plmindex ; make) && (cd $MGRDIR ; make) && check

View File

@ -1,29 +0,0 @@
#!/bin/bash
MGRDIR="$1"
HEREDIR=`pwd`
FULLMGRDIR="$HEREDIR/$MGRDIR"
AUTOZOIL=${AUTOZOIL:-../autozoil}
if [[ "$MGRDIR" == "" ]]
then
echo "no directory given!!!"
exit 1
fi
echo "AUTOZOIL IN '$AUTOZOIL'"
cd $AUTOZOIL
if [[ ! -d "$FULLMGRDIR" ]]
then
echo "no directory for '$FULLMGRDIR'"
exit 1
fi
SOURCE_FILE_PREFIX=`basename $MGRDIR`
FILES_TO_CHECK=`ls $FULLMGRDIR/*.tex | grep -v '.*-form.tex'`
echo "CHECKING: $FILES_TO_CHECK"
PERL5LIB=. perl autozoil.pl --locale ${AUTOZOIL_LOCALE:-pl_PL} $FILES_TO_CHECK --format xml --source-file-prefix "${SOURCE_FILE_PREFIX}/" > $FULLMGRDIR/autozoil.xml || exit 0

View File

@ -1,40 +0,0 @@
CC = gcc
O = .o
X =
XCFLAGS= -unsigned-char -O2 -g -pedantic -DDEFAULT_LANGUAGE=PL_latin2
LIBS =
CFLAGS= $(XCFLAGS)
LDFLAGS = -g
HDRS = mkind.h scanid.h scanst.h
MAKEFILE = makefile.gcc
OBJS = genind$(O) qsort$(O) mkind$(O) scanid$(O) scanst$(O) \
sortid$(O) decode_n$(O) language$(O)
SRCS = genind.c mkind.c scanid.c scanst.c qsort.c sortid.c decode_n.c\
language.c
PROGRAM = plmindex
.c.o:
$(CC) -c $(CFLAGS) $*.c
$(PROGRAM): $(OBJS) $(MAKEFILE)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
rm *.o
genind$(O): genind.c mkind.h
mkind$(O): mkind.c mkind.h
qsort$(O): qsort.c mkind.h
scanid$(O): scanid.c mkind.h scanid.h
scanst$(O): scanst.c mkind.h scanst.h
sortid$(O): sortid.c mkind.h
language$(O): pl_maz.h pl_iso2.h us_eng.h pl_1250.h pl_852.h mkind.h
mkind.h: myctype.h
clean:
rm plmindex

View File

@ -1,197 +0,0 @@
#include "mkind.h"
#include <stdlib.h>
#include <malloc.h>
Local char_u *myconcat(char_u *, const char_u *);
Local void get_jed(int *lll, long licz);
Local char_u *dec_text(Logical flag, int *zzz, char_u *text);
#define EOS '\0'
Local int tab_jed[5],
tab_tys[5],
tab_mil[5];
Public char_u *
Decode_Number(const long liczba)
{
long licz;
char_u *text;
if(liczba >= 1000000000L)
{
fprintf(stderr, "Number to big");
exit(1);
}
if((text = (char_u *)malloc(strlen("") + 1)) == NULL)
{
fprintf(stderr, "Can`t allocate memory");
exit(1);
}
*text = EOS;
get_jed(tab_jed, liczba);
if(tab_jed[3] > 0)
get_jed(tab_tys, tab_jed[3]);
if(tab_jed[4] > 0)
get_jed(tab_mil, tab_jed[4]);
if(tab_jed[4] > 0)
{
text = dec_text(False, tab_mil, text);
if(tab_mil[0] < 5 &&
(tab_mil[0] > 1 || (tab_mil[1] == 0 && tab_mil[2] == 0)))
{
text = myconcat(text,
(*multilanguage[Language].decode->mil)[tab_mil[0]]);
text = myconcat(text, (char_u *)" ");
}
else
{
text = myconcat(text, (*multilanguage[Language].decode->mil)[5]);
text = myconcat(text, (char_u *)" ");
}
}
if(tab_jed[3] > 0)
{
text = dec_text(False, tab_tys, text);
if(tab_tys[0] < 5 &&
(tab_tys[0] > 1 || (tab_tys[1] == 0 && tab_tys[2] == 0)))
{
text = myconcat(text,
(*multilanguage[Language].decode->tys)[tab_tys[0]]);
text = myconcat(text, (char_u *)" ");
}
else
{
text = myconcat(text, (*multilanguage[Language].decode->tys)[5]);
text = myconcat(text, (char_u *)" ");
}
}
text = dec_text(True, tab_jed, text);
return(text);
}
Local void
get_jed(int *lll, long licz)
{
char *buffer;
int ii,
kk;
if((buffer = (char *)malloc(10)) == NULL)
{
fprintf(stderr, "Can`t allocate memory");
exit(1);
}
sprintf(buffer, "%ld", licz);
ii = strlen(buffer);
free(buffer);
for(kk = 0; kk < ii;)
{
if(licz < 10L)
{
lll[0] = licz;
kk++;
}
else if(licz < 100L)
{
if(licz < 20L)
{
lll[0] = licz;
kk++;
}
else
{
lll[1] = licz / 10;
licz = licz - lll[1] * 10;
kk++;
}
}
else if(licz < 1000L)
{
lll[2] = licz / 100L;
licz = licz - lll[2] * 100L;
kk++;
}
else if(licz < 1000000L)
{
lll[3] = licz / 1000L;
licz = licz - lll[3] * 1000L;
kk++;
}
else if(licz < 1000000000L)
{
lll[4] = licz / 1000000L;
licz = licz - lll[4] * 1000000L;
kk += 3;
}
}
}
Local char_u *
dec_text(Logical flag, int *zzz, char_u *text)
{
if(zzz[2] > 0)
{
text = myconcat(text,
(*multilanguage[Language].decode->setki)[zzz[2]]);
text = myconcat(text, (char_u *)" ");
}
if(zzz[1] > 0)
{
text = myconcat(text,
(*multilanguage[Language].decode->dies)[zzz[1] - 1]);
text = myconcat(text, (char_u *)" ");
}
if(zzz[0] > 0 && (flag || (zzz[0] != 1 || (zzz[1] > 0 || zzz[2] > 0))))
{
text = myconcat(text,
(*multilanguage[Language].decode->jedn)[zzz[0]]);
text = myconcat(text, (char_u *)" ");
}
return(text);
}
Local char_u *
myconcat(char_u *str, const char_u *addstr)
{
char *tmp_str;
if((tmp_str = (char *)malloc(strlen((char *)str) +
strlen((char *)addstr) + 1)) == NULL)
{
fprintf(stderr, "Can`t allocate memory");
exit(1);
}
strcpy(tmp_str, (char *)str);
strcat(tmp_str, (char *)addstr);
free(str);
return((char_u *)tmp_str);
}
#ifdef D_DEBUG
void
main(int argc, char *argv[])
{
long num;
if(argc < 2)
{
fprintf(stderr, "liczba <liczba>\n");
exit(1);
}
num = atol(argv[1]);
printf("%s\n", Decode_Number(num));
}
#endif

View File

@ -1,196 +0,0 @@
#include "mkind.h"
#include <stdlib.h>
Local char_u *myconcat(char_u *, const char_u *);
Local void get_jed(int *lll, long licz);
Local char_u *dec_text(Logical flag, int *zzz, char_u *text);
#define EOS '\0'
Local int tab_jed[5],
tab_tys[5],
tab_mil[5];
Public char_u *
Decode_Number(const long liczba)
{
long licz;
char_u *text;
if(liczba >= 1000000000L)
{
fprintf(stderr, "Number to big");
exit(1);
}
if((text = (char_u *)malloc(strlen("") + 1)) == NULL)
{
fprintf(stderr, "Can`t allocate memory");
exit(1);
}
*text = EOS;
get_jed(tab_jed, liczba);
if(tab_jed[3] > 0)
get_jed(tab_tys, tab_jed[3]);
if(tab_jed[4] > 0)
get_jed(tab_mil, tab_jed[4]);
if(tab_jed[4] > 0)
{
text = dec_text(False, tab_mil, text);
if(tab_mil[0] < 5 &&
(tab_mil[0] > 1 || (tab_mil[1] == 0 && tab_mil[2] == 0)))
{
text = myconcat(text,
(*multilanguage[Language].decode->mil)[tab_mil[0]]);
text = myconcat(text, (char_u *)" ");
}
else
{
text = myconcat(text, (*multilanguage[Language].decode->mil)[5]);
text = myconcat(text, (char_u *)" ");
}
}
if(tab_jed[3] > 0)
{
text = dec_text(False, tab_tys, text);
if(tab_tys[0] < 5 &&
(tab_tys[0] > 1 || (tab_tys[1] == 0 && tab_tys[2] == 0)))
{
text = myconcat(text,
(*multilanguage[Language].decode->tys)[tab_tys[0]]);
text = myconcat(text, (char_u *)" ");
}
else
{
text = myconcat(text, (*multilanguage[Language].decode->tys)[5]);
text = myconcat(text, (char_u *)" ");
}
}
text = dec_text(True, tab_jed, text);
return(text);
}
Local void
get_jed(int *lll, long licz)
{
char *buffer;
int ii,
kk;
if((buffer = (char *)malloc(10)) == NULL)
{
fprintf(stderr, "Can`t allocate memory");
exit(1);
}
sprintf(buffer, "%ld", licz);
ii = strlen(buffer);
free(buffer);
for(kk = 0; kk < ii;)
{
if(licz < 10L)
{
lll[0] = licz;
kk++;
}
else if(licz < 100L)
{
if(licz < 20L)
{
lll[0] = licz;
kk++;
}
else
{
lll[1] = licz / 10;
licz = licz - lll[1] * 10;
kk++;
}
}
else if(licz < 1000L)
{
lll[2] = licz / 100L;
licz = licz - lll[2] * 100L;
kk++;
}
else if(licz < 1000000L)
{
lll[3] = licz / 1000L;
licz = licz - lll[3] * 1000L;
kk++;
}
else if(licz < 1000000000L)
{
lll[4] = licz / 1000000L;
licz = licz - lll[4] * 1000000L;
kk += 3;
}
}
}
Local char_u *
dec_text(Logical flag, int *zzz, char_u *text)
{
if(zzz[2] > 0)
{
text = myconcat(text,
(*multilanguage[Language].decode->setki)[zzz[2]]);
text = myconcat(text, (char_u *)" ");
}
if(zzz[1] > 0)
{
text = myconcat(text,
(*multilanguage[Language].decode->dies)[zzz[1] - 1]);
text = myconcat(text, (char_u *)" ");
}
if(zzz[0] > 0 && (flag || (zzz[0] != 1 || (zzz[1] > 0 || zzz[2] > 0))))
{
text = myconcat(text,
(*multilanguage[Language].decode->jedn)[zzz[0]]);
text = myconcat(text, (char_u *)" ");
}
return(text);
}
Local char_u *
myconcat(char_u *str, const char_u *addstr)
{
char *tmp_str;
if((tmp_str = (char *)malloc(strlen((char *)str) +
strlen((char *)addstr) + 1)) == NULL)
{
fprintf(stderr, "Can`t allocate memory");
exit(1);
}
strcpy(tmp_str, (char *)str);
strcat(tmp_str, (char *)addstr);
free(str);
return((char_u *)tmp_str);
}
#ifdef D_DEBUG
void
main(int argc, char *argv[])
{
long num;
if(argc < 2)
{
fprintf(stderr, "liczba <liczba>\n");
exit(1);
}
num = atol(argv[1]);
printf("%s\n", Decode_Number(num));
}
#endif

View File

@ -1,516 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
*
* Author:
* Pehong Chen
* Chen & Harrison International Systems, Inc.
* Palo Alto, California
* USA
* (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
*
* Contributors:
* Please refer to the CONTRIB file that comes with this release
* for a list of people who have contributed to this and/or previous
* release(s) of MakeIndex.
*
* All rights reserved by the copyright holders. See the copyright
* notice distributed with this software for a complete description of
* the conditions under which it is made available.
*
*/
#include "mkind.h"
#include <stdarg.h>
#if sun /* avoid conflict with symbol in */
/* /usr/lang/SC1.0/include/CC/stdlib.h */
#define end the_end
#endif
Local FIELD_PTR curr = NULL;
Local FIELD_PTR prev = NULL;
Local FIELD_PTR begin = NULL;
Local FIELD_PTR end = NULL;
Local FIELD_PTR range_ptr;
Local int level = 0;
Local int prev_level = 0;
Local unsigned char *encap = NULL;
Local unsigned char *prev_encap = NULL;
Local Logical in_range = False;
Local Logical encap_range = False;
Local char buff[2 * ARGUMENT_MAX];
Local char line[2 * ARGUMENT_MAX]; /* output buffer */
Local int ind_lc = 0; /* overall line count */
Local int ind_ec = 0; /* erroneous line count */
Local int ind_indent;
Local void Ind_Error (const char *F, ...);
Local void flush_line (int print);
Local void insert_page (void);
Local int make_entry (int n);
Local void make_item (unsigned char* term);
Local void new_entry (void);
Local void old_entry (void);
Local int page_diff (struct KFIELD *a, struct KFIELD *b);
Local void put_header (unsigned char let);
Local void wrap_line (int print);
Public void
gen_ind(VOID_ARG)
{
int n;
int tmp_lc;
Message("Generating output file %s...", ind_fn);
fputs(preamble, ind_fp);
ind_lc += prelen;
if(init_page)
insert_page();
/* reset counters for putting out dots */
idx_dc = 0;
for(n = 0; n < idx_gt; n++)
{
if(idx_key[n]->type != DUPLICATE)
if(make_entry(n))
{
idx_dot = True;
if(idx_dc++ == 0)
Message(DOT);
if(idx_dc == DOT_MAX)
idx_dc = 0;
}
}
tmp_lc = ind_lc;
if(in_range)
{
curr = range_ptr;
Ind_Error("Unmatched range opening operator %c.\n", idx_ropen);
}
prev = curr;
flush_line(True);
fputs(delim_t, ind_fp);
fputs(postamble, ind_fp);
tmp_lc = ind_lc + postlen;
if(ind_ec == 1)
Message("done (%d %s, %d %s).\n", tmp_lc, "lines written", ind_ec,
"warning");
else
Message("done (%d %s, %d %s).\n", tmp_lc, "lines written", ind_ec,
"warnings");
}
Local int
make_entry(int n)
{
unsigned char let;
/* determine current and previous pointer */
prev = curr;
curr = idx_key[n];
/* check if current entry is in range */
if((*curr->encap == idx_ropen) || (*curr->encap == idx_rclose))
encap = &(curr->encap[1]);
else
encap = curr->encap;
/* determine the current nesting level */
if(n == 0)
{
prev_level = level = 0;
let = *curr->sf[0];
put_header(let);
make_item(EMPTY_STRING);
}
else
{
prev_level = level;
for(level = 0; level < FIELD_MAX; level++)
if(STRNEQ(curr->sf[level], prev->sf[level]) ||
STRNEQ(curr->af[level], prev->af[level]))
break;
if(level < FIELD_MAX)
new_entry();
else
old_entry();
}
if(*curr->encap == idx_ropen)
if(in_range)
Ind_Error("Extra range opening operator %c.\n", idx_ropen);
else
{
in_range = True;
range_ptr = curr;
}
else if(*curr->encap == idx_rclose)
if(in_range)
{
in_range = False;
if(STRNEQ(&(curr->encap[1]), EMPTY_STRING) &&
STRNEQ(prev_encap, &(curr->encap[1])))
Ind_Error("Range closing operator has an " \
"inconsistent encapsulator %s.\n", &(curr->encap[1]));
}
else
Ind_Error("Unmatched range closing operator %c.\n", idx_rclose);
else if((*curr->encap != EOS) &&
STRNEQ(curr->encap, prev_encap) && in_range)
Ind_Error("Inconsistent page encapsulator %s within range.\n",
curr->encap);
return(1);
}
Local void
make_item(unsigned char *term)
{
int i;
if(level > prev_level)
{
/* ascending level */
if(*curr->af[level] == EOS)
sprintf(line, "%s%s%s", term, item_u[level], curr->sf[level]);
else
sprintf(line, "%s%s%s", term, item_u[level], curr->af[level]);
ind_lc += ilen_u[level];
}
else
{
/* same or descending level */
if(*curr->af[level] == EOS)
sprintf(line, "%s%s%s", term, item_r[level], curr->sf[level]);
else
sprintf(line, "%s%s%s", term, item_r[level], curr->af[level]);
ind_lc += ilen_r[level];
}
i = level + 1;
while(i < FIELD_MAX && *curr->sf[i] != EOS)
{
fputs(line, ind_fp);
if(*curr->af[i] == EOS)
sprintf(line, "%s%s", item_x[i], curr->sf[i]);
else
sprintf(line, "%s%s", item_x[i], curr->af[i]);
ind_lc += ilen_x[i];
level = i; /* Added at 2.11 <brosig@gmdzi.gmd.de> */
i++;
}
ind_indent = 0;
strcat(line, delim_p[level]);
begin = end = curr;
prev_encap = encap;
}
Local void
new_entry(VOID_ARG)
{
unsigned char let;
FIELD_PTR ptr;
if(in_range)
{
ptr = curr;
curr = range_ptr;
Ind_Error("Unmatched range opening operator %c.\n", idx_ropen);
in_range = False;
curr = ptr;
}
flush_line(True);
/* beginning of a new group? */
if(((curr->group != ALPHA) && (curr->group != prev->group) &&
(prev->group == SYMBOL)) || ((curr->group == ALPHA) &&
((let = TOLOWER(curr->sf[0][0])) !=
(TOLOWER(prev->sf[0][0])))))
{
fputs(delim_t, ind_fp);
fputs(group_skip, ind_fp);
ind_lc += skiplen;
/* beginning of a new letter? */
put_header(let);
make_item(EMPTY_STRING);
}
else
make_item((unsigned char *)delim_t);
}
Local void
old_entry(VOID_ARG)
{
int diff;
/* current entry identical to previous one: append pages */
diff = page_diff(end, curr);
if((prev->type == curr->type) && (diff != -1) &&
(((diff == 0) && (prev_encap != NULL) && STREQ(encap, prev_encap)) ||
(merge_page && (diff == 1) &&
(prev_encap != NULL) && STREQ(encap, prev_encap)) || in_range))
{
end = curr;
/* extract in-range encaps out */
if(in_range && (*curr->encap != EOS) &&
(*curr->encap != idx_rclose) && STRNEQ(curr->encap, prev_encap))
{
sprintf(buff, "%s%s%s%s%s", encap_p, curr->encap,
encap_i, curr->lpg, encap_s);
wrap_line(False);
}
if(in_range)
encap_range = True;
}
else
{
flush_line(False);
if((diff == 0) && (prev->type == curr->type))
Ind_Error("Conflicting entries: multiple encaps for the same " \
"page under same key.\n");
else if(in_range && (prev->type != curr->type))
Ind_Error("Illegal range formation: starting & ending pages are " \
"of different types.\n");
else if(in_range && (diff == -1))
Ind_Error("Illegal range formation: starting & ending pages " \
"cross chap/sec breaks.\n");
begin = end = curr;
prev_encap = encap;
}
}
Local int
#if STDC
page_diff(FIELD_PTR a, FIELD_PTR b)
# else
page_diff(a, b)
FIELD_PTR a;
FIELD_PTR b;
#endif
{
short i;
if(a->count != b->count)
return(-1);
for(i = 0; i < a->count - 1; i++)
if(a->npg[i] != b->npg[i])
return(-1);
return(b->npg[b->count - 1] - a->npg[a->count - 1]);
}
Local void
put_header(unsigned char let)
{
if(headings_flag != 0)
{
fputs(heading_pre, ind_fp);
ind_lc += headprelen;
switch(curr->group)
{
case SYMBOL:
if(headings_flag > 0)
fputs(symhead_pos, ind_fp);
else
fputs(symhead_neg, ind_fp);
break;
case ALPHA:
if(headings_flag > 0)
fputc(TOUPPER(let), ind_fp);
else
fputc(TOLOWER(let), ind_fp);
break;
default:
if(headings_flag > 0)
fputs(numhead_pos, ind_fp);
else
fputs(numhead_neg, ind_fp);
break;
}
fputs(heading_suf, ind_fp);
ind_lc += headsuflen;
}
}
/* changes for 2.12 (May 20, 1993) by Julian Reschke (jr@ms.maus.de):
Use keywords suffix_2p, suffix_3p or suffix_mp for one, two or
multiple page ranges (when defined) */
Local void
#if STDC
flush_line(int print)
# else
flush_line(print)
int print;
#endif
{
char *tmp;
if((tmp = (char *) calloc(1, sizeof(buff))) == NULL)
Fatal("Not enough core...abort.\n");
if(page_diff(begin, end) != 0)
if(encap_range || (page_diff(begin, prev) > (*suffix_2p ? 0 : 1)))
{
int diff = page_diff(begin, end);
if((diff == 1) && *suffix_2p)
sprintf(buff, "%s%s", begin->lpg, suffix_2p);
else if((diff == 2) && *suffix_3p)
sprintf(buff, "%s%s", begin->lpg, suffix_3p);
else if((diff >= 2) && *suffix_mp)
sprintf(buff, "%s%s", begin->lpg, suffix_mp);
else
sprintf(buff, "%s%s%s", begin->lpg, delim_r, end->lpg);
encap_range = False;
}
else
sprintf(buff, "%s%s%s", begin->lpg, delim_n, end->lpg);
else
{
encap_range = False; /* might be true from page range on same page */
strcpy(buff, begin->lpg);
}
if(*prev_encap != EOS)
{
strcpy(tmp, buff);
sprintf(buff, "%s%s%s%s%s", encap_p, prev_encap, encap_i, tmp, encap_s);
}
wrap_line(print);
free(tmp);
}
Local void
#if STDC
wrap_line(int print)
# else
wrap_line(print)
int print;
#endif
{
int len;
len = strlen(line) + strlen(buff) + ind_indent;
if(print)
{
if(len > linemax)
{
fputs(line, ind_fp);
fputc('\n', ind_fp);
ind_lc++;
fputs(indent_space, ind_fp);
ind_indent = indent_length;
}
else
fputs(line, ind_fp);
fputs(buff, ind_fp);
}
else
{
if(len > linemax)
{
fputs(line, ind_fp);
fputc('\n', ind_fp);
ind_lc++;
sprintf(line, "%s%s%s", indent_space, buff, delim_n);
ind_indent = indent_length;
}
else
{
strcat(buff, delim_n);
strcat(line, buff);
}
}
}
Local void
insert_page(VOID_ARG)
{
int i = 0;
int j = 0;
int page = 0;
if(even_odd >= 0)
{
/* find the rightmost digit */
while(pageno[i++] != EOS)
;
j = --i;
/* find the leftmost digit */
while(isdigit(pageno[--i]) && i > 0)
;
if(!isdigit(pageno[i]))
i++;
/* convert page from literal to numeric */
page = strtoint(&pageno[i]) + 1;
/* check even-odd numbering */
if(((even_odd == 1) && (page % 2 == 0)) ||
((even_odd == 2) && (page % 2 == 1)))
page++;
pageno[j + 1] = EOS;
/* convert page back to literal */
while(page >= 10)
{
pageno[j--] = DIGTOASCII(page % 10);
page = page / 10;
}
pageno[j] = DIGTOASCII(page);
if(i < j)
{
while(pageno[j] != EOS)
pageno[i++] = pageno[j++];
pageno[i] = EOS;
}
}
fputs(setpage_open, ind_fp);
fputs(pageno, ind_fp);
fputs(setpage_close, ind_fp);
ind_lc += setpagelen;
}
Local void
Ind_Error(const char *fmt, ...)
{
va_list arg_ptr;
va_start(arg_ptr, fmt);
if(idx_dot)
{
fprintf(ilg_fp, "\n");
idx_dot = False;
}
fprintf(ilg_fp,
#if KCC_20
"## Warning (input = %s, line = %d; output = %s, line = %d):\n\040\040 -- ",
#else
"## Warning (input = %s, line = %d; output = %s, line = %d):\n -- ",
#endif
curr->fn, curr->lc, ind_fn, ind_lc + 1);
vfprintf(ilg_fp, fmt, arg_ptr);
va_end(arg_ptr);
ind_ec++;
}

View File

@ -1,507 +0,0 @@
{% raw %}
#include "mkind.h"
#ifdef DEBUG
language Language = DEFAULT_LANGUAGE;
#endif
#define CCCC 8
#define LF 10
#define CR 13
#define IS_UPPER 0x01
#define IS_LOWER 0x02
#define IS_BLANK 0x04
#define IS_DIG 0x08
#define IS_XDIG 0x10
#define IS_CTR 0x20
#define IS_ALPH 0x40
#define IS_ALPHA (IS_LOWER | IS_UPPER)
#define IS_ALNUM (IS_DIG | IS_ALPHA)
#include "pl_maz.h"
#include "pl_iso2.h"
#include "pl_1250.h"
#include "pl_852.h"
#include "us_eng.h"
Public struct _multilanguage multilanguage[] =
{
{
&us_day_name_ptr,
&us_day_name_ptr_a,
&us_mon_name_ptr,
&us_mon_name_ptr_a,
&us_toascii_table,
&us_lower_table,
&us_upper_table,
&us_char_type,
&us_order_tbl,
0,
NULL,
"english",
"US english",
NULL
},
{
&pl_maz_day_name_ptr,
&pl_maz_day_name_ptr_a,
&pl_maz_mon_name_ptr,
&pl_maz_mon_name_ptr_a,
&pl_maz_toascii_table,
&pl_maz_lower_table,
&pl_maz_upper_table,
&pl_maz_char_type,
&pl_maz_order_tbl,
0,
Decode_Number,
(char *)"PL-mazowia",
(char *)"Polish mazowia",
NULL
},
{
&pl_iso2_day_name_ptr,
&pl_iso2_day_name_ptr_a,
&pl_iso2_mon_name_ptr,
&pl_iso2_mon_name_ptr_a,
&pl_iso2_toascii_table,
&pl_iso2_lower_table,
&pl_iso2_upper_table,
&pl_iso2_char_type,
&pl_iso2_order_tbl,
0,
Decode_Number,
"PL-latin2",
"Polish ISO-8859-2 (Latin2)",
NULL
},
{
&pl_cp1250_day_name_ptr,
&pl_cp1250_day_name_ptr_a,
&pl_cp1250_mon_name_ptr,
&pl_cp1250_mon_name_ptr_a,
&pl_cp1250_toascii_table,
&pl_cp1250_lower_table,
&pl_cp1250_upper_table,
&pl_cp1250_char_type,
&pl_cp1250_order_tbl,
0,
Decode_Number,
"PL-cp1250",
"Polish cp1250 (MS Windows)",
NULL
},
{
&pl_cp852_day_name_ptr,
&pl_cp852_day_name_ptr_a,
&pl_cp852_mon_name_ptr,
&pl_cp852_mon_name_ptr_a,
&pl_cp852_toascii_table,
&pl_cp852_lower_table,
&pl_cp852_upper_table,
&pl_cp852_char_type,
&pl_cp852_order_tbl,
0,
Decode_Number,
"PL-cp852",
"Polish cp852 (IBM Latin2)",
NULL
},
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL,
NULL,
NULL
}
};
Public int
isalnum(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_ALNUM);
}
Public int
isalpha(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_ALPHA);
}
Public int
isascii(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_ALNUM);
}
Public int
iscntrl(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_CTR);
}
Public int
isdigit(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_DIG);
}
Public int
isgraph(unsigned char ch)
{
return(((*(multilanguage[Language].char_type))[ch] & IS_ALNUM) ||
(ch >= '!' && ch <= 0x7e));
}
Public int
islower(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_LOWER);
}
Public int
isupper(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_UPPER);
}
Public int
isxdigit(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_XDIG);
}
Public int
isprint(unsigned char ch)
{
return(((*(multilanguage[Language].char_type))[ch] & IS_ALNUM) ||
((ch >= ' ') && (ch <= 0x7e)));
}
Public int
ispunct(unsigned char ch)
{
return(!((*(multilanguage[Language].char_type))[ch] &
(IS_BLANK | IS_ALNUM | IS_CTR)));
}
Public int
isspace(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_BLANK);
}
Public int
isblank(unsigned char ch)
{
return((*(multilanguage[Language].char_type))[ch] & IS_BLANK);
}
Public unsigned char
mytoupper(unsigned char ch)
{
if((*(multilanguage[Language].char_type))[ch] & IS_LOWER)
return((*(multilanguage[Language].upper_table))[ch - 'a']);
else
return(ch);
}
Public unsigned char
mytolower(unsigned char ch)
{
if((*(multilanguage[Language].char_type))[ch] & IS_UPPER)
return((*(multilanguage[Language].lower_table))[ch - 'A']);
else
return(ch);
}
Public unsigned char *
strupr(unsigned char *s)
{
register unsigned char *ss;
ss = s;
while(*ss)
{
if((*(multilanguage[Language].char_type))[*ss] & IS_LOWER)
*ss = (*(multilanguage[Language].upper_table))[*ss - 'a'];
ss++;
}
return(s);
}
Public unsigned char *
strlwr(unsigned char *s)
{
register unsigned char *ss;
ss = s;
while(*ss)
{
if((*(multilanguage[Language].char_type))[*ss] & IS_UPPER)
*ss = (*(multilanguage[Language].lower_table))[*ss - 'A'];
ss++;
}
return(s);
}
Public int
mystrncmp(const unsigned char *s, const unsigned char *d, size_t n)
{
while(*s && *d && *s == *d && (n > 0))
s++, d++, n--;
if(n == 0)
return(0);
else
return((*(multilanguage[Language].order_tbl))[(unsigned char)*s] -
(*(multilanguage[Language].order_tbl))[(unsigned char)*d]);
}
Public int
mystrcmp(const unsigned char *s, const unsigned char *d)
{
while(*s && *d && *s == *d)
s++, d++;
return((*(multilanguage[Language].order_tbl))[(unsigned char)*s] -
(*(multilanguage[Language].order_tbl))[(unsigned char)*d]);
}
Public int
charcmp(unsigned char s, unsigned char d)
{
return((*(multilanguage[Language].order_tbl))[s] -
(*(multilanguage[Language].order_tbl))[d]);
}
Public const char_u *
day_name(int day)
{
return((*multilanguage[Language].day_name_ptr)[day]);
}
Public const char_u *
day_name_a(int day)
{
return((*multilanguage[Language].day_name_ptr_a)[day]);
}
Public const char_u *
month_name(int month)
{
return((*multilanguage[Language].mon_name_ptr)[month]);
}
Public const char_u *
month_name_a(int month)
{
return((*multilanguage[Language].mon_name_ptr_a)[month]);
}
Public int
strnicmp(const unsigned char *s, const unsigned char *d, size_t n)
{
while(*s && *d && mytolower(*s) == mytolower(*d) && (n > 0))
s++, d++, n--;
if(n == 0)
return(0);
else
return((*(multilanguage[Language].order_tbl))[*s] -
(*(multilanguage[Language].order_tbl))[*d]);
}
Public int
strncasecmp(const unsigned char *s, const unsigned char *d, size_t n)
{
while(*s && *d && mytolower(*s) == mytolower(*d) && (n > 0))
s++, d++, n--;
if(n == 0)
return(0);
else
return((*(multilanguage[Language].order_tbl))[*s] -
(*(multilanguage[Language].order_tbl))[*d]);
}
Public int
stricmp(const unsigned char *s, const unsigned char *d)
{
while(*s && *d && mytolower(*s) == mytolower(*d))
s++, d++;
return((*(multilanguage[Language].order_tbl))[*s] -
(*(multilanguage[Language].order_tbl))[*d]);
}
Public int
strcasecmp(const unsigned char *s, const unsigned char *d)
{
while(*s && *d && mytolower(*s) == mytolower(*d))
s++, d++;
return((*(multilanguage[Language].order_tbl))[*s] -
(*(multilanguage[Language].order_tbl))[*d]);
}
Public unsigned char *
mystrchr(unsigned char *s, unsigned char c)
{
if(c == 0)
return(s + strlen((char *)s));
while(*s)
{
if (*s == c)
return(s);
s++;
}
return(NULL);
}
Public unsigned char *
mystrrchr(unsigned char *s, unsigned char c)
{
unsigned char *ss = s + strlen((char *)s);
while (ss >= s)
{
if (*ss == c)
return(ss);
ss--;
}
return(NULL);
}
Public int
toascii(unsigned char c)
{
if(c > 127)
return((*(multilanguage[Language].toascii_table))[c - 128]);
else
return(c);
}
Public int
set_lang(char *lang_name)
{
int i;
for(i = 0; multilanguage[i].id != NULL;)
{
if(mystrcmp((unsigned char *)multilanguage[i].id,
(unsigned char *)lang_name) == 0)
break;
i++;
}
if(multilanguage[i].id == NULL)
return(1);
Language = (language)i;
return(0);
}
Public char *
get_lang_id()
{
return(multilanguage[Language].name);
}
#ifdef DEBUG
void
test(unsigned char c1, unsigned char c2)
{
if(charcmp(c1, c2) < 0)
printf("%c < %c (%d)\n", c1, c2, charcmp(c1, c2));
else if(charcmp(c1, c2) == 0)
printf("%c == %c (%d)\n", c1, c2, charcmp(c1, c2));
else
printf("%c > %c (%d)\n", c1, c2, charcmp(c1, c2));
}
#include <stdio.h>
void
main(int argc, char *argv[])
{
int i;
Language = PL_latin2;
printf("%d\n", Language);
for(i = 1; i < 256; i++)
printf("%d %c - %d %d\n", i, i, islower(i), isupper(i));
printf("%c %c\n", '\0xB1', mytoupper('\0xB1'));
printf("%c %c\n", '\0xE6', mytoupper('\0xE6'));
printf("%c %c\n", '\0xEA', mytoupper('\0xEA'));
printf("%c %c\n", '\0xB3', mytoupper('\0xB3'));
printf("%c %c\n", '\0xF1', mytoupper('\0xF1'));
printf("%c %c\n", '\0xF3', mytoupper('\0xF3'));
printf("%c %c\n", '\0xB6', mytoupper('\0xB6'));
printf("%c %c\n", '\0xBC', mytoupper('\0xBC'));
printf("%c %c\n", '\0xBF', mytoupper('\0xBF'));
printf("%c %c\n", '\0xA1', mytolower('\0xA1'));
printf("%c %c\n", '\0xC6', mytolower('\0xC6'));
printf("%c %c\n", '\0xCA', mytolower('\0xCA'));
printf("%c %c\n", '\0xA3', mytolower('\0xA3'));
printf("%c %c\n", '\0xD1', mytolower('\0xD1'));
printf("%c %c\n", '\0xD3', mytolower('\0xD3'));
printf("%c %c\n", '\0xA6', mytolower('\0xA6'));
printf("%c %c\n", '\0xAC', mytolower('\0xAC'));
printf("%c %c\n", '\0xAF', mytolower('\0xAF'));
printf("%x %x\n", (*(multilanguage[Language].order_tbl))[(unsigned char)'\0xF3'],
(*(multilanguage[Language].order_tbl))[(unsigned char)'\0xD3']);
printf("%x %x\n", (*(multilanguage[Language].order_tbl))[(unsigned char)'\0xB6'],
(*(multilanguage[Language].order_tbl))[(unsigned char)'\0xA6']);
}
#endif
{% endraw %}

View File

@ -1,52 +0,0 @@
enum _language {English, PL_mazowia, PL_latin2, PL_cp1250, PL_cp852};
typedef enum _language language;
Global language Language;
#define EOS '\0'
#define EMPTY_STRING (unsigned char *)""
#define TAB '\t'
#define LFD '\n'
#define SPC ' '
#define LSQ '['
#define RSQ ']'
#define BSH '\\'
struct decode
{
p_char_u *jedn;
p_char_u *dies;
p_char_u *setki;
p_char_u *tys;
p_char_u *mil;
};
struct _multilanguage
{
p_char_u *day_name_ptr;
p_char_u *day_name_ptr_a;
p_char_u *mon_name_ptr;
p_char_u *mon_name_ptr_a;
int_u *toascii_table;
a_char_u *lower_table;
a_char_u *upper_table;
a_char_u *char_type;
int_u *order_tbl;
word flags;
char_u *(*_special)(const long);
char *id;
char *name;
struct decode *decode;
};
Global struct _multilanguage multilanguage[];
Global char_u *Decode_Number(const long liczba);
#define SPECIAL_FLAG 0001
Global const char_u *month_name(int month);
Global const char_u *month_name_a(int month);
Global const char_u *day_name_a(int day);
Global const char_u *day_name(int day);

View File

@ -1,36 +0,0 @@
CC = gcc
O = .o
X = .exe
XCFLAGS= -O2 -g -m486 -pedantic -DDEFAULT_LANGUAGE=PL_mazowia
LIBS =
CFLAGS= -DOS_PCDOS $(XCFLAGS)
LDFLAGS = -g
HDRS = mkind.h scanid.h scanst.h
OBJS = genind$(O) qsort$(O) mkind$(O) scanid$(O) scanst$(O) \
sortid$(O) decode_n$(O) language$(O)
SRCS = genind.c mkind.c scanid.c scanst.c qsort.c sortid.c decode_n.c\
language.c
PROGRAM = plmindex.exe
.c.obj:
$(CC) $(CFLAGS) $*.c
$(PROGRAM): $(OBJS) $(MAKEFILE)
echo >mk.rf $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
$(CC) @mk.rf
del mk.rf
genind$(O): genind.c mkind.h
mkind$(O): mkind.c mkind.h
qsort$(O): qsort.c mkind.h
scanid$(O): scanid.c mkind.h scanid.h
scanst$(O): scanst.c mkind.h scanst.h
sortid$(O): sortid.c mkind.h
language$(O): pl_maz.h pl_iso2.h us_eng.h pl_1250.h pl_852.h mkind.h
mkind.h: myctype.h

View File

@ -1,40 +0,0 @@
CC = gcc
O = .o
X = .exe
XCFLAGS= -O2 -g -m486 -pedantic -DDEFAULT_LANGUAGE=PL_mazowia
LIBS =
CFLAGS= -DOS_PCDOS $(XCFLAGS)
LDFLAGS = -g
HDRS = mkind.h scanid.h scanst.h
MAKEFILE = Makefile
OBJS = genind$(O) qsort$(O) mkind$(O) scanid$(O) scanst$(O) \
sortid$(O) decode_n$(O) language$(O)
SRCS = genind.c mkind.c scanid.c scanst.c qsort.c sortid.c decode_n.c\
language.c
PROGRAM = plmindex
.c.obj:
$(CC) $(CFLAGS) $*.c
plmindex.exe : plmindex
emxbind plmindex
$(PROGRAM): $(OBJS) $(MAKEFILE)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
genind$(O): genind.c mkind.h
mkind$(O): mkind.c mkind.h
qsort$(O): qsort.c mkind.h
scanid$(O): scanid.c mkind.h scanid.h
scanst$(O): scanst.c mkind.h scanst.h
sortid$(O): sortid.c mkind.h
language$(O): pl_maz.h pl_iso2.h us_eng.h pl_1250.h pl_852.h mkind.h
mkind.h: myctype.h

View File

@ -1,37 +0,0 @@
CC = gcc
O = .o
X =
XCFLAGS= -unsigned-char -O2 -g -pedantic -DDEFAULT_LANGUAGE=PL_latin2
LIBS =
CFLAGS= $(XCFLAGS)
LDFLAGS = -g
HDRS = mkind.h scanid.h scanst.h
MAKEFILE = makefile.gcc
OBJS = genind$(O) qsort$(O) mkind$(O) scanid$(O) scanst$(O) \
sortid$(O) decode_n$(O) language$(O)
SRCS = genind.c mkind.c scanid.c scanst.c qsort.c sortid.c decode_n.c\
language.c
PROGRAM = plmindex
.c.o:
$(CC) -c $(CFLAGS) $*.c
$(PROGRAM): $(OBJS) $(MAKEFILE)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
genind$(O): genind.c mkind.h
mkind$(O): mkind.c mkind.h
qsort$(O): qsort.c mkind.h
scanid$(O): scanid.c mkind.h scanid.h
scanst$(O): scanst.c mkind.h scanst.h
sortid$(O): sortid.c mkind.h
language$(O): pl_maz.h pl_iso2.h us_eng.h pl_1250.h pl_852.h mkind.h
mkind.h: myctype.h

View File

@ -1,36 +0,0 @@
CC = cl
O = .obj
X = .exe
XCFLAGS= -DDEFAULT_LANGUAGE=PL_cp1250 -c
LIBS =
CFLAGS= -DOS_PCDOS $(XCFLAGS)
LDFLAGS =
HDRS = mkind.h scanid.h scanst.h
OBJS = genind$(O) qsort$(O) mkind$(O) scanid$(O) scanst$(O) \
sortid$(O) decode_n$(O) language$(O)
SRCS = genind.c mkind.c scanid.c scanst.c qsort.c sortid.c decode_n.c\
language.c
PROGRAM = plmindex.exe
.c.obj:
$(CC) $(CFLAGS) $*.c
$(PROGRAM): $(OBJS) $(MAKEFILE)
echo >mk.rf $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
$(CC) @mk.rf
del mk.rf
genind$(O): genind.c mkind.h
mkind$(O): mkind.c mkind.h
qsort$(O): qsort.c mkind.h
scanid$(O): scanid.c mkind.h scanid.h
scanst$(O): scanst.c mkind.h scanst.h
sortid$(O): sortid.c mkind.h
language$(O): pl_maz.h pl_iso2.h us_eng.h pl_1250.h pl_852.h mkind.h
mkind.h: myctype.h

View File

@ -1,743 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
*
* Author:
* Pehong Chen
* Chen & Harrison International Systems, Inc.
* Palo Alto, California
* USA
* (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
*
* Contributors:
* Please refer to the CONTRIB file that comes with this release
* for a list of people who have contributed to this and/or previous
* release(s) of MakeIndex.
*
* All rights reserved by the copyright holders. See the copyright
* notice distributed with this software for a complete description of
* the conditions under which it is made available.
*
*/
#define MKIND_C 1
#include "mkind.h"
#undef MKIND_C
#include <stdarg.h>
Public language Language = DEFAULT_LANGUAGE;
Public Logical blank_ignore = False;
Public Logical special_flag = False;
Public Logical compress_blanks = False;
Public Logical merge_page = True;
Public Logical init_page = False;
Public int even_odd = -1;
Public Logical verbose = True;
Public int fn_no = -1; /* total number of files */
Public Logical idx_dot = True; /* flag which shows dot in ilg being
* active */
Public int idx_tt = 0; /* total entry count (all files) */
Public int idx_et = 0; /* erroneous entry count (all files) */
Public int idx_gt = 0; /* good entry count (all files) */
Public FIELD_PTR *idx_key;
Public FILE *log_fp;
Public FILE *sty_fp;
Public FILE *idx_fp;
Public FILE *ind_fp;
Public FILE *ilg_fp;
Public char *pgm_fn;
Public char sty_fn[LINE_MAX];
Public char *idx_fn;
Public char ind[STRING_MAX];
Public char *ind_fn;
Public char ilg[STRING_MAX];
Public char *ilg_fn;
Public char pageno[NUMBER_MAX];
Local char log_fn[STRING_MAX];
Local char base[STRING_MAX];
Local Logical need_version = True;
Local void check_all (char *fn, Logical ind_given, Logical ilg_given,
Logical log_given);
Local void check_idx (char *fn,int open_fn);
Local void find_pageno (void);
Local void open_sty (char *fn);
Local void prepare_idx (void);
Local void process_idx (char * *fn, Logical use_stdin,
Logical sty_given, Logical ind_given, Logical ilg_given,
Logical log_given);
#if OS_ATARI
Public long _stksize = 20000L; /* make the stack larger than 2KB */
/* size must be given */
#endif /* OS_ATARI */
#ifdef DEBUG
Public long totmem = 0L; /* for debugging memory usage */
#endif /* DEBUG */
Public int
main(int argc, char *argv[])
{
char **fns;
char *ap;
Logical use_stdin = False;
Logical sty_given = False;
Logical ind_given = False;
Logical ilg_given = False;
Logical log_given = False;
/* determine program name */
if((fns = (char **) calloc(sizeof(*fns), ARRAY_MAX)) == NULL)
Fatal("Not enough core...abort.\n");
#if(OS_ATARI | OS_VAXVMS | OS_MVSXA | OS_VMCMS)
pgm_fn = "MakeIndex"; /* Use symbolic name on some systems */
#else
#if OS_PCDOS
{
char *last = NULL,
*beg;
pgm_fn = argv[0];
for(beg = pgm_fn; *beg != EOS; beg++)
{
if(*beg == ':' || *beg == '/' || *beg == '\\')
last = beg;
}
if(last++ != NULL)
{
char *beg = pgm_fn;
while(*beg++ = *last++)
;
}
last = (char *)mystrrchr((unsigned char *)pgm_fn, (unsigned char)('.'));
if(last != NULL)
*last = EOS;
}
(void)strlwr((unsigned char *)pgm_fn);
#else
pgm_fn = (char *)mystrrchr((unsigned char *)*argv, (unsigned char)DIR_DELIM);
if(pgm_fn == NULL)
pgm_fn = *argv;
else
pgm_fn++;
#endif /* OS_PCDOS */
#endif /* OS_VAXVMS | OS_MVSXA */
/* process command line options */
while(--argc > 0)
{
if(**++argv == SW_PREFIX)
{
if(*(*argv + 1) == EOS)
break;
for(ap = ++*argv; *ap != EOS; ap++)
switch(*ap)
{
case '!':
special_flag = True;
break;
case 'l':
blank_ignore = True;
break;
/* use standard input */
case 'i':
case 'I':
use_stdin = True;
break;
/* disable range merge */
case 'r':
case 'R':
merge_page = False;
break;
/* supress progress message -- quiet mode */
case 'q':
case 'Q':
verbose = False;
break;
/* compress blanks */
case 'c':
case 'C':
compress_blanks = True;
break;
/* style file */
case 's':
case 'S':
argc--;
if(argc <= 0)
Fatal("Expected -s <stylefile>\n");
open_sty(*++argv);
sty_given = True;
break;
/* output index file name */
case 'o':
case 'O':
argc--;
if(argc <= 0)
Fatal("Expected -o <ind>\n");
ind_fn = *++argv;
ind_given = True;
break;
/* transcript file name */
case 't':
case 'T':
argc--;
if(argc <= 0)
Fatal("Expected -t <logfile>\n");
ilg_fn = *++argv;
ilg_given = True;
break;
case 'L':
{
int i;
char *lang_name;
argc--;
if(argc <= 0)
Fatal("Expected -L <language>\n");
lang_name = *++argv;
for(i = 0; multilanguage[i].id != NULL;)
{
if(mystrcmp((unsigned char *)(multilanguage[i].id),
(unsigned char *)lang_name) == 0)
break;
i++;
}
if(multilanguage[i].id == NULL)
Fatal("Illegal language\n");
Language = (language)i;
}
break;
/* initial page */
case 'p':
case 'P':
argc--;
if(argc <= 0)
Fatal("Expected -p <num>\n");
strcpy(pageno, *++argv);
init_page = True;
if(STREQ(pageno, EVEN))
{
log_given = True;
even_odd = 2;
}
else if(STREQ(pageno, ODD))
{
log_given = True;
even_odd = 1;
}
else if(STREQ(pageno, ANY))
{
log_given = True;
even_odd = 0;
}
break;
case 'h':
case 'H':
case '?':
usage(pgm_fn);
return(1);
/* bad option */
default:
Fatal("Unknown option -%c.\n", *ap);
break;
}
}
else
{
if(fn_no < ARRAY_MAX)
{
check_idx(*argv, False);
fns[++fn_no] = *argv;
}
else
Fatal("Too many input files (max %d).\n", ARRAY_MAX);
}
}
if(special_flag)
multilanguage[Language].flags |= SPECIAL_FLAG;
/* changes for 2.12 (May 20, 1993) by Julian Reschke (jr@ms.maus.de):
if only one input file and no explicit style file was given */
if(fn_no == 0 && !sty_given)
{
char tmp[STRING_MAX + 5];
/* base set by last call to check_idx */
sprintf(tmp, "%s%s", base, INDEX_STY);
if(0 == access(tmp, R_OK))
{
open_sty (tmp);
sty_given = True;
}
}
process_idx(fns, use_stdin, sty_given, ind_given, ilg_given, log_given);
idx_gt = idx_tt - idx_et;
if(fn_no > 0)
Message("Overall %d files read (%d entries accepted, %d rejected).\n", \
fn_no + 1, idx_gt, idx_et);
if(idx_gt > 0)
{
prepare_idx();
sort_idx();
gen_ind();
/*{
NODE_PTR aqq;
int i = 0;
int j = 0;
aqq = head;
do
{
printf("type=%d\n", aqq->data.type);
for(i = 0; i < FIELD_MAX; i++)
if(aqq->data.sf[i][0] != EOS)
printf("%s\n", aqq->data.sf[i]);
aqq = aqq->next;
}while(aqq != NULL);
for(j = 0; j < idx_gt; j++)
{
printf("type=%d\n", idx_key[j]->type);
for(i = 0; i < FIELD_MAX; i++)
if(idx_key[j]->sf[i][0] != EOS)
printf("%s\n", idx_key[j]->sf[i]);
}
}*/
Message("Output written in %s.\n", ind_fn);
}
else
Message("Nothing written in %s.\n", ind_fn);
Message("Transcript written in %s.\n", ilg_fn);
CLOSE(ind_fp);
CLOSE(ilg_fp);
free(fns);
return(0);
}
Local void
prepare_idx(VOID_ARG)
{
NODE_PTR ptr = head;
int i = 0;
#ifdef DEBUG
totmem += idx_gt * sizeof(FIELD_PTR);
(void)fprintf(stderr,"prepare_idx(): calloc(%d,%d)\ttotmem = %ld\n",
idx_gt,sizeof(FIELD_PTR),totmem);
#endif /* DEBUG */
if(head == (NODE_PTR)NULL)
Fatal("No valid index entries collected.\n");
if((idx_key = (FIELD_PTR *) calloc(idx_gt, sizeof(FIELD_PTR))) == NULL)
Fatal("Not enough core...abort.\n");
for(i = 0; i < idx_gt; i++)
{
idx_key[i] = &(ptr->data);
ptr = ptr->next;
}
}
Local void
process_idx(char *fn[], Logical use_stdin, Logical sty_given, Logical ind_given,
Logical ilg_given, Logical log_given)
{
int i;
if(fn_no == -1)
/* use stdin if no input files specified */
use_stdin = True;
else
{
check_all(fn[0], ind_given, ilg_given, log_given);
PUT_VERSION;
if(sty_given)
scan_sty();
scan_idx();
ind_given = True;
ilg_given = True;
for(i = 1; i <= fn_no; i++)
{
check_idx(fn[i], True);
scan_idx();
}
}
if(use_stdin)
{
idx_fn = "stdin";
idx_fp = stdin;
if(ind_given)
{
if(!ind_fp && ((ind_fp = OPEN_OUT(ind_fn)) == NULL))
Fatal("Can't create output index file %s.\n", ind_fn);
}
else
{
ind_fn = "stdout";
ind_fp = stdout;
}
if(ilg_given)
{
if(!ilg_fp && ((ilg_fp = OPEN_OUT(ilg_fn)) == NULL))
Fatal("Can't create transcript file %s.\n", ilg_fn);
}
else
{
ilg_fn = "stderr";
ilg_fp = stderr;
}
if((fn_no == -1) && (sty_given))
scan_sty();
if(need_version)
{
PUT_VERSION;
}
scan_idx();
fn_no++;
}
}
Local void
check_idx(char *fn, int open_fn)
{
char *ptr = fn;
char *ext;
int with_ext = False;
int i = 0;
ext = (char *)mystrrchr((unsigned char *)fn, (unsigned char)EXT_DELIM);
if((ext != NULL) && (ext != fn) && (*(ext + 1) != DIR_DELIM))
{
with_ext = True;
while((ptr != ext) && (i < STRING_MAX))
base[i++] = *ptr++;
}
else
while((*ptr != EOS) && (i < STRING_MAX))
base[i++] = *ptr++;
if(i < STRING_MAX)
base[i] = EOS;
else
Fatal("Index file name %s too long (max %d).\n", base, STRING_MAX);
idx_fn = fn;
if((open_fn && ((idx_fp = OPEN_IN(idx_fn)) == NULL)) ||
((!open_fn) && (access(idx_fn, R_OK) != 0)))
if(with_ext)
Fatal("Input index file %s not found.\n", idx_fn);
else
{
#ifdef DEBUG
totmem += STRING_MAX;
(void)fprintf(stderr,"check_idx()-2: malloc(%d)\ttotmem = %ld\n",
STRING_MAX,totmem);
#endif /* DEBUG */
if((idx_fn = (char *) malloc(STRING_MAX)) == NULL)
Fatal("Not enough core...abort.\n");
sprintf(idx_fn, "%s%s", base, INDEX_IDX);
if((open_fn && ((idx_fp = OPEN_IN(idx_fn)) == NULL)) ||
((!open_fn) && (access(idx_fn, R_OK) != 0)))
Fatal("Couldn't find input index file %s or %s.\n", base,
idx_fn);
}
}
Local void
check_all(char *fn, Logical ind_given, Logical ilg_given, Logical log_given)
{
check_idx(fn, True);
/* index output file */
if(!ind_given)
{
sprintf(ind, "%s%s", base, INDEX_IND);
ind_fn = ind;
}
if((ind_fp = OPEN_OUT(ind_fn)) == NULL)
Fatal("Can't create output index file %s.\n", ind_fn);
/* index transcript file */
if(!ilg_given)
{
sprintf(ilg, "%s%s", base, INDEX_ILG);
ilg_fn = ilg;
}
if((ilg_fp = OPEN_OUT(ilg_fn)) == NULL)
Fatal("Can't create transcript file %s.\n", ilg_fn);
if(log_given)
{
sprintf(log_fn, "%s%s", base, INDEX_LOG);
#if OS_PCDOS /* open in binary mode (CR-LF) */
if((log_fp = OPEN_IN_B(log_fn)) == NULL)
#else
if((log_fp = OPEN_IN(log_fn)) == NULL)
#endif /* OS_PCDOS */
Fatal("Source log file %s not found.\n", log_fn);
else
{
find_pageno();
CLOSE(log_fp);
}
}
}
Local void
find_pageno(VOID_ARG)
{
int i = 0;
unsigned char p,
c;
#if(OS_VAXVMS | OS_MVSXA)
/*
* Scan forward through the file for VMS, because fseek doesn't work on
* variable record files
*/
c = GET_CHAR(log_fp);
while(c != EOF)
{
p = c;
c = GET_CHAR(log_fp);
if(p == LSQ && isdigit(c))
{
i = 0;
do
{
pageno[i++] = c;
c = GET_CHAR(log_fp);
} while(isdigit(c));
pageno[i] = EOS;
}
}
if(i == 0)
{
fprintf(ilg_fp, "Couldn't find any page number in %s...ignored\n",
log_fn);
init_page = False;
}
#else /* NOT (OS_VAXVMS | ...) */
fseek(log_fp, -1L, 2);
p = GET_CHAR(log_fp);
fseek(log_fp, -2L, 1);
do
{
c = p;
p = GET_CHAR(log_fp);
}while(!(((p == LSQ) && isdigit(c)) || (fseek(log_fp, -2L, 1) != 0)));
if(p == LSQ)
{
while((c = GET_CHAR(log_fp)) == SPC);
do
{
pageno[i++] = (char) c;
c = GET_CHAR(log_fp);
} while(isdigit(c));
pageno[i] = EOS;
}
else
{
fprintf(ilg_fp, "Couldn't find any page number in %s...ignored\n",
log_fn);
init_page = False;
}
#endif /* (OS_VAXVMS | ...) */
}
Local void
open_sty(char *fn)
{
char *path;
char *local_fn;
char *ptr;
int i;
int len;
if((local_fn = (char *)malloc(LINE_MAX)) == NULL)
Fatal("Not enough core...abort.\n");
strcpy(local_fn, fn);
if((mystrrchr((unsigned char *)local_fn, (unsigned char)'.') == NULL) &&
(strlen(local_fn) + 4) < LINE_MAX)
strcat(local_fn, INDEX_STY);
if((path = getenv(STYLE_PATH)) == NULL)
{
/* style input path not defined */
strcpy(sty_fn, local_fn);
sty_fp = OPEN_IN(sty_fn);
}
else
{
#if OS_VAXVMS
if((strlen(STYLE_PATH) + strlen(local_fn) + 1) > LINE_MAX)
Fatal("Path %s too long (max %d).\n", STYLE_PATH, LINE_MAX);
else
{
sprintf(sty_fn, "%s:%s", STYLE_PATH, local_fn);
sty_fp = OPEN_IN(sty_fn);
}
#else /* NOT OS_VAXVMS */
len = LINE_MAX - strlen(local_fn) - 1;
while(*path != EOS)
{
ptr = (char *)mystrchr((unsigned char *)path,
(unsigned char)ENV_SEPAR);
i = 0;
if(ptr == (char*)NULL)
{
int j = strlen(path);
while(i < j)
sty_fn[i++] = *path++;
}
else
{
while((path != ptr) && (i < len))
sty_fn[i++] = *path++;
}
if(i == len)
Fatal("Path %s too long (max %d).\n", sty_fn, LINE_MAX);
else
{
#ifdef OS_VAXVMS
if(sty_fn[i - 1] != ']')
sty_fn[i++] = DIR_DELIM;
#else
sty_fn[i++] = DIR_DELIM;
#endif
sty_fn[i] = EOS;
strcat(sty_fn, local_fn);
if((sty_fp = OPEN_IN(sty_fn)) == NULL)
path++;
else
break;
}
}
#endif /* OS_VAXVMS */
}
if(sty_fp == NULL)
Fatal("Index style file %s not found.\n", local_fn);
free(local_fn);
}
Public int
strtoint(char *str)
{
int val = 0;
while(*str != EOS)
{
#if (OS_MVSXA)
val = 10 * val + *str - '0';
#else
val = 10 * val + *str - 48;
#endif /* (OS_MVSXA) */
str++;
}
return(val);
}
Public void
usage(char *program_name)
{
int i;
fprintf(stderr,
"Usage: \n %s [<opt>] [-s <sty>] [-o <ind>] [-t <log>] [-p <num>] "\
"[<idx0> ...]\n"\
"\t<opt> = -l - ignore interword space\n"\
"\t -i - use standard input (stdin) as input file\n"\
"\t -q - quiet mode\n"\
"\t -r - disable range merge\n"\
"\t -c - compress blanks\n"\
"\t -L <lang> - language\n",
program_name);
fprintf(stderr, "\t\t\t\t<lang> - %s\n", multilanguage[0].id);
for(i = 1; multilanguage[i].id != NULL; i++)
fprintf(stderr, "\t\t\t\t - %s\n", multilanguage[i].id);
fprintf(stderr,
"\t\t-s <sty> - style file (default extension .mst)\n"\
"\t\t-o <ind> - output file (default extension .ind)\n"\
"\t\t-t <log> - log file (default extension .ilg)\n"\
"\t\t-p <num> - starting page count \n"\
"\t\t\t\t<num> - <number>\n"\
"\t\t\t\t - odd\n"\
"\t\t\t\t - even\n"\
"\t\t\t\t - any\n"\
"\t\t <idx0> - source file (index; default extension .idx)\n");
}
Public void
Fatal(const char *fmt, ...)
{
va_list arg_ptr;
va_start(arg_ptr, fmt);
vfprintf(stderr, fmt, arg_ptr);
va_end(arg_ptr);
EXIT(1);
}
Public void
Message(const char *fmt, ...)
{
va_list arg_ptr;
va_start(arg_ptr, fmt);
if(verbose)
vfprintf(stderr, fmt, arg_ptr);
if((ilg_fp != stderr) || !verbose)
vfprintf(ilg_fp, fmt, arg_ptr);
va_end(arg_ptr);
}

View File

@ -1,632 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
*
* Author:
* Pehong Chen
* Chen & Harrison International Systems, Inc.
* Palo Alto, California
* USA
* (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
*
* Contributors:
* Please refer to the CONTRIB file that comes with this release
* for a list of people who have contributed to this and/or previous
* release(s) of MakeIndex.
*
* All rights reserved by the copyright holders. See the copyright
* notice distributed with this software for a complete description of
* the conditions under which it is made available.
*
*/
/***********************************************************************
INSTALLATION NOTES
<11-Nov-1989>
At compile-time (or here, if compile-time definition is not
available), set non-zero ONE OS_xxxx operating system flag, and if
more than one compiler is available, ONE compiler flag:
Operating Systems Compiler(s)
================= ===========
OS_ATARI
OS_UNIX
OS_MVSXA IBM_C370
OS_VMCMS IBM_C370
OS_TOPS20 KCC_20 or PCC_20
OS_VAXVMS
================= ===========
If Standard C prototypes are supported, define the symbol
STDC_PROTOTYPES in the appropriate OS_xxxx section below, and insert
#include's for the standard system files which define library
prototypes. STDC_PROTOTYPES will be defined automatically if
__STDC__ is; the latter must be defined by all Standard C conformant
implementations.
All function declarations in MakeIndex are contained at the end of
this file. If 185STDC_PROTOTYPES is not selected, then all the standard
library functions must be declared explicitly.
If the host system restricts Globalal names to 6 characters, set
SHORTNAMES non-zero in the appropriate OS_xxxx section below.
Installing MakeIndex under BS2000 requires at least Version 8.5
supporting Multiple Public Volume Sets (MPVS). Define WORK in this
file to your CATID (default :w:) for temporary files (.ilg, .ind),
in case of no MPVS support define WORK to NIL.
*/
/**********************************************************************/
#define STDC (__STDC__ || __cplusplus)
/*
* Establish needed operating symbols (defaulting to OS_UNIX if none
* specified at compile time). If you add one, add it to the check
* list at the end of this section, too.
*/
#ifndef OS_ATARI
#define OS_ATARI 0
#endif
#ifndef OS_PCDOS
#define OS_PCDOS 0
#endif
#ifndef OS_TOPS20
#define OS_TOPS20 0
#endif
#ifndef KCC_20
#define KCC_20 0
#endif
#ifndef PCC_20
#define PCC_20 0
#endif
#ifndef OS_UNIX
#define OS_UNIX 0
#endif
#ifndef OS_VAXVMS
#define OS_VAXVMS 0
#endif
#ifndef IBM_C370
#define IBM_C370 0
#endif
#if OS_TOPS20
#if (KCC_20 || PCC_20)
#else
#undef PCC_20
#define PCC_20 1 /* PCC-20 is default for Tops-20 */
#endif /* KCC_20 || PCC_20) */
#endif /* OS_TOPS20 */
#ifndef OS_MVSXA
#define OS_MVSXA 0
#endif
#ifndef OS_VMCMS
#define OS_VMCMS 0
#endif
#if (OS_ATARI || OS_UNIX || OS_MVSXA || OS_PCDOS || OS_VMCMS)
#else
#if (OS_TOPS20 || OS_VAXVMS)
#else
#undef OS_UNIX
#define OS_UNIX 1 /* Unix is default operating system */
#endif
#endif
#if (OS_MVSXA || OS_VMCMS)
#undef IBM_C370
#define IBM_C370 1 /* IBM_C370 is default for OS_MVSXA and OS_VMCMS */
#endif
#if (OS_MVSXA || OS_TOPS20 || OS_VMCMS)
#define SHORTNAMES 1
#else
#define SHORTNAMES 0
#endif
#define STDC_PROTOTYPES STDC
/**********************************************************************/
#include <stdio.h>
#if OS_PCDOS
# include <io.h> /* for function declarations */
# include <stddef.h> /* for function declarations */
# include <stdlib.h> /* for function declarations */
# undef STDC_PROTOTYPES
# define STDC_PROTOTYPES 1 /* so we get full argument
type checking */
#endif /* OS_PCDOS */
#include "myctype.h"
#if (OS_VMCMS || OS_MVSXA)
# include <stdefs.h> /* for function declarations */
# undef STDC_PROTOTYPES
# define STDC_PROTOTYPES 1 /* so we get full argument
type checking */
# if 0
# undef __STDC__
# define __STDC__ 1
# endif
#endif /* OS_MVSXA || OS_VMCMS */
#if OS_ATARI
# if ATARI_ST_TURBO
# define access(fn, mode) 0 /* function not available */
# endif
# if __GNUC__
# include <string.h>
# include <types.h>
# endif
# undef STDC_PROTOTYPES
# define STDC_PROTOTYPES 1 /* so we get full argument checking */
#endif /* OS_ATARI */
#if IBM_C370
# define access(fn, mode) 0 /* function not available */
#endif
#if SHORTNAMES
/*
* Provide alternate Globalal names which are unique in the first SIX
* characters as required for portability (and Standard C)
*/
#define check_all chk_all
#define check_idx chk_idx
#define check_mixsym chk_mix
#define compare_one cmp_one
#define compare_page cmp_page
#define compare_string cmp_string
#define delim_n dlm_n
#define delim_p dlm_p
#define delim_r dlm_r
#define delim_t dlm_t
#define encap_i ecp_i
#define encap_p ecp_p
#define encap_range ecp_range
#define encap_s ecp_s
#define group_skip grp_skip
#define group_type grp_type
#define idx_aclose idxaclose
#define idx_actual idxactual
#define idx_keyword idx_kwd
#define indent_length ind_length
#define indent_space ind_space
#define headings_flag hd_flag
#define heading_pre hd_pre
#define heading_suf hd_suf
#define symhead_pos sym_pos
#define symhead_neg sym_neg
#define numhead_pos num_pos
#define numhead_neg num_neg
#define process_idx prc_idx
#define process_precedence prc_pre
#define range_ptr rng_ptr
#define scan_alpha_lower scnalw
#define scan_alpha_upper scnaup
#define scan_arabic scnarabic
#define scan_arg1 scna1
#define scan_arg2 scna2
#define scan_char scnchr
#define scan_field scnfld
#define scan_idx scnidx
#define scan_key scnkey
#define scan_no scnno
#define scan_roman_lower scnrlw
#define scan_roman_upper scnrup
#define scan_spec scnspc
#define scan_string scnstr
#define scan_style scnsty
#define setpagelen spg_len
#define setpage_close spg_close
#define setpage_open spg_open
#define suffix_2p suf_2p
#define suffix_3p suf_3p
#define suffix_mp suf_mp
#endif /* SHORTNAMES */
#if OS_VAXVMS
#define EXIT(code) exit( ((code) == 0) ? 1 : (1 << 28) + 2 )
#else /* NOT OS_VAXVMS */
#define EXIT exit
#endif /* OS_VAXVMS */
#define Local static
#define Global extern
#define Public
enum _logical {False,True};
typedef enum _logical Logical;
#define EOS '\0'
#define EMPTY_STRING (unsigned char *)""
#define TAB '\t'
#define LFD '\n'
#define SPC ' '
#define LSQ '['
#define RSQ ']'
#define BSH '\\'
#if OS_ATARI
#define ENV_SEPAR ';'
#define DIR_DELIM '\\'
#endif /* OS_ATARI */
#if (OS_UNIX)
#define ENV_SEPAR ':'
#define DIR_DELIM '/'
#endif /* (OS_UNIX)*/
#if (OS_MVSXA || OS_VMCMS)
#define ENV_SEPAR '.'
#define DIR_DELIM '.'
#endif /* OS_MVSXA || OS_VMCMS */
#if OS_PCDOS
#define ENV_SEPAR ';'
#define DIR_DELIM '\\'
#endif /* OS_PCDOS */
#if OS_TOPS20
#define ENV_SEPAR ','
#define DIR_DELIM ':'
#endif /* OS_TOPS20 */
#if OS_VAXVMS
#define ENV_SEPAR ',' /* In fact these aren't used */
#define DIR_DELIM ':'
#endif /* OS_VAXVMS */
#ifndef SW_PREFIX /* can override at compile time */
#define SW_PREFIX '-'
#endif
#define EXT_DELIM '.'
#define ROMAN_SIGN '*'
#define EVEN "even"
#define ODD "odd"
#define ANY "any"
#define GET_CHAR getc
#define TOLOWER(C) mytolower((unsigned char)C)
#define TOUPPER(C) mytoupper((unsigned char)C)
#define TOASCII(i) toascii((unsigned char)i)
#define STRNEQ(A, B) ((((A) == NULL) && ((B) == NULL)) ? False : \
((((A) == NULL) || ((B) == NULL)) ? True : \
(mystrcmp((unsigned char *)(A), (unsigned char *)(B)) != 0)))
#define STREQ(A, B) ((((A) == NULL) && ((B) == NULL)) ? True : \
((((A) == NULL) || ((B) == NULL)) ? False : \
(mystrcmp((unsigned char *)(A), (unsigned char *)(B)) == 0)))
#if (OS_MVSXA)
#define DIGTOASCII(i) (char)((i) + '0')
#else
#define DIGTOASCII(i) (char)((i) + 48)
#endif /* (OS_MVSXA) */
#if OS_PCDOS /* open file in binary mode */
#define OPEN_IN_B(FP) fopen(FP, "rb")
#endif
#define OPEN_IN(FP) fopen(FP, "r")
#define OPEN_OUT(FP) fopen(FP, "w")
#define CLOSE(FP) fclose(FP)
#define ISDIGIT(C) isdigit(C)
#define ISSYMBOL(C) (!(isdigit(C) || isalpha(C) || iscntrl(C) || C == SPC))
/*====================================================================
Many arrays in MakeIndex are dimensioned [xxx_MAX], where the xxx_MAX
values are defined below. The use of each of these is described in
comments. However, no run-time check is made to ensure that these are
consistent, or reasonable! Therefore, change them only with great
care.
The array sizes should be made generously large: there are a great
many uses of strings in MakeIndex with the strxxx() and sprintf()
functions where no checking is done for adequate target storage sizes.
Although some input checking is done to avoid this possibility, it is
highly likely that there are still several places where storage
violations are possible, with core dumps, or worse, incorrect output,
ensuing.
======================================================================*/
#define ARABIC_MAX 5 /* maximum digits in an Arabic page */
/* number field */
#define ARGUMENT_MAX 1024 /* maximum length of sort or actual key */
/* in index entry */
#define ARRAY_MAX 1024 /* maximum length of constant values in */
/* style file */
#define FIELD_MAX 4 /* maximum levels of index entries (item, */
/* subitem, subsubitem); cannot be */
/* increased beyond 3 without */
/* significant design changes (no field */
/* names are known beyond 3 levels) */
#ifdef LINE_MAX /* IBM RS/6000 AIX has this in <sys/limits.h> */
#undef LINE_MAX
#endif
#define LINE_MAX 72 /* maximum output line length (longer */
/* ones wrap if possible) */
#define NUMBER_MAX 16 /* maximum digits in a Roman or Arabic */
/* page number */
/* (MAX(ARABIC_MAX,ROMAN_MAX)) */
#define PAGEFIELD_MAX 10 /* maximum fields in a composite page */
/* number */
#define PAGETYPE_MAX 5 /* fixed at 5; see use in scanst.c */
#define ROMAN_MAX 16 /* maximum length of Roman page number */
/* field */
#define STRING_MAX 256 /* maximum length of host filename */
/*====================================================================*/
#define VERSION "Version 2.12wm [28-Feb-1999]"
#if 0
#define VERSION "Version 2.12wm [28-Feb-1999]"
#define VERSION "Version 2.12a [25-May-1995]"
#define VERSION "portable version 2.11 [19-Oct-1991]"
#define VERSION "portable version 2.10 [05-Jul-1991]"
#define VERSION "portable version 2.9.1 [21-Jun-1990]"
#define VERSION "portable version 2.9 [13-Dec-1989]"
#define VERSION "portable version 2.8 [11-Nov-1989]"
#define VERSION "portable version 2.7 [01-Oct-1988]"
#define VERSION "portable version 2.6 [14-Jul-1988]"
#define VERSION "portable version 2.5 [14-Apr-1988]"
#define VERSION "portable version 2.4 [20-Mar-1988]"
#define VERSION "portable version 2.3 [20-Jan-1988]"
#define VERSION "version 2.2 [29-May-1987]"
#endif
#define PUT_VERSION \
{ \
Message("This is %s, ", pgm_fn); \
Message("%s (%s).\n", VERSION, multilanguage[Language].name); \
need_version = False; \
}
#define STYLE_PATH "INDEXSTYLE" /* environment variable defining search */
/* path for style files */
#define INDEX_IDX ".idx"
#define INDEX_ILG ".ilg"
#define INDEX_IND ".ind"
#define INDEX_STY ".mst"
#if OS_VAXVMS
#define INDEX_LOG ".lis"
#else
#define INDEX_LOG ".log"
#endif
#define EMPTY -9999
#define ROML 0
#define ROMU 1
#define ARAB 2
#define ALPL 3
#define ALPU 4
#define DUPLICATE 9999
#define SYMBOL -1
#define ALPHA -2
#define GERMAN 0
typedef struct KFIELD
{
unsigned char *sf[FIELD_MAX]; /* sort key */
unsigned char *af[FIELD_MAX]; /* actual key */
int group; /* key group */
char lpg[NUMBER_MAX]; /* literal page */
short npg[PAGEFIELD_MAX]; /* page field array */
short count; /* page field count */
short type; /* page number type */
unsigned char *encap; /* encapsulator */
char *fn; /* input filename */
int lc; /* line number */
}FIELD, *FIELD_PTR;
typedef struct KNODE
{
FIELD data;
struct KNODE *next;
}NODE, *NODE_PTR;
Global void Fatal(const char *fmt, ...);
Global void Message(const char *f, ...);
Global void usage(char *);
Global Logical blank_ignore;
Global Logical compress_blanks;
Global Logical special_flag;
Global Logical init_page;
Global Logical merge_page;
Global int even_odd;
Global Logical verbose;
Global unsigned char idx_keyword[ARRAY_MAX];
Global char idx_aopen;
Global char idx_aclose;
Global char idx_level;
Global char idx_ropen;
Global char idx_rclose;
Global char idx_quote;
Global char idx_actual;
Global char idx_encap;
Global char idx_escape;
Global char page_comp[ARRAY_MAX];
Global int page_offset[PAGETYPE_MAX];
Global char preamble[ARRAY_MAX];
Global char postamble[ARRAY_MAX];
Global char setpage_open[ARRAY_MAX];
Global char setpage_close[ARRAY_MAX];
Global char group_skip[ARRAY_MAX];
Global int headings_flag;
Global char heading_pre[ARRAY_MAX];
Global char heading_suf[ARRAY_MAX];
Global char symhead_pos[ARRAY_MAX];
Global char symhead_neg[ARRAY_MAX];
Global char numhead_pos[ARRAY_MAX];
Global char numhead_neg[ARRAY_MAX];
Global int prelen;
Global int postlen;
Global int skiplen;
Global int headprelen;
Global int headsuflen;
Global int setpagelen;
Global char item_r[FIELD_MAX][ARRAY_MAX];
Global char item_u[FIELD_MAX][ARRAY_MAX];
Global char item_x[FIELD_MAX][ARRAY_MAX];
Global int ilen_r[FIELD_MAX];
Global int ilen_u[FIELD_MAX];
Global int ilen_x[FIELD_MAX];
Global char delim_p[FIELD_MAX][ARRAY_MAX];
Global char delim_n[ARRAY_MAX];
Global char delim_r[ARRAY_MAX];
Global char delim_t[ARRAY_MAX];
Global char suffix_2p[ARRAY_MAX];
Global char suffix_3p[ARRAY_MAX];
Global char suffix_mp[ARRAY_MAX];
Global char encap_p[ARRAY_MAX];
Global char encap_i[ARRAY_MAX];
Global char encap_s[ARRAY_MAX];
Global int linemax;
Global char indent_space[ARRAY_MAX];
Global int indent_length;
Global FILE *idx_fp;
Global FILE *sty_fp;
Global FILE *ind_fp;
Global FILE *ilg_fp;
Global char *idx_fn;
Global char *pgm_fn;
Global char *ind_fn;
Global char *ilg_fn;
#ifndef MKIND_C
Global char sty_fn[];
Global char ind[];
Global char ilg[];
Global char pageno[];
#ifdef DEBUG
Global long totmem;
#endif /* DEBUG */
#endif
Global FIELD_PTR *idx_key;
Global NODE_PTR head;
Global NODE_PTR tail;
Global Logical idx_dot;
Global int idx_tt;
Global int idx_gt;
Global int idx_et;
Global int idx_dc;
#define DOT "."
#define DOT_MAX 1000
#define CMP_MAX 1500
#define VOIDP void*
#define VOID_ARG void
Global void gen_ind (void);
Global int group_type (unsigned char *str);
Global int main(int argc, char **argv);
Global void qqsort (char *base, int n, int size,
int (*compar)(char*,char*));
Global void scan_idx (void);
Global void scan_sty (void);
Global void sort_idx (void);
Global int strtoint (char *str);
#if STDC
#include <stdlib.h>
#undef strchr
#undef strrchr
#if __NeXT__
int access (const char *, int);
#else
#if OS_PCDOS
#else
#include <unistd.h>
#endif
#endif
#else
/* Miscellaneous standard library routines */
int access (const char *, int);
VOIDP calloc (size_t nitems,size_t size);
char *getenv (const char *name);
VOIDP malloc (size_t size);
#endif /* __STDC__ */
#if PCC_20
#define R_OK 0 /* PCC-20 access(file,mode) */
#endif /* only understands mode=0 */
#ifndef R_OK
#define R_OK 4 /* only symbol from sys/file.h */
#endif
typedef unsigned char char_u;
typedef const char_u *p_char_u[];
typedef const char_u a_char_u[];
typedef const int int_u[];
typedef unsigned int word;
#include "language.h"

View File

@ -1,58 +0,0 @@
#undef strupr
#undef strlwr
#undef strnicmp
#undef strncasecmp
#undef stricmp
#undef strcasecmp
#undef isalnum
#undef isalpha
#undef isascii
#undef iscntrl
#undef isdigit
#undef isgraph
#undef islower
#undef isprint
#undef ispunct
#undef isspace
#undef isupper
#undef isxdigit
#undef tolower
#undef toupper
#undef toascii
#undef charcmp
#undef strchr
#undef strrchr
#ifdef __cplusplus
extern "C" {
#endif
unsigned char *mystrchr(unsigned char *s, unsigned char c);
unsigned char *mystrrchr(unsigned char *s, unsigned char c);
unsigned char * strupr(unsigned char *s);
unsigned char * strlwr(unsigned char *s);
int mystrncmp(const unsigned char *s, const unsigned char *d, size_t n);
int mystrcmp(const unsigned char *s, const unsigned char *d);
int strnicmp(const unsigned char *s, const unsigned char *d, size_t n);
int strncasecmp(const unsigned char *s, const unsigned char *d, size_t n);
int stricmp(const unsigned char *s, const unsigned char *d);
int strcasecmp(const unsigned char *s, const unsigned char *d);
int isalnum (unsigned char __c);
int isalpha (unsigned char __c);
int isascii (unsigned char __c);
int iscntrl (unsigned char __c);
int isdigit (unsigned char __c);
int isgraph (unsigned char __c);
int islower (unsigned char __c);
int isprint (unsigned char __c);
int ispunct (unsigned char __c);
int isspace (unsigned char __c);
int isupper (unsigned char __c);
int isxdigit(unsigned char __c);
unsigned char mytolower(unsigned char __ch);
unsigned char mytoupper(unsigned char __ch);
int toascii(unsigned char __ch);
int charcmp(unsigned char s, unsigned char d);
#ifdef __cplusplus
}
#endif

View File

@ -1,585 +0,0 @@
{% raw %}
static p_char_u pl_cp1250_day_name_ptr =
{
(char_u *)NULL,
(char_u *)"niedziela",
(char_u *)"poniedzia\0xB3ek",
(char_u *)"wtorek",
(char_u *)"\0x9Croda",
(char_u *)"czwartek",
(char_u *)"pi\0xB9tek",
(char_u *)"sobota",
};
static p_char_u pl_cp1250_day_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"nd",
(char_u *)"pn",
(char_u *)"wt",
(char_u *)"\0x9Cr",
(char_u *)"cz",
(char_u *)"pt",
(char_u *)"sb",
};
static p_char_u pl_cp1250_mon_name_ptr =
{
(char_u *)NULL,
(char_u *)"stycze\0xF1",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xF1",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xF1",
(char_u *)"wrzesie\0xF1",
(char_u *)"pa\0x9Fdziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xF1"
};
static p_char_u pl_cp1250_mon_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"stycze\0xF1",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xF1",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xF1",
(char_u *)"wrzesie\0xF1",
(char_u *)"pa\0x9Fdziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xF1"
};
static int_u pl_cp1250_toascii_table =
{
' ', /* 128 0x80 */
' ', /* 129 0x81 */
' ', /* 130 0x82 */
' ', /* 131 0x83 */
' ', /* 132 0x84 */
' ', /* 133 0x85 */
' ', /* 134 0x86 */
' ', /* 135 0x87 */
' ', /* 136 0x88 */
' ', /* 137 0x89 */
' ', /* 138 0x8a */
' ', /* 139 0x8b */
' ', /* 140 0x8c */
' ', /* 141 0x8d */
' ', /* 142 0x8e */
' ', /* 143 0x8f */
' ', /* 144 0x90 */
' ', /* 145 0x91 */
' ', /* 146 0x92 */
' ', /* 147 0x93 */
' ', /* 148 0x94 */
' ', /* 149 0x95 */
' ', /* 150 0x96 */
' ', /* 151 0x97 */
' ', /* 152 0x98 */
' ', /* 153 0x99 */
' ', /* 154 0x9a */
' ', /* 155 0x9b */
' ', /* 156 0x9c */
' ', /* 157 0x9d */
' ', /* 158 0x9e */
' ', /* 159 0x9f */
' ', /* 160 0xa0 */
' ', /* 161 0xa1 */
' ', /* 162 0xa2 */
' ', /* 163 0xa3 */
' ', /* 164 0xa4 */
' ', /* 165 0xa5 */
' ', /* 166 0xa6 */
' ', /* 167 0xa7 */
' ', /* 168 0xa8 */
' ', /* 169 0xa9 */
' ', /* 170 0xaa */
' ', /* 171 0xab */
' ', /* 172 0xac */
' ', /* 173 0xad */
' ', /* 174 0xae */
' ', /* 175 0xaf */
' ', /* 176 0xb0 */
' ', /* 177 0xb1 */
' ', /* 178 0xb2 */
' ', /* 179 0xb3 */
' ', /* 180 0xb4 */
' ', /* 181 0xb5 */
' ', /* 182 0xb6 */
' ', /* 183 0xb7 */
',', /* 184 0xb8 */
' ', /* 185 0xb9 */
' ', /* 186 0xba */
' ', /* 187 0xbb */
' ', /* 188 0xbc */
' ', /* 189 0xbd */
' ', /* 190 0xbe */
' ', /* 191 0xbf */
'R', /* 192 0xc0 */
'A', /* 193 0xc1 */
'A', /* 194 0xc2 */
'A', /* 195 0xc3 */
'A', /* 196 0xc4 */
'L', /* 197 0xc5 */
'C', /* 198 0xc6 */
'C', /* 199 0xc7 */
'C', /* 200 0xc8 */
'E', /* 201 0xc9 */
'E', /* 202 0xca */
'E', /* 203 0xcb */
'E', /* 204 0xcc */
'I', /* 205 0xcd */
'I', /* 206 0xce */
'D', /* 207 0xcf */
'D', /* 208 0xd0 */
'N', /* 209 0xd1 */
'N', /* 210 0xd2 */
'O', /* 211 0xd3 */
'O', /* 212 0xd4 */
'O', /* 213 0xd5 */
'O', /* 214 0xd6 */
'x', /* 215 0xd7 */
'R', /* 216 0xd8 */
'U', /* 217 0xd9 */
'U', /* 218 0xda */
'U', /* 219 0xdb */
'U', /* 220 0xdc */
'Y', /* 221 0xdd */
'T', /* 222 0xde */
' ', /* 223 0xdf */
'r', /* 224 0xe0 */
'a', /* 225 0xe1 */
'a', /* 226 0xe2 */
'a', /* 227 0xe3 */
'a', /* 228 0xe4 */
'l', /* 229 0xe5 */
'c', /* 230 0xe6 */
'c', /* 231 0xe7 */
'c', /* 232 0xe8 */
'e', /* 233 0xe9 */
'e', /* 234 0xea */
'e', /* 235 0xeb */
'e', /* 236 0xec */
'i', /* 237 0xed */
'i', /* 238 0xee */
'd', /* 239 0xef */
'd', /* 240 0xf0 */
'n', /* 241 0xf1 */
'n', /* 242 0xf2 */
'o', /* 243 0xf3 */
'o', /* 244 0xf4 */
'o', /* 245 0xf5 */
'o', /* 246 0xf6 */
' ', /* 247 0xf7 */
'r', /* 248 0xf8 */
'u', /* 249 0xf9 */
'u', /* 250 0xfa */
'u', /* 251 0xfb */
'u', /* 252 0xfc */
'y', /* 253 0xfd */
't', /* 254 0xfe */
' ' /* 255 0xff */
};
static a_char_u pl_cp1250_lower_table =
{
'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', '[', '\\', ']', '^', '_',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', '\0x9C', ' ', ' ', '\0x9F',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', '\0xB3', ' ', '\0xB9', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', '\0xBF',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', '\0xE6', ' ',
' ', ' ', '\0xEA', ' ', ' ', ' ', ' ', ' ',
' ', '\0xF1', ' ', '\0xF3', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '
};
static a_char_u pl_cp1250_upper_table =
{
'A','B','C','D','E','F','G',
'H','I','J','K','L','M','N','O',
'P','Q','R','S','T','U','V','W',
'X','Y','Z','{','|','}','~',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ','\0x8C',' ',' ','\0x8F',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ','\0xA3',' ',' ',' ',' ',
' ','\0xA5',' ',' ',' ',' ',' ','\0xAF',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ','\0xC6',' ',
' ',' ','\0xCA',' ',' ',' ',' ',' ',
' ','\0xD1',' ','\0xD3',' ',' ',' ',' ',
};
static a_char_u pl_cp1250_char_type =
{
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK,
IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_BLANK, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,
IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, 0x000,
0x000, 0x000, 0x000, IS_ALPH,
0x000, IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,
IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, 0x000,
0x000, 0x000, 0x000, IS_CTR,
/*----------------------------*/
/*\0xB9\0xE6\0xEA\0xB3\0xF1\0xF3\0x9C\0x9F\0xBF \0xA5\0xC6\0xCA\0xA3\0xD1\0xD3\0x8C\0x8F\0xAF */
0x000, 0x000, 0x000, 0x000, /*128*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_UPPER, 0x000, 0x000, IS_UPPER, /* \0x8C..\0x8F */
0x000, 0x000, 0x000, 0x000, /*144 */
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_LOWER, 0x000, 0x000, IS_LOWER, /* \0x9C..\0x9F */
0x000, 0x000, 0x000, IS_UPPER, /*...\0xA3*/
0x000, IS_UPPER, 0x000, 0x000, /*.\0xA5.. */
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, IS_UPPER, /*...\0xAF*/
0x000, 0x000, 0x000, IS_LOWER, /*...\0xB3*/
0x000, 0x000, 0x000, 0x000,
0x000, IS_LOWER, 0x000, 0x000, /*.\0xB9..*/
0x000, 0x000, 0x000, IS_LOWER, /*...\0xBF*/
0x000, 0x000, 0x000, 0x000, /*.......\0xC6.*/
0x000, 0x000, IS_UPPER, 0x000,
0x000, 0x000, IS_UPPER, 0x000, /*..\0xCA....*/
0x000, 0x000, 0x000, 0x000,
0x000, IS_UPPER, 0x000, IS_UPPER, /*.\0xD1.\0xD3....*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, /*......\0xE6.*/
0x000, 0x000, IS_LOWER, 0x000,
0x000, 0x000, IS_LOWER, 0x000, /*..\0xEA.....*/
0x000, 0x000, 0x000, 0x000,
0x000, IS_LOWER, 0x000, IS_LOWER, /*.\0xF1.\0xF3....*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000
};
static int_u pl_cp1250_order_tbl =
{
0, /* 0 */
'', /* 1 */
'', /* 2 */
'', /* 3 */
'', /* 4 */
'', /* 5 */
'', /* 6 */
'', /* 7 */
'', /* 8 */
TAB, /* 9 */
LF, /* 10 0a */
' ', /* 11 0b */
' ', /* 12 0c */
CR, /* 13 0d */
'', /* 14 0e */
'', /* 15 0f */
'', /* 16 10 */
'', /* 17 11 */
'', /* 18 12 */
'', /* 19 13 */
'', /* 20 14 */
'', /* 21 15 */
'', /* 22 16 */
'', /* 23 17 */
'', /* 24 18 */
'', /* 25 19 */
0x1a, /* 26 1a */
'', /* 27 1b */
'', /* 28 1c */
'', /* 29 1d */
'', /* 30 1e */
'', /* 31 1f */
' ', /* 32 20 */
'!', /* 33 21 */
0x22, /* 34 22 quote */
'#', /* 35 23 */
'$', /* 36 24 */
'%', /* 37 25 */
'&', /* 38 26 */
0x27, /* 39 27 single quote */
'(', /* 40 28 */
')', /* 41 29 */
'*', /* 42 2a */
'+', /* 43 2b */
',', /* 44 2c */
'-', /* 45 2d */
'.', /* 46 2e */
'/', /* 47 2f */
'0', /* 48 30 */
'1', /* 49 31 */
'2', /* 50 32 */
'3', /* 51 33 */
'4', /* 52 34 */
'5', /* 53 35 */
'6', /* 54 36 */
'7', /* 55 37 */
'8', /* 56 38 */
'9', /* 57 39 */
':', /* 58 3a */
';', /* 59 3b */
'<', /* 60 3c */
'=', /* 61 3d */
'>', /* 62 3e */
'?', /* 63 3f */
'@', /* 64 40 */
'a' * CCCC + 4, /* 'A', 65 41 */
'b' * CCCC + 4, /* 'B', 66 42 */
'c' * CCCC + 4, /* 'C', 67 43 */
'd' * CCCC + 4, /* 'D', 68 44 */
'e' * CCCC + 4, /* 'E', 69 45 */
'f' * CCCC + 4, /* 'F', 70 46 */
'g' * CCCC + 4, /* 'G', 71 47 */
'h' * CCCC + 4, /* 'H', 72 48 */
'i' * CCCC + 4, /* 'I', 73 49 */
'j' * CCCC + 4, /* 'J', 74 4a */
'k' * CCCC + 4, /* 'K', 75 4b */
'l' * CCCC + 4, /* 'L', 76 4c */
'm' * CCCC + 4, /* 'M', 77 4d */
'n' * CCCC + 4, /* 'N', 78 4e */
'o' * CCCC + 4, /* 'O', 79 4f */
'p' * CCCC + 4, /* 'P', 80 50 */
'q' * CCCC + 4, /* 'Q', 81 51 */
'r' * CCCC + 4, /* 'R', 82 52 */
's' * CCCC + 4, /* 'S', 83 53 */
't' * CCCC + 4, /* 'T', 84 54 */
'u' * CCCC + 4, /* 'U', 85 55 */
'v' * CCCC + 4, /* 'V', 86 56 */
'w' * CCCC + 4, /* 'W', 87 57 */
'x' * CCCC + 4, /* 'X', 88 58 */
'y' * CCCC + 4, /* 'Y', 89 59 */
'z' * CCCC + 4, /* 'Z', 90 5a */
0x5b, /* 91 5b */
0x5c, /* 92 5c */
0x5d, /* 93 5d ] */
0x5e, /* 94 5e */
'_', /* 95 5f */
0x60, /* 96 60 ` */
'a' * CCCC, /* 97 61 */
'b' * CCCC, /* 98 62 */
'c' * CCCC, /* 99 63 */
'd' * CCCC, /* 100 64 */
'e' * CCCC, /* 101 65 */
'f' * CCCC, /* 102 66 */
'g' * CCCC, /* 103 67 */
'h' * CCCC, /* 104 68 */
'i' * CCCC, /* 105 69 */
'j' * CCCC, /* 106 6a */
'k' * CCCC, /* 107 6b */
'l' * CCCC, /* 108 6c */
'm' * CCCC, /* 109 6d */
'n' * CCCC, /* 110 6e */
'o' * CCCC, /* 111 6f */
'p' * CCCC, /* 112 70 */
'q' * CCCC, /* 113 71 */
'r' * CCCC, /* 114 72 */
's' * CCCC, /* 115 73 */
't' * CCCC, /* 116 74 */
'u' * CCCC, /* 117 75 */
'v' * CCCC, /* 118 76 */
'w' * CCCC, /* 119 77 */
'x' * CCCC, /* 120 78 */
'y' * CCCC, /* 121 79 */
'z' * CCCC, /* 122 7a */
'{', /* 123 7b */
'|', /* 124 7c */
'}', /* 125 7d */
'~', /* 126 7e */
127, /* 127 7f */
128, /* 128 80 */
129, /* 129 81 */
130, /* 130 82 */
131, /* 131 83 */
132, /* 132 84 */
133, /* 133 85 */
134, /* 134 86 */
135, /* 135 87 */
136, /* 136 88 */
137, /* 137 89 */
138, /* 138 8a */
139, /* 139 8b */
's' * CCCC + 1, /* 140 8c */
141, /* 141 8d */
142, /* 142 8e */
'z' * CCCC + 1, /* 143 8f */
144, /* 144 90 */
145, /* 145 91 */
146, /* 146 92 */
147, /* 147 93 */
148, /* 148 94 */
149, /* 149 95 */
150, /* 150 96 */
151, /* 151 97 */
152, /* 152 98 */
153, /* 153 99 */
154, /* 154 9a */
155, /* 155 9b */
's' * CCCC + 5, /* 156 9c */
157, /* 157 9d */
158, /* 158 9e */
'z' * CCCC + 5, /* 159 9f */
160, /* 160 a0 */
161, /* 161 a1 */
162, /* 162 a2 */
'l' * CCCC + 1, /* 163 a3 */
164, /* 164 a4 */
'a' * CCCC + 1, /* 165 a5 */
166, /* 166 a6 */
167, /* 167 a7 */
168, /* 168 a8 */
169, /* 169 a9 */
170, /* 170 aa */
171, /* 171 ab */
172, /* 172 ac */
173, /* 173 ad */
174, /* 174 ae */
'z' * CCCC + 2, /* 175 af */
176, /* 176 b0 */
177, /* 177 b1 */
178, /* 178 b2 */
'l' * CCCC + 5, /* 179 b3 */
180, /* 180 b4 */
181, /* 181 b5 */
182, /* 182 b6 */
183, /* 183 b7 */
184, /* 184 b8 */
'a' * CCCC + 5, /* 185 b9 */
186, /* 186 ba */
187, /* 187 bb */
188, /* 188 bc */
189, /* 189 bd */
190, /* 190 be */
'z' * CCCC + 6, /* 191 bf */
192, /* 192 c0 */
193, /* 193 c1 */
194, /* 194 c2 */
195, /* 195 c3 */
196, /* 196 c4 */
197, /* 197 c5 */
'c' * CCCC + 1, /* 198 c6 */
199, /* 199 c7 */
200, /* 200 c8 */
201, /* 201 c9 */
'e' * CCCC + 1, /* 202 ca */
203, /* 203 cb */
204, /* 204 cc */
205, /* 205 cd */
206, /* 206 ce */
207, /* 207 cf */
208, /* 208 d0 */
'n' * CCCC + 1, /* 209 d1 */
210, /* 210 d2 */
'o' * CCCC + 1, /* 211 d3 */
212, /* 212 d4 */
213, /* 213 d5 */
214, /* 214 d6 */
215, /* 215 d7 */
216, /* 216 d8 */
217, /* 217 d9 */
218, /* 218 da */
219, /* 219 db */
220, /* 220 dc */
221, /* 221 dd */
222, /* 222 de */
223, /* 223 df */
224, /* 224 e0 */
225, /* 225 e1 */
226, /* 226 e2 */
227, /* 227 e3 */
228, /* 228 e4 */
229, /* 229 e5 */
'c' * CCCC + 5, /* 230 e6 */
231, /* 231 e7 */
232, /* 232 e8 */
233, /* 233 e9 */
'e' * CCCC + 5, /* 234 ea */
235, /* 235 eb */
236, /* 236 ec */
237, /* 237 ed */
238, /* 238 ee */
239, /* 239 ef */
240, /* 240 f0 */
'n' * CCCC + 5, /* 241 f1 */
242, /* 242 f2 */
'o' * CCCC + 5, /* 243 f3 */
244, /* 244 f4 */
245, /* 245 f5 */
246, /* 246 f6 */
247, /* 247 f7 */
248, /* 248 f8 */
249, /* 249 f9 */
250, /* 250 fa */
251, /* 251 fb */
252, /* 252 fc */
253, /* 253 fd */
254, /* 254 fe */
255 /* 255 ff */
};
{% endraw %}

View File

@ -1,589 +0,0 @@
{% raw %}
static p_char_u pl_cp852_day_name_ptr =
{
(char_u *)NULL,
(char_u *)"niedziela",
(char_u *)"poniedzia\0x88ek",
(char_u *)"wtorek",
(char_u *)"\0x98roda",
(char_u *)"czwartek",
(char_u *)"pi\0xA5tek",
(char_u *)"sobota",
};
static p_char_u pl_cp852_day_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"nd",
(char_u *)"pn",
(char_u *)"wt",
(char_u *)"\0x98r",
(char_u *)"cz",
(char_u *)"pt",
(char_u *)"sb",
};
static p_char_u pl_cp852_mon_name_ptr =
{
(char_u *)NULL,
(char_u *)"stycze\0xE4",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xE4",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xE4",
(char_u *)"wrzesie\0xE4",
(char_u *)"pa\0xABdziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xE4"
};
static p_char_u pl_cp852_mon_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"stycze\0xE4",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xE4",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xE4",
(char_u *)"wrzesie\0xE4",
(char_u *)"pa\0xABdziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xE4"
};
static int_u pl_cp852_toascii_table =
{
' ', /* 128 0x80 */
' ', /* 129 0x81 */
' ', /* 130 0x82 */
' ', /* 131 0x83 */
' ', /* 132 0x84 */
' ', /* 133 0x85 */
'c', /* 134 0x86 */
' ', /* 135 0x87 */
'l', /* 136 0x88 */
' ', /* 137 0x89 */
' ', /* 138 0x8a */
' ', /* 139 0x8b */
' ', /* 140 0x8c */
'Z', /* 141 0x8d */
' ', /* 142 0x8e */
'C', /* 143 0x8f */
' ', /* 144 0x90 */
' ', /* 145 0x91 */
' ', /* 146 0x92 */
' ', /* 147 0x93 */
' ', /* 148 0x94 */
' ', /* 149 0x95 */
' ', /* 150 0x96 */
'S', /* 151 0x97 */
's', /* 152 0x98 */
' ', /* 153 0x99 */
' ', /* 154 0x9a */
' ', /* 155 0x9b */
' ', /* 156 0x9c */
'L', /* 157 0x9d */
' ', /* 158 0x9e */
' ', /* 159 0x9f */
' ', /* 160 0xa0 */
' ', /* 161 0xa1 */
'o', /* 162 0xa2 */
' ', /* 163 0xa3 */
'A', /* 164 0xa4 */
'a', /* 165 0xa5 */
' ', /* 166 0xa6 */
' ', /* 167 0xa7 */
'E', /* 168 0xa8 */
'e', /* 169 0xa9 */
' ', /* 170 0xaa */
'z', /* 171 0xab */
' ', /* 172 0xac */
' ', /* 173 0xad */
' ', /* 174 0xae */
' ', /* 175 0xaf */
' ', /* 176 0xb0 */
' ', /* 177 0xb1 */
' ', /* 178 0xb2 */
' ', /* 179 0xb3 */
' ', /* 180 0xb4 */
' ', /* 181 0xb5 */
' ', /* 182 0xb6 */
' ', /* 183 0xb7 */
',', /* 184 0xb8 */
' ', /* 185 0xb9 */
' ', /* 186 0xba */
' ', /* 187 0xbb */
' ', /* 188 0xbc */
'Z', /* 189 0xbd */
'z', /* 190 0xbe */
' ', /* 191 0xbf */
'R', /* 192 0xc0 */
'A', /* 193 0xc1 */
'A', /* 194 0xc2 */
'A', /* 195 0xc3 */
'A', /* 196 0xc4 */
'L', /* 197 0xc5 */
'C', /* 198 0xc6 */
'C', /* 199 0xc7 */
'C', /* 200 0xc8 */
'E', /* 201 0xc9 */
'E', /* 202 0xca */
'E', /* 203 0xcb */
'E', /* 204 0xcc */
'I', /* 205 0xcd */
'I', /* 206 0xce */
'D', /* 207 0xcf */
'D', /* 208 0xd0 */
'N', /* 209 0xd1 */
'N', /* 210 0xd2 */
'O', /* 211 0xd3 */
'O', /* 212 0xd4 */
'O', /* 213 0xd5 */
'O', /* 214 0xd6 */
'x', /* 215 0xd7 */
'R', /* 216 0xd8 */
'U', /* 217 0xd9 */
'U', /* 218 0xda */
'U', /* 219 0xdb */
'U', /* 220 0xdc */
'Y', /* 221 0xdd */
'T', /* 222 0xde */
' ', /* 223 0xdf */
'O', /* 224 0xe0 */
'a', /* 225 0xe1 */
'a', /* 226 0xe2 */
'N', /* 227 0xe3 */
'n', /* 228 0xe4 */
'l', /* 229 0xe5 */
'c', /* 230 0xe6 */
'c', /* 231 0xe7 */
'c', /* 232 0xe8 */
'e', /* 233 0xe9 */
'e', /* 234 0xea */
'e', /* 235 0xeb */
'e', /* 236 0xec */
'i', /* 237 0xed */
'i', /* 238 0xee */
'd', /* 239 0xef */
'd', /* 240 0xf0 */
'n', /* 241 0xf1 */
'n', /* 242 0xf2 */
'o', /* 243 0xf3 */
'o', /* 244 0xf4 */
'o', /* 245 0xf5 */
'o', /* 246 0xf6 */
' ', /* 247 0xf7 */
'r', /* 248 0xf8 */
'u', /* 249 0xf9 */
'u', /* 250 0xfa */
'u', /* 251 0xfb */
'u', /* 252 0xfc */
'y', /* 253 0xfd */
't', /* 254 0xfe */
' ' /* 255 0xff */
};
static a_char_u pl_cp852_lower_table =
{
'a', 'b', 'c', 'd', 'e', 'f', 'g', /*40*/
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', /*50*/
'x', 'y', 'z', '[', '\\', ']', '^', '_',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /*60 */
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /*70*/
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /*80*/
' ', ' ', ' ', ' ', ' ', '\0xAB', ' ', '\0x86',
' ', ' ', ' ', ' ', ' ', ' ', ' ', '\0x98', /*90*/
' ', ' ', ' ', ' ', ' ', '\0x88', ' ', ' ',
' ', ' ', ' ', ' ', '\0xA5', ' ', ' ', ' ', /*a0*/
'\0xA9', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /*b0*/
' ', ' ', ' ', ' ', ' ', '\0xBE', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /*c0*/
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /*d0*/
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' ,
'\0xA2', ' ', ' ', '\0xE4', ' ', ' ', ' ', ' ' /*e0*/
};
static a_char_u pl_cp852_upper_table =
{
'A','B','C','D','E','F','G', /*60*/
'H','I','J','K','L','M','N','O',
'P','Q','R','S','T','U','V','W', /*70*/
'X','Y','Z','{','|','}','~',' ',
' ',' ',' ',' ',' ',' ','\0x8F',' ', /*80*/
'\0x9D',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ', /*90*/
'\0x97',' ',' ',' ',' ',' ',' ',' ',
' ',' ','\0xE0',' ',' ','\0xA4',' ',' ',/*a0*/
' ','\0xA8',' ','\0x8D',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',/*b0*/
' ',' ',' ',' ',' ',' ','\0xBD',' ',
' ',' ',' ',' ',' ',' ',' ',' ',/*c0*/
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',/*d0*/
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ','\0xE3',' ',' ',' '/*e0*/
};
static a_char_u pl_cp852_char_type =
{
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK,
IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_BLANK, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,
IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, 0x000,
0x000, 0x000, 0x000, IS_ALPH,
0x000, IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,
IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, 0x000,
0x000, 0x000, 0x000, IS_CTR,
/*----------------------------*/
/*\0xA5\0x86\0xA9\0x88\0xE4\0xA2\0x98\0xAB\0xBE \0xA4\0x8F\0xA8\0x9D\0xE3\0xE0\0x97\0x8D\0xBD */
0x000, 0x000, 0x000, 0x000, /*128 80*/
0x000, 0x000, IS_LOWER, 0x000,
IS_LOWER, 0x000, 0x000, 0x000,
0x000, IS_UPPER, 0x000, IS_UPPER,
0x000, 0x000, 0x000, 0x000, /*144 90*/
0x000, 0x000, 0x000, IS_UPPER,
IS_LOWER, 0x000, 0x000, 0x000,
0x000, IS_UPPER, 0x000, 0x000,
0x000, 0x000, IS_LOWER, 0x000, /*160 a0*/
IS_UPPER, IS_LOWER, 0x000, 0x000,
IS_UPPER, IS_LOWER, 0x000, IS_LOWER,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, /*176 b0*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, IS_UPPER, IS_LOWER, 0x000,
0x000, 0x000, 0x000, 0x000,/*192 c0*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,/*208 d0*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_UPPER, 0x000, 0x000, IS_UPPER, /*224 e0*/
IS_LOWER, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, /*240 f0*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000
};
static int_u pl_cp852_order_tbl =
{
0, /* 0 */
'', /* 1 */
'', /* 2 */
'', /* 3 */
'', /* 4 */
'', /* 5 */
'', /* 6 */
'', /* 7 */
'', /* 8 */
TAB, /* 9 */
LF, /* 10 0a */
' ', /* 11 0b */
' ', /* 12 0c */
CR, /* 13 0d */
'', /* 14 0e */
'', /* 15 0f */
'', /* 16 10 */
'', /* 17 11 */
'', /* 18 12 */
'', /* 19 13 */
'', /* 20 14 */
'', /* 21 15 */
'', /* 22 16 */
'', /* 23 17 */
'', /* 24 18 */
'', /* 25 19 */
0x1a, /* 26 1a */
'', /* 27 1b */
'', /* 28 1c */
'', /* 29 1d */
'', /* 30 1e */
'', /* 31 1f */
' ', /* 32 20 */
'!', /* 33 21 */
0x22, /* 34 22 quote */
'#', /* 35 23 */
'$', /* 36 24 */
'%', /* 37 25 */
'&', /* 38 26 */
0x27, /* 39 27 single quote */
'(', /* 40 28 */
')', /* 41 29 */
'*', /* 42 2a */
'+', /* 43 2b */
',', /* 44 2c */
'-', /* 45 2d */
'.', /* 46 2e */
'/', /* 47 2f */
'0', /* 48 30 */
'1', /* 49 31 */
'2', /* 50 32 */
'3', /* 51 33 */
'4', /* 52 34 */
'5', /* 53 35 */
'6', /* 54 36 */
'7', /* 55 37 */
'8', /* 56 38 */
'9', /* 57 39 */
':', /* 58 3a */
';', /* 59 3b */
'<', /* 60 3c */
'=', /* 61 3d */
'>', /* 62 3e */
'?', /* 63 3f */
'@', /* 64 40 */
'a' * CCCC + 4, /* 'A', 65 41 */
'b' * CCCC + 4, /* 'B', 66 42 */
'c' * CCCC + 4, /* 'C', 67 43 */
'd' * CCCC + 4, /* 'D', 68 44 */
'e' * CCCC + 4, /* 'E', 69 45 */
'f' * CCCC + 4, /* 'F', 70 46 */
'g' * CCCC + 4, /* 'G', 71 47 */
'h' * CCCC + 4, /* 'H', 72 48 */
'i' * CCCC + 4, /* 'I', 73 49 */
'j' * CCCC + 4, /* 'J', 74 4a */
'k' * CCCC + 4, /* 'K', 75 4b */
'l' * CCCC + 4, /* 'L', 76 4c */
'm' * CCCC + 4, /* 'M', 77 4d */
'n' * CCCC + 4, /* 'N', 78 4e */
'o' * CCCC + 4, /* 'O', 79 4f */
'p' * CCCC + 4, /* 'P', 80 50 */
'q' * CCCC + 4, /* 'Q', 81 51 */
'r' * CCCC + 4, /* 'R', 82 52 */
's' * CCCC + 4, /* 'S', 83 53 */
't' * CCCC + 4, /* 'T', 84 54 */
'u' * CCCC + 4, /* 'U', 85 55 */
'v' * CCCC + 4, /* 'V', 86 56 */
'w' * CCCC + 4, /* 'W', 87 57 */
'x' * CCCC + 4, /* 'X', 88 58 */
'y' * CCCC + 4, /* 'Y', 89 59 */
'z' * CCCC + 4, /* 'Z', 90 5a */
0x5b, /* 91 5b */
0x5c, /* 92 5c */
0x5d, /* 93 5d ] */
0x5e, /* 94 5e */
'_', /* 95 5f */
0x60, /* 96 60 ` */
'a' * CCCC, /* 97 61 */
'b' * CCCC, /* 98 62 */
'c' * CCCC, /* 99 63 */
'd' * CCCC, /* 100 64 */
'e' * CCCC, /* 101 65 */
'f' * CCCC, /* 102 66 */
'g' * CCCC, /* 103 67 */
'h' * CCCC, /* 104 68 */
'i' * CCCC, /* 105 69 */
'j' * CCCC, /* 106 6a */
'k' * CCCC, /* 107 6b */
'l' * CCCC, /* 108 6c */
'm' * CCCC, /* 109 6d */
'n' * CCCC, /* 110 6e */
'o' * CCCC, /* 111 6f */
'p' * CCCC, /* 112 70 */
'q' * CCCC, /* 113 71 */
'r' * CCCC, /* 114 72 */
's' * CCCC, /* 115 73 */
't' * CCCC, /* 116 74 */
'u' * CCCC, /* 117 75 */
'v' * CCCC, /* 118 76 */
'w' * CCCC, /* 119 77 */
'x' * CCCC, /* 120 78 */
'y' * CCCC, /* 121 79 */
'z' * CCCC, /* 122 7a */
'{', /* 123 7b */
'|', /* 124 7c */
'}', /* 125 7d */
'~', /* 126 7e */
127, /* 127 7f */
128, /* 128 80 */
129, /* 129 81 */
130, /* 130 82 */
131, /* 131 83 */
132, /* 132 84 */
133, /* 133 85 */
'c' * CCCC + 5, /* 134 86 */
135, /* 135 87 */
'l' * CCCC + 5, /* 136 88 */
137, /* 137 89 */
138, /* 138 8a */
139, /* 139 8b */
140, /* 140 8c */
'z' * CCCC + 1, /* 141 8d */
142, /* 142 8e */
'c' * CCCC + 1, /* 143 8f */
144, /* 144 90 */
145, /* 145 91 */
146, /* 146 92 */
147, /* 147 93 */
148, /* 148 94 */
149, /* 149 95 */
150, /* 150 96 */
's' * CCCC + 1, /* 151 97 */
's' * CCCC + 5, /* 152 98 */
153, /* 153 99 */
154, /* 154 9a */
155, /* 155 9b */
156, /* 156 9c */
'l' * CCCC + 1, /* 157 9d */
158, /* 158 9e */
159, /* 159 9f */
160, /* 160 a0 */
161, /* 161 a1 */
'o' * CCCC + 5, /* 162 a2 */
163, /* 163 a3 */
'a' * CCCC + 1, /* 164 a4 */
'a' * CCCC + 5, /* 165 a5 */
166, /* 166 a6 */
167, /* 167 a7 */
'e' * CCCC + 1, /* 168 a8 */
'e' * CCCC + 5, /* 169 a9 */
170, /* 170 aa */
'z' * CCCC + 5, /* 171 ab */
172, /* 172 ac */
173, /* 173 ad */
174, /* 174 ae */
175, /* 175 af */
176, /* 176 b0 */
177, /* 177 b1 */
178, /* 178 b2 */
179, /* 179 b3 */
180, /* 180 b4 */
181, /* 181 b5 */
182, /* 182 b6 */
183, /* 183 b7 */
184, /* 184 b8 */
185, /* 185 b9 */
186, /* 186 ba */
187, /* 187 bb */
188, /* 188 bc */
'z' * CCCC + 2, /* 189 bd */
'z' * CCCC + 6, /* 190 be */
191, /* 191 bf */
192, /* 192 c0 */
193, /* 193 c1 */
194, /* 194 c2 */
195, /* 195 c3 */
196, /* 196 c4 */
197, /* 197 c5 */
198, /* 198 c6 */
199, /* 199 c7 */
200, /* 200 c8 */
201, /* 201 c9 */
202, /* 202 ca */
203, /* 203 cb */
204, /* 204 cc */
205, /* 205 cd */
206, /* 206 ce */
207, /* 207 cf */
208, /* 208 d0 */
209, /* 209 d1 */
210, /* 210 d2 */
211, /* 211 d3 */
212, /* 212 d4 */
213, /* 213 d5 */
214, /* 214 d6 */
215, /* 215 d7 */
216, /* 216 d8 */
217, /* 217 d9 */
218, /* 218 da */
219, /* 219 db */
220, /* 220 dc */
221, /* 221 dd */
222, /* 222 de */
223, /* 223 df */
'o' * CCCC + 1, /* 224 e0 */
225, /* 225 e1 */
226, /* 226 e2 */
'n' * CCCC + 1, /* 227 e3 */
'n' * CCCC + 5, /* 228 e4 */
229, /* 229 e5 */
230, /* 230 e6 */
231, /* 231 e7 */
232, /* 232 e8 */
233, /* 233 e9 */
234, /* 234 ea */
235, /* 235 eb */
236, /* 236 ec */
237, /* 237 ed */
238, /* 238 ee */
239, /* 239 ef */
240, /* 240 f0 */
241, /* 241 f1 */
242, /* 242 f2 */
243, /* 243 f3 */
244, /* 244 f4 */
245, /* 245 f5 */
246, /* 246 f6 */
247, /* 247 f7 */
248, /* 248 f8 */
249, /* 249 f9 */
250, /* 250 fa */
251, /* 251 fb */
252, /* 252 fc */
253, /* 253 fd */
254, /* 254 fe */
255 /* 255 ff */
};
{% endraw %}

View File

@ -1,593 +0,0 @@
{% raw %}
static p_char_u pl_iso2_day_name_ptr =
{
(char_u *)NULL,
(char_u *)"niedziela",
(char_u *)"poniedzia\0xB3ek",
(char_u *)"wtorek",
(char_u *)"\0xB6roda",
(char_u *)"czwartek",
(char_u *)"pi\0xB1tek",
(char_u *)"sobota",
};
static p_char_u pl_iso2_day_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"nd",
(char_u *)"pn",
(char_u *)"wt",
(char_u *)"\0xB6r",
(char_u *)"cz",
(char_u *)"pt",
(char_u *)"sb",
};
static p_char_u pl_iso2_mon_name_ptr =
{
(char_u *)NULL,
(char_u *)"stycze\0xF1",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xF1",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xF1",
(char_u *)"wrzesie\0xF1",
(char_u *)"pa\0xBCdziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xF1"
};
static p_char_u pl_iso2_mon_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"stycze\0xF1",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xF1",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xF1",
(char_u *)"wrzesie\0xF1",
(char_u *)"pa\0xBCdziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xF1"
};
static int_u pl_iso2_toascii_table =
{
' ', /* 128 0x80 */
' ', /* 129 0x81 */
' ', /* 130 0x82 */
' ', /* 131 0x83 */
' ', /* 132 0x84 */
' ', /* 133 0x85 */
' ', /* 134 0x86 */
' ', /* 135 0x87 */
' ', /* 136 0x88 */
' ', /* 137 0x89 */
' ', /* 138 0x8a */
' ', /* 139 0x8b */
' ', /* 140 0x8c */
' ', /* 141 0x8d */
' ', /* 142 0x8e */
' ', /* 143 0x8f */
' ', /* 144 0x90 */
' ', /* 145 0x91 */
' ', /* 146 0x92 */
' ', /* 147 0x93 */
' ', /* 148 0x94 */
' ', /* 149 0x95 */
' ', /* 150 0x96 */
' ', /* 151 0x97 */
' ', /* 152 0x98 */
' ', /* 153 0x99 */
' ', /* 154 0x9a */
' ', /* 155 0x9b */
' ', /* 156 0x9c */
' ', /* 157 0x9d */
' ', /* 158 0x9e */
' ', /* 159 0x9f */
' ', /* 160 0xa0 */
'A', /* 161 0xa1 */
' ', /* 162 0xa2 */
'L', /* 163 0xa3 */
'o', /* 164 0xa4 */
'L', /* 165 0xa5 */
'S', /* 166 0xa6 */
'S', /* 167 0xa7 */
'"', /* 168 0xa8 */
'S', /* 169 0xa9 */
'S', /* 170 0xaa */
'T', /* 171 0xab */
'Z', /* 172 0xac */
'-', /* 173 0xad */
'Z', /* 174 0xae */
'Z', /* 175 0xaf */
'o', /* 176 0xb0 */
'a', /* 177 0xb1 */
',', /* 178 0xb2 */
'l', /* 179 0xb3 */
180, /* 180 0xb4 */
'l', /* 181 0xb5 */
's', /* 182 0xb6 */
' ', /* 183 0xb7 */
',', /* 184 0xb8 */
's', /* 185 0xb9 */
's', /* 186 0xba */
't', /* 187 0xbb */
'z', /* 188 0xbc */
' ', /* 189 0xbd */
'z', /* 190 0xbe */
'z', /* 191 0xbf */
'R', /* 192 0xc0 */
'A', /* 193 0xc1 */
'A', /* 194 0xc2 */
'A', /* 195 0xc3 */
'A', /* 196 0xc4 */
'L', /* 197 0xc5 */
'C', /* 198 0xc6 */
'C', /* 199 0xc7 */
'C', /* 200 0xc8 */
'E', /* 201 0xc9 */
'E', /* 202 0xca */
'E', /* 203 0xcb */
'E', /* 204 0xcc */
'I', /* 205 0xcd */
'I', /* 206 0xce */
'D', /* 207 0xcf */
'D', /* 208 0xd0 */
'N', /* 209 0xd1 */
'N', /* 210 0xd2 */
'O', /* 211 0xd3 */
'O', /* 212 0xd4 */
'O', /* 213 0xd5 */
'O', /* 214 0xd6 */
'x', /* 215 0xd7 */
'R', /* 216 0xd8 */
'U', /* 217 0xd9 */
'U', /* 218 0xda */
'U', /* 219 0xdb */
'U', /* 220 0xdc */
'Y', /* 221 0xdd */
'J', /* 222 0xde */
'B', /* 223 0xdf */
'r', /* 224 0xe0 */
'a', /* 225 0xe1 */
'a', /* 226 0xe2 */
'a', /* 227 0xe3 */
'a', /* 228 0xe4 */
'l', /* 229 0xe5 */
'c', /* 230 0xe6 */
'c', /* 231 0xe7 */
'c', /* 232 0xe8 */
'e', /* 233 0xe9 */
'e', /* 234 0xea */
'e', /* 235 0xeb */
'e', /* 236 0xec */
'i', /* 237 0xed */
'i', /* 238 0xee */
'd', /* 239 0xef */
'd', /* 240 0xf0 */
'n', /* 241 0xf1 */
'n', /* 242 0xf2 */
'o', /* 243 0xf3 */
'o', /* 244 0xf4 */
'o', /* 245 0xf5 */
'o', /* 246 0xf6 */
':', /* 247 0xf7 */
'r', /* 248 0xf8 */
'u', /* 249 0xf9 */
'u', /* 250 0xfa */
'u', /* 251 0xfb */
'u', /* 252 0xfc */
'y', /* 253 0xfd */
't', /* 254 0xfe */
'.', /* 255 0xff */
};
static a_char_u pl_iso2_lower_table =
{
'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z', '[', '\\', ']', '^', '_',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', '\0xB1', ' ', '\0xB3', ' ', ' ', '\0xB6', ' ',
' ', ' ', ' ', ' ', '\0xBC', ' ', ' ', '\0xBF',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', '\0xE6', ' ',
' ', ' ', '\0xEA', ' ', ' ', ' ', ' ', ' ',
' ', '\0xF1', ' ', '\0xF3', ' ', ' ', ' ', ' ',
};
static a_char_u pl_iso2_upper_table =
{
'A','B','C','D','E','F','G',
'H','I','J','K','L','M','N','O',
'P','Q','R','S','T','U','V','W',
'X','Y','Z','{','|','}','~',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ','\0xA1',' ','\0xA3',' ',' ','\0xA6',' ',
' ',' ',' ',' ','\0xAC',' ',' ','\0xAF',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ','\0xC6',' ',
' ',' ','\0xCA',' ',' ',' ',' ',' ',
' ','\0xD1',' ','\0xD3',' ',' ',' ',' ',
};
static a_char_u pl_iso2_char_type =
{
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK,
IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_BLANK, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,
IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, 0x000,
0x000, 0x000, 0x000, IS_ALPH,
0x000, IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,
IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, 0x000,
0x000, 0x000, 0x000, IS_CTR,
/*--------------*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, IS_UPPER, 0x000, IS_UPPER, /*.\0xA1.\0xA3..\0xA6.*/
0x000, 0x000, IS_UPPER, 0x000,
0x000, 0x000, 0x000, 0x000, /*....\0xAC..\0xAF*/
IS_UPPER, 0x000, 0x000, IS_UPPER,
0x000, IS_LOWER, 0x000, IS_LOWER, /*.\0xB1.\0xB3..\0xB6.*/
0x000, 0x000, IS_LOWER, 0x000,
0x000, 0x000, 0x000, 0x000, /*....\0xBC..\0xBF*/
IS_LOWER, 0x000, 0x000, IS_LOWER,
0x000, 0x000, 0x000, 0x000, /*.......\0xC6.*/
0x000, 0x000, IS_UPPER, 0x000,
0x000, 0x000, IS_UPPER, 0x000, /*..\0xCA.....*/
0x000, 0x000, 0x000, 0x000,
0x000, IS_UPPER, 0x000, IS_UPPER, /*.\0xD1.\0xD3....*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000, /*......\0xE6.*/
0x000, 0x000, IS_LOWER, 0x000,
0x000, 0x000, IS_LOWER, 0x000, /*..\0xEA.....*/
0x000, 0x000, 0x000, 0x000,
0x000, IS_LOWER, 0x000, IS_LOWER, /*.\0xF1.\0xF3....*/
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000
};
static int_u pl_iso2_order_tbl =
{
0, /* 0 */
'', /* 1 */
'', /* 2 */
'', /* 3 */
'', /* 4 */
'', /* 5 */
'', /* 6 */
'', /* 7 */
'', /* 8 */
TAB, /* 9 */
LF, /* 10 0a */
' ', /* 11 0b */
' ', /* 12 0c */
CR, /* 13 0d */
'', /* 14 0e */
'', /* 15 0f */
'', /* 16 10 */
'', /* 17 11 */
'', /* 18 12 */
'', /* 19 13 */
'', /* 20 14 */
'', /* 21 15 */
'', /* 22 16 */
'', /* 23 17 */
'', /* 24 18 */
'', /* 25 19 */
0x1a, /* 26 1a */
'', /* 27 1b */
'', /* 28 1c */
'', /* 29 1d */
'', /* 30 1e */
'', /* 31 1f */
' ', /* 32 20 */
'!', /* 33 21 */
0x22, /* 34 22 quote */
'#', /* 35 23 */
'$', /* 36 24 */
'%', /* 37 25 */
'&', /* 38 26 */
0x27, /* 39 27 single quote */
'(', /* 40 28 */
')', /* 41 29 */
'*', /* 42 2a */
'+', /* 43 2b */
',', /* 44 2c */
'-', /* 45 2d */
'.', /* 46 2e */
'/', /* 47 2f */
'0', /* 48 30 */
'1', /* 49 31 */
'2', /* 50 32 */
'3', /* 51 33 */
'4', /* 52 34 */
'5', /* 53 35 */
'6', /* 54 36 */
'7', /* 55 37 */
'8', /* 56 38 */
'9', /* 57 39 */
':', /* 58 3a */
';', /* 59 3b */
'<', /* 60 3c */
'=', /* 61 3d */
'>', /* 62 3e */
'?', /* 63 3f */
'@', /* 64 40 */
'a' * CCCC + 4, /* 'A', 65 41 */
'b' * CCCC + 4, /* 'B', 66 42 */
'c' * CCCC + 4, /* 'C', 67 43 */
'd' * CCCC + 4, /* 'D', 68 44 */
'e' * CCCC + 4, /* 'E', 69 45 */
'f' * CCCC + 4, /* 'F', 70 46 */
'g' * CCCC + 4, /* 'G', 71 47 */
'h' * CCCC + 4, /* 'H', 72 48 */
'i' * CCCC + 4, /* 'I', 73 49 */
'j' * CCCC + 4, /* 'J', 74 4a */
'k' * CCCC + 4, /* 'K', 75 4b */
'l' * CCCC + 4, /* 'L', 76 4c */
'm' * CCCC + 4, /* 'M', 77 4d */
'n' * CCCC + 4, /* 'N', 78 4e */
'o' * CCCC + 4, /* 'O', 79 4f */
'p' * CCCC + 4, /* 'P', 80 50 */
'q' * CCCC + 4, /* 'Q', 81 51 */
'r' * CCCC + 4, /* 'R', 82 52 */
's' * CCCC + 4, /* 'S', 83 53 */
't' * CCCC + 4, /* 'T', 84 54 */
'u' * CCCC + 4, /* 'U', 85 55 */
'v' * CCCC + 4, /* 'V', 86 56 */
'w' * CCCC + 4, /* 'W', 87 57 */
'x' * CCCC + 4, /* 'X', 88 58 */
'y' * CCCC + 4, /* 'Y', 89 59 */
'z' * CCCC + 4, /* 'Z', 90 5a */
0x5b, /* 91 5b */
0x5c, /* 92 5c */
0x5d, /* 93 5d ] */
0x5e, /* 94 5e */
'_', /* 95 5f */
0x60, /* 96 60 ` */
'a' * CCCC, /* 97 61 */
'b' * CCCC, /* 98 62 */
'c' * CCCC, /* 99 63 */
'd' * CCCC, /* 100 64 */
'e' * CCCC, /* 101 65 */
'f' * CCCC, /* 102 66 */
'g' * CCCC, /* 103 67 */
'h' * CCCC, /* 104 68 */
'i' * CCCC, /* 105 69 */
'j' * CCCC, /* 106 6a */
'k' * CCCC, /* 107 6b */
'l' * CCCC, /* 108 6c */
'm' * CCCC, /* 109 6d */
'n' * CCCC, /* 110 6e */
'o' * CCCC, /* 111 6f */
'p' * CCCC, /* 112 70 */
'q' * CCCC, /* 113 71 */
'r' * CCCC, /* 114 72 */
's' * CCCC, /* 115 73 */
't' * CCCC, /* 116 74 */
'u' * CCCC, /* 117 75 */
'v' * CCCC, /* 118 76 */
'w' * CCCC, /* 119 77 */
'x' * CCCC, /* 120 78 */
'y' * CCCC, /* 121 79 */
'z' * CCCC, /* 122 7a */
'{', /* 123 7b */
'|', /* 124 7c */
'}', /* 125 7d */
'~', /* 126 7e */
'', /* 127 7f */
'\0x80', /* 128 80 */
'\0x81', /* 129 81 */
'\0x82', /* 130 82 */
'\0x83', /* 131 83 */
'\0x84', /* 132 84 */
'\0x85', /* 133 85 */
'\0x86', /* 134 86 */
'\0x87', /* 135 87 */
'\0x88', /* 136 88 */
'\0x89', /* 137 89 */
'\0x8A', /* 138 8a */
'\0x8B', /* 139 8b */
'\0x8C', /* 140 8c */
'\0x8D', /* 141 8d */
'\0x8E', /* 142 8e */
'\0x8F', /* 143 8f */
'\0x90', /* 144 90 */
'\0x91', /* 145 91 */
'\0x92', /* 146 92 */
'\0x93', /* 147 93 */
'\0x94', /* 148 94 */
'\0x95', /* 149 95 */
'\0x96', /* 150 96 */
'\0x97', /* 151 97 */
'\0x98', /* 152 98 */
'\0x99', /* 153 99 */
'\0x9A', /* 154 9a */
'\0x9B', /* 155 9b */
'\0x9C', /* 156 9c */
'\0x9D', /* 157 9d */
'\0x9E', /* 158 9e */
'\0x9F', /* 159 9f */
160, /* a0 */
'a' * CCCC + 5, /* 161 a1 */
162, /* a2 */
'l' * CCCC + 5, /* 163 a3 */
164, /* a4 */
165, /* a5 */
's' * CCCC + 5, /* 166 a6 */
167, /* a7 */
168, /* a8 */
169, /* a9 */
170, /* aa */
171, /* ab */
'z' * CCCC + 5, /* 172 ac */
173, /* ad */
174, /* ae */
'z' * CCCC + 6, /* 175 af */
176, /* b0 */
'a' * CCCC + 1, /* 177 b1 */
178, /* b2 */
'l' * CCCC + 1, /* 179 b3 */
180, /* b4 */
181, /* b5 */
's' * CCCC + 1, /* 182 b6 */
183, /* b7 */
184, /* b8 */
185, /* b9 */
186, /* ba */
187, /* bb */
'z' * CCCC + 1, /* 188 bc */
189, /* bd */
190, /* be */
'z' * CCCC + 2, /* 191 bf */
192, /* c0 */
193, /* c1 */
194, /* c2 */
195, /* c3 */
196, /* c4 */
197, /* c5 */
'c' * CCCC + 5, /* 198 c6 */
199, /* c7 */
200, /* c8 */
201, /* c9 */
'e' * CCCC + 5, /* 202 ca */
203, /* cb */
204, /* cc */
205, /* cd */
206, /* ce */
207, /* cf */
208, /* d0 */
'n' * CCCC + 5, /* 209 d1 */
210, /* d2 */
'o' * CCCC + 5, /* 211 d3 */
212, /* d4 */
213, /* d5 */
214, /* d6 */
215, /* d7 */
216, /* d8 */
217, /* d9 */
218, /* da */
219, /* db */
220, /* dc */
221, /* dd */
222, /* de */
223, /* df */
224, /* e0 */
225, /*e1 */
226, /* e2 */
227, /* e3 */
228, /* e4 */
229, /* e5 */
'c' * CCCC + 1, /* 230 e6 \0xE6*/
231, /* e7 */
232, /* e8 */
233, /* e9 */
'e' * CCCC + 1, /* 234 ea */
235, /* eb */
236, /* ec */
237, /* ed */
238, /* ee */
239, /* ef */
240, /* f0 */
'n' * CCCC + 1, /* 241 f1 */
242, /* f2 */
'o' * CCCC + 1, /* 243 f3 */
244, /* f4 */
245, /* f5 */
246, /* f6 */
247, /* f7 */
248, /* f8 */
249, /* f9 */
250, /* fa */
251, /* fb */
252, /* fc */
253, /* fd */
254, /* fe */
255 /* 255 ff */
};
{% endraw %}

View File

@ -1,546 +0,0 @@
{% raw %}
static p_char_u pl_maz_day_name_ptr =
{
(char_u *)NULL,
(char_u *)"niedziela",
(char_u *)"poniedzia\0x92ek",
(char_u *)"wtorek",
(char_u *)"\0x9Eroda",
(char_u *)"czwartek",
(char_u *)"pi\0x86tek",
(char_u *)"sobota",
};
static p_char_u pl_maz_day_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"nd",
(char_u *)"pn",
(char_u *)"wt",
(char_u *)"\0x9Er",
(char_u *)"cz",
(char_u *)"pt",
(char_u *)"sb",
};
static p_char_u pl_maz_mon_name_ptr =
{
(char_u *)NULL,
(char_u *)"stycze\0xA4",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xA4",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xA4",
(char_u *)"wrzesie\0xA4",
(char_u *)"pa\0xA6dziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xA4"
};
static p_char_u pl_maz_mon_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"stycze\0xA4",
(char_u *)"luty",
(char_u *)"marzec",
(char_u *)"kwiecie\0xA4",
(char_u *)"maj",
(char_u *)"czerwiec",
(char_u *)"lipiec",
(char_u *)"sierpie\0xA4",
(char_u *)"wrzesie\0xA4",
(char_u *)"pa\0xA6dziernik",
(char_u *)"listopad",
(char_u *)"grudzie\0xA4"
};
static int_u pl_maz_toascii_table =
{
'C', /* 128 0x80 */
'u', /* 129 0x81 */
'e', /* 130 0x82 */
'a', /* 131 0x83 */
'a', /* 132 0x84 */
'a', /* 133 0x85 */
'a', /* 134 0x86 */
'c', /* 135 0x87 */
'e', /* 136 0x88 */
'e', /* 137 0x89 */
'e', /* 138 0x8a */
'i', /* 139 0x8b */
'i', /* 140 0x8c */
'c', /* 141 0x8d */
'A', /* 142 0x8e */
'A', /* 143 0x8f */
'E', /* 144 0x90 */
'e', /* 145 0x91 */
'l', /* 146 0x92 */
'o', /* 147 0x93 */
'o', /* 148 0x94 */
'C', /* 149 0x95 */
'u', /* 150 0x96 */
'u', /* 151 0x97 */
'S', /* 152 0x98 */
'O', /* 153 0x99 */
'U', /* 154 0x9a */
'c', /* 155 0x9b */
'L', /* 156 0x9c */
'Y', /* 157 0x9d */
's', /* 158 0x9e */
'f', /* 159 0x9f */
'Z', /* 160 0xa0 */
'Z', /* 161 0xa1 */
'o', /* 162 0xa2 */
'O', /* 163 0xa3 */
'n', /* 164 0xa4 */
'N', /* 165 0xa5 */
'z', /* 166 0xa6 */
'z', /* 167 0xa7 */
'?', /* 168 0xa8 */
'!', /* 169 0xa9 */
'!', /* 170 0xaa */
' ', /* 171 0xab */
' ', /* 172 0xac */
'!', /* 173 0xad */
'<', /* 174 0xae */
'>', /* 175 0xaf */
'|', /* 176 0xb0 */
'|', /* 177 0xb1 */
'|', /* 178 0xb2 */
'|', /* 179 0xb3 */
'|', /* 180 0xb4 */
'|', /* 181 0xb5 */
'|', /* 182 0xb6 */
'|', /* 183 0xb7 */
'|', /* 184 0xb8 */
'|', /* 185 0xb9 */
'|', /* 186 0xba */
'|', /* 187 0xbb */
'+', /* 188 0xbc */
'+', /* 189 0xbd */
'+', /* 190 0xbe */
'+', /* 191 0xbf */
'+', /* 192 0xc0 */
'+', /* 193 0xc1 */
'+', /* 194 0xc2 */
'|', /* 195 0xc3 */
'-', /* 196 0xc4 */
'|', /* 197 0xc5 */
'|', /* 198 0xc6 */
'|', /* 199 0xc7 */
'|', /* 200 0xc8 */
'|', /* 201 0xc9 */
'-', /* 202 0xca */
'-', /* 203 0xcb */
'|', /* 204 0xcc */
'-', /* 205 0xcd */
'|', /* 206 0xce */
'-', /* 207 0xcf */
'-', /* 208 0xd0 */
'-', /* 209 0xd1 */
'-', /* 210 0xd2 */
'|', /* 211 0xd3 */
'|', /* 212 0xd4 */
'|', /* 213 0xd5 */
'|', /* 214 0xd6 */
'|', /* 215 0xd7 */
'|', /* 216 0xd8 */
'-', /* 217 0xd9 */
'-', /* 218 0xda */
'|', /* 219 0xdb */
'-', /* 220 0xdc */
'|', /* 221 0xdd */
'|', /* 222 0xde */
'-', /* 223 0xdf */
'a', /* 224 0xe0 */
's', /* 225 0xe1 */
'G', /* 226 0xe2 */
'p', /* 227 0xe3 */
'S', /* 228 0xe4 */
's', /* 229 0xe5 */
'm', /* 230 0xe6 */
't', /* 231 0xe7 */
'p', /* 232 0xe8 */
'H', /* 233 0xe9 */
'O', /* 234 0xea */
'd', /* 235 0xeb */
'o', /* 236 0xec */
'o', /* 237 0xed */
'e', /* 238 0xee */
'n', /* 239 0xef */
'=', /* 240 0xf0 */
'+', /* 241 0xf1 */
'>', /* 242 0xf2 */
'<', /* 243 0xf3 */
'f', /* 244 0xf4 */
'f', /* 245 0xf5 */
'/', /* 246 0xf6 */
'=', /* 247 0xf7 */
'o', /* 248 0xf8 */
'.', /* 249 0xf9 */
'.', /* 250 0xfa */
' ', /* 251 0xfb */
' ', /* 252 0xfc */
'2', /* 253 0xfd */
'.', /* 254 0xfe */
' ', /* 255 0xff */
};
static a_char_u pl_maz_lower_table =
{
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
'y', 'z', '[', '\\', ']', '^', '_',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
' ', ' ', ' ', ' ', ' ', ' ', ' ', '\0x86',
'\0x91', ' ', ' ', ' ', ' ', '\0x8D', ' ', ' ',
'\0x9E', ' ', ' ', ' ', '\0x92', ' ', ' ', ' ',
'\0xA6', '\0xA7', ' ', '\0xA2', ' ', '\0xA4'
};
static a_char_u pl_maz_upper_table =
{
'A','B','C','D','E','F','G','H',
'I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X',
'Y','Z','{','|','}','~',' ',
' ',' ',' ',' ',' ',' ','\0x8F',' ',
' ',' ',' ',' ',' ','\0x95',' ',' ',
' ','\0x90','\0x9C',' ',' ',' ',' ',' ',
' ',' ',' ',' ',' ',' ','\0x98',' ',
'\0xA0',' ','\0xA3',' ','\0xA5',' ','\0xA0','\0xA1'
};
static a_char_u pl_maz_char_type =
{
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK,
IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_BLANK, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,
IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, 0x000,
0x000, 0x000, 0x000, IS_ALPH,
0x000, IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,
IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, 0x000,
0x000, 0x000, 0x000, IS_CTR,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, IS_LOWER, 0x000, /* 84 */
/* a ogonek */
0x000, 0x000, 0x000, 0x000, /* 88 */
0x000, IS_LOWER, 0x000, IS_UPPER, /* 8c */
/* c acute*/ /* A ogonek*/
IS_UPPER, IS_LOWER, IS_LOWER, 0x000, /* 90 */
/*E ogonek */ /*e ogonek */ /* polish l */
0x000, IS_UPPER, 0x000, 0x000, /* 94 */
/* C acute */
IS_UPPER, 0x000, 0x000, 0x000, /* 98 */
/* S acute */
IS_UPPER, 0x000, IS_LOWER, 0x000, /* 9c */
/* Polish L */ /* s acute */
IS_UPPER, IS_UPPER, IS_LOWER, IS_UPPER, /* a0 */
/* Z acute */ /* Z dot */ /* o acute */ /* O acute*/
IS_LOWER, IS_UPPER, IS_LOWER, IS_LOWER, /* a4 */
/*n acute */ /* N acute */ /* z acute */ /* z dot */
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000
};
static int_u pl_maz_order_tbl =
{
0, 1, 2, 3, 4, 5, 6, 7,
8,
TAB, /* 9 */
LF, /* 10 0a */
11,
12,
CR, /* 13 0d */
14,
15,
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
' ', /* 32 20 */
'!', /* 33 21 */
0x22, /* 34 22 quote */
'#', /* 35 23 */
'$', /* 36 24 */
'%', /* 37 25 */
'&', /* 38 26 */
0x27, /* 39 27 single quote */
'(', /* 40 28 */
')', /* 41 29 */
'*', /* 42 2a */
'+', /* 43 2b */
',', /* 44 2c */
'-', /* 45 2d */
'.', /* 46 2e */
'/', /* 47 2f */
'0', /* 48 30 */
'1', /* 49 31 */
'2', /* 50 32 */
'3', /* 51 33 */
'4', /* 52 34 */
'5', /* 53 35 */
'6', /* 54 36 */
'7', /* 55 37 */
'8', /* 56 38 */
'9', /* 57 39 */
':', /* 58 3a */
';', /* 59 3b */
'<', /* 60 3c */
'=', /* 61 3d */
'>', /* 62 3e */
'?', /* 63 3f */
'@', /* 64 40 */
'a' * CCCC + 4, /* 'A', 65 41 */
'b' * CCCC + 4, /* 'B', 66 42 */
'c' * CCCC + 4, /* 'C', 67 43 */
'd' * CCCC + 4, /* 'D', 68 44 */
'e' * CCCC + 4, /* 'E', 69 45 */
'f' * CCCC + 4, /* 'F', 70 46 */
'g' * CCCC + 4, /* 'G', 71 47 */
'h' * CCCC + 4, /* 'H', 72 48 */
'i' * CCCC + 4, /* 'I', 73 49 */
'j' * CCCC + 4, /* 'J', 74 4a */
'k' * CCCC + 4, /* 'K', 75 4b */
'l' * CCCC + 4, /* 'L', 76 4c */
'm' * CCCC + 4, /* 'M', 77 4d */
'n' * CCCC + 4, /* 'N', 78 4e */
'o' * CCCC + 4, /* 'O', 79 4f */
'p' * CCCC + 4, /* 'P', 80 50 */
'q' * CCCC + 4, /* 'Q', 81 51 */
'r' * CCCC + 4, /* 'R', 82 52 */
's' * CCCC + 4, /* 'S', 83 53 */
't' * CCCC + 4, /* 'T', 84 54 */
'u' * CCCC + 4, /* 'U', 85 55 */
'v' * CCCC + 4, /* 'V', 86 56 */
'w' * CCCC + 4, /* 'W', 87 57 */
'x' * CCCC + 4, /* 'X', 88 58 */
'y' * CCCC + 4, /* 'Y', 89 59 */
'z' * CCCC + 4, /* 'Z', 90 5a */
0x5b, /* 91 5b */
0x5c, /* 92 5c */
0x5d, /* 93 5d ] */
0x5e, /* 94 5e */
'_', /* 95 5f */
0x60, /* 96 60 ` */
'a' * CCCC, /* 97 61 */
'b' * CCCC, /* 98 62 */
'c' * CCCC, /* 99 63 */
'd' * CCCC, /* 100 64 */
'e' * CCCC, /* 101 65 */
'f' * CCCC, /* 102 66 */
'g' * CCCC, /* 103 67 */
'h' * CCCC, /* 104 68 */
'i' * CCCC, /* 105 69 */
'j' * CCCC, /* 106 6a */
'k' * CCCC, /* 107 6b */
'l' * CCCC, /* 108 6c */
'm' * CCCC, /* 109 6d */
'n' * CCCC, /* 110 6e */
'o' * CCCC, /* 111 6f */
'p' * CCCC, /* 112 70 */
'q' * CCCC, /* 113 71 */
'r' * CCCC, /* 114 72 */
's' * CCCC, /* 115 73 */
't' * CCCC, /* 116 74 */
'u' * CCCC, /* 117 75 */
'v' * CCCC, /* 118 76 */
'w' * CCCC, /* 119 77 */
'x' * CCCC, /* 120 78 */
'y' * CCCC, /* 121 79 */
'z' * CCCC, /* 122 7a */
'{', /* 123 7b */
'|', /* 124 7c */
'}', /* 125 7d */
'~', /* 126 7e */
127,
128,
129,
130,
131,
132,
133,
'a' * CCCC + 1, /* aogonek 134 86 */
135,
136,
137,
138,
139,
140,
'c' * CCCC + 1, /* c acute 141 8d */
142,
'a' * CCCC + 5, /* Aogonek 143 8f */
'e' * CCCC + 5, /* Eogonek 144 90 */
'e' * CCCC + 1, /* eogonek 145 91 */
'l' * CCCC + 1, /* polish l 146 92 */
147,
148,
'c' * CCCC + 5, /* O acute 149 95 */
150,
151,
's' * CCCC + 5, /* S acute 152 98 */
153,
154,
155,
'l' * CCCC + 5, /* polish L 156 9c */
157,
's' * CCCC + 1, /* s acute 158 9e */
159,
'z' * CCCC + 5, /* Z dot 160 a0 */
'z' * CCCC + 6, /* Z acute 161 a1 */
'o' * CCCC + 1, /* o acute 162 a2 */
'o' * CCCC + 5, /* O acute 163 a3 */
'n' * CCCC + 1, /* n acute 164 a4 */
'n' * CCCC + 5, /* N acute 165 a5 */
'z' * CCCC + 1, /* z dot 166 a6 */
'z' * CCCC + 2, /* z acute 167 a7 */
168, 169, 170, 171, 172, 173, 174, 175,
176, 177, 178, 179, 180, 181, 182, 183,
184, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199,
200, 201, 202, 203, 204, 205, 206, 207,
208, 209, 210, 211, 212, 213, 214, 215,
216, 217, 218, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 229, 230, 231,
232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247,
248, 249, 250, 251, 252, 253, 254, 255
};
/*
static p_char_u maz_jedn =
{
(char_u *)"???",
(char_u *)"jeden",
(char_u *)"dwa",
(char_u *)"trzy",
(char_u *)"cztery",
(char_u *)"pie\0x8D",
(char_u *)"sze\0x9E\0x8D",
(char_u *)"siedem",
(char_u *)"osiem",
(char_u *)"dziewi\0x91\0x8D",
(char_u *)"dziesi\0x91\0x8D",
(char_u *)"jedena\0x9Ecie",
(char_u *)"dwana\0x9Ecie",
(char_u *)"trzyna\0x9Ecie",
(char_u *)"czterna\0x9Ecie",
(char_u *)"pi\0x91tna\0x9Ecie",
(char_u *)"szesna\0x9Ecie",
(char_u *)"siedemna\0x9Ecie",
(char_u *)"osiemna\0x9Ecie",
(char_u *)"dziewi\0x91tna\0x9Ecie"
};
static p_char_u maz_dies =
{
(char_u *)"???",
(char_u *)"dwadzie\0x9Ecia",
(char_u *)"trzydzie\0x9Eci",
(char_u *)"czterdzie\0x9Eci",
(char_u *)"pie\0x8Ddziesi\0x86t",
(char_u *)"sze\0x9Ecdziesi\0x86t",
(char_u *)"siedemdziesi\0x86t",
(char_u *)"osiemdziesi\0x86t",
(char_u *)"dziewi\0x91\0x8Ddziesi\0x86t"
};
static p_char_u maz_setki =
{
(char_u *)"???",
(char_u *)"sto",
(char_u *)"dwie\0x9Ecie",
(char_u *)"trzysta",
(char_u *)"czterysta",
(char_u *)"pie\0x8Dset",
(char_u *)"sze\0x9E\0x8Dset",
(char_u *)"siedemset",
(char_u *)"osiemset",
(char_u *)"dziewi\0x91\0x8Dset"
};
static p_char_u maz_tys =
{
(char_u *)"???",
(char_u *)"tysi\0x86c",
(char_u *)"tysi\0x86ce",
(char_u *)"tysi\0x86ce",
(char_u *)"tysi\0x86ce",
(char_u *)"tysi\0x91cy"
};
static p_char_u maz_mil =
{
(char_u *)"???",
(char_u *)"milion",
(char_u *)"miliony",
(char_u *)"miliony",
(char_u *)"miliony",
(char_u *)"milion\0xA2w"
};
static struct decode maz_decode =
{
&maz_jedn,
&maz_dies,
&maz_setki,
&maz_tys,
&maz_mil
}; */
/* ******************************************************************* */
{% endraw %}

View File

@ -1,228 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* This file is public domain software donated by
* Nelson Beebe (beebe@science.utah.edu).
*
*/
/*
* qsort.c: Our own version of the system qsort routine which is faster by an
* average of 25%, with lows and highs of 10% and 50%. The THRESHold below is
* the insertion sort threshold, and has been adjusted for records of size 48
* bytes. The MTHREShold is where we stop finding a better median.
*/
/* #include <stdio.h> -- mkind.h includes this */
#include "mkind.h" /* only for type declarations */
#define THRESH 4 /* threshold for insertion */
#define MTHRESH 6 /* threshold for median */
Local int qsz; /* size of each record */
Local int thresh; /* THRESHold in chars */
Local int mthresh; /* MTHRESHold in chars */
Local int (*qcmp) (char*,char*); /* the comparison routine */
Local void qst (char *base, char *max);
/*
* qqsort: First, set up some global parameters for qst to share. Then,
* quicksort with qst(), and then a cleanup insertion sort ourselves. Sound
* simple? It's not...
*/
Public void
qqsort(char *base, int n, int size, int (*compar) (char*, char*))
{
register char *i;
register char *j;
register char *lo;
register char *hi;
register char *min;
register char c;
char *max;
if(n <= 1)
return;
qsz = size;
qcmp = compar;
thresh = qsz * THRESH;
mthresh = qsz * MTHRESH;
max = base + n * qsz;
if(n >= THRESH)
{
qst(base, max);
hi = base + thresh;
}
else
hi = max;
/*
* First put smallest element, which must be in the first THRESH, in the
* first position as a sentinel. This is done just by searching the
* first THRESH elements (or the first n if n < THRESH), finding the min,
* and swapping it into the first position.
*/
for(j = lo = base; (lo += qsz) < hi; )
if((*qcmp) (j, lo) > 0)
j = lo;
if(j != base)
{ /* swap j into place */
for(i = base, hi = base + qsz; i < hi; )
{
c = *j;
*j++ = *i;
*i++ = c;
}
}
/*
* With our sentinel in place, we now run the following hyper-fast
* insertion sort. For each remaining element, min, from [1] to [n-1],
* set hi to the index of the element AFTER which this one goes. Then, do
* the standard insertion sort shift on a character at a time basis for
* each element in the frob.
*/
for(min = base; (hi = min += qsz) < max; )
{
while((*qcmp) (hi -= qsz, min) > 0)
;
if((hi += qsz) != min)
for(lo = min + qsz; --lo >= min; )
{
c = *lo;
for(i = j = lo; (j -= qsz) >= hi; i = j)
*i = *j;
*i = c;
}
}
}
/*
* qst: Do a quicksort. First, find the median element, and put that one in
* the first place as the discriminator. (This "median" is just the median
* of the first, last and middle elements). (Using this median instead of
* the first element is a big win). Then, the usual partitioning/swapping,
* followed by moving the discriminator into the right place. Then, figure
* out the sizes of the two partions, do the smaller one recursively and the
* larger one via a repeat of this code. Stopping when there are less than
* THRESH elements in a partition and cleaning up with an insertion sort (in
* our caller) is a huge win. All data swaps are done in-line, which is
* space-losing but time-saving. (And there are only three places where this
* is done).
*/
Local void
qst(char *base, char *max)
{
register char *i;
register char *j;
register char *jj;
register char *mid;
register int ii;
register char c;
char *tmp;
int lo;
int hi;
lo = (int)(max - base); /* number of elements as chars */
do
{
/*
* At the top here, lo is the number of characters of elements in the
* current partition. (Which should be max - base). Find the median
* of the first, last, and middle element and make that the middle
* element. Set j to largest of first and middle. If max is larger
* than that guy, then it's that guy, else compare max with loser of
* first and take larger. Things are set up to prefer the middle,
* then the first in case of ties.
*/
mid = i = base + qsz * ((unsigned) (lo / qsz) >> 1);
if(lo >= mthresh)
{
j = ((*qcmp) ((jj = base), i) > 0 ? jj : i);
if((*qcmp) (j, (tmp = max - qsz)) > 0)
{
/* switch to first loser */
j = (j == jj ? i : jj);
if((*qcmp) (j, tmp) < 0)
j = tmp;
}
if(j != i)
{
ii = qsz;
do
{
c = *i;
*i++ = *j;
*j++ = c;
}while(--ii);
}
}
/* Semi-standard quicksort partitioning/swapping */
for(i = base, j = max - qsz;;)
{
while(i < mid && (*qcmp) (i, mid) <= 0)
i += qsz;
while(j > mid)
{
if((*qcmp) (mid, j) <= 0)
{
j -= qsz;
continue;
}
tmp = i + qsz; /* value of i after swap */
if(i == mid)
/* j <-> mid, new mid is j */
mid = jj = j;
else
{ /* i <-> j */
jj = j;
j -= qsz;
}
goto swap;
}
if(i == mid)
break;
else
{ /* i <-> mid, new mid is i */
jj = mid;
tmp = mid = i; /* value of i after swap */
j -= qsz;
}
swap:
ii = qsz;
do
{
c = *i;
*i++ = *jj;
*jj++ = c;
}while(--ii);
i = tmp;
}
/*
* Look at sizes of the two partitions, do the smaller one first by
* recursion, then do the larger one by making sure lo is its size,
* base and max are update correctly, and branching back. But only
* repeat (recursively or by branching) if the partition is of at
* least size THRESH.
*/
i = (j = mid) + qsz;
if((lo = (int)(j - base)) <= (hi = (int)(max - i)))
{
if(lo >= thresh)
qst(base, j);
base = i;
lo = hi;
}
else
{
if(hi >= thresh)
qst(i, max);
max = j;
}
}while(lo >= thresh);
}

View File

@ -1,877 +0,0 @@
#include "mkind.h"
#include "scanid.h"
#include <stdarg.h>
#define CHECK_LENGTH() \
if(i > len_field)\
goto OVERFLOW
Local int idx_lc; /* line count */
Local int idx_tc; /* total entry count */
Local int idx_ec; /* erroneous entry count */
Public int idx_dc; /* number of dots printed so far */
Local Logical first_entry = True;
Local int comp_len;
Local unsigned char key[ARGUMENT_MAX];
Local char no[NUMBER_MAX];
NODE_PTR head;
NODE_PTR tail;
Local void Idx_Error (const char *fmt, ...);
Local int Idx_Skipline (VOID_ARG);
Local void flush_to_eol (void);
Local Logical make_key (void);
Local void make_string (unsigned char **ppstr, int n);
Local Logical scan_alpha_lower (unsigned char *no, short *npg, \
short *count);
Local Logical scan_alpha_upper (unsigned char *no, short *npg, \
short *count);
Local Logical scan_arabic (unsigned char *no,short *npg, short *count);
Local Logical scan_arg1 (void);
Local Logical scan_arg2 (void);
Local Logical scan_field (int *n, unsigned char field[], int len_field,
Logical ck_level, Logical ck_encap, Logical ck_actual);
Local Logical scan_key (struct KFIELD *data);
Local Logical scan_no (unsigned char *no, short *npg, short *count, \
short *type);
Local Logical scan_roman_lower (unsigned char *no, short *npg, \
short *count);
Local Logical scan_roman_upper (unsigned char *no, short *npg, \
short *count);
Public void
scan_idx(VOID_ARG)
{
unsigned char *keyword;
int c;
int i = 0;
Logical not_eof = True;
int arg_count = -1;
if((keyword = (unsigned char *) calloc(1, ARRAY_MAX)) == NULL)
Fatal("Not enough core...abort.\n");
Message("Scanning input file %s...", idx_fn);
idx_lc = idx_tc = idx_ec = idx_dc = 0;
comp_len = strlen(page_comp);
while(not_eof)
{
switch(c = GET_CHAR(idx_fp))
{
case EOF:
if(arg_count == 2)
{
idx_lc++;
if(make_key())
{
idx_dot = True;
if(idx_dc++ == 0)
Message(DOT);
if(idx_dc == DOT_MAX)
idx_dc = 0;
}
arg_count = -1;
}
else
not_eof = False;
break;
case LFD:
idx_lc++;
if(arg_count == 2)
{
if(make_key())
{
idx_dot = True;
if(idx_dc++ == 0)
Message(DOT);
if(idx_dc == DOT_MAX)
idx_dc = 0;
}
arg_count = -1;
}
else if(arg_count > -1)
{
Idx_Error("Missing arguments -- need two " \
"(premature LFD).\n");
arg_count = -1;
}
case TAB:
case SPC:
break;
default:
switch(arg_count)
{
case -1:
i = 0;
keyword[i++] = (unsigned char) c;
arg_count++;
idx_tc++;
break;
case 0:
if(c == idx_aopen)
{
arg_count++;
keyword[i] = EOS;
if(STREQ(keyword, idx_keyword))
{
if(!scan_arg1())
arg_count = -1;
}
else
{
arg_count = Idx_Skipline();
Idx_Error("Unknown index keyword %s.\n",
keyword);
}
}
else
{
if(i < ARRAY_MAX)
keyword[i++] = (char) c;
else
{
arg_count = Idx_Skipline();
Idx_Error("Index keyword %s too long " \
"(max %d).\n", keyword, ARRAY_MAX);
}
}
break;
case 1:
if(c == idx_aopen)
{
arg_count++;
if(!scan_arg2())
arg_count = -1;
}
else
{
arg_count = Idx_Skipline();
Idx_Error("No opening delimiter for second " \
"argument (illegal character `%c').\n", c);
}
break;
case 2:
arg_count = Idx_Skipline();
Idx_Error("No closing delimiter for second argument " \
"(illegal character `%c').\n", c);
break;
}
break;
}
}
/* {
NODE_PTR aqq;
aqq = head;
while(aqq->next != NULL)
{
int i = 0;
for(i = 0; i < FIELD_MAX; i++)
printf("%s\n", aqq->data.sf[i]);
aqq = aqq->next;
}
}*/
/* fixup the total counts */
idx_tt += idx_tc;
idx_et += idx_ec;
free(keyword);
CLOSE(idx_fp);
Message("done (%d %s, %d %s).\n", idx_tc - idx_ec, "entries accepted",
idx_ec, "rejected");
}
Local void
flush_to_eol(VOID_ARG)
{ /* flush to end-of-line, or end-of-file, whichever is first */
int a;
while(((a = GET_CHAR(idx_fp)) != LFD) && (a != EOF))
;/* NO-OP */
}
Local Logical
make_key(VOID_ARG)
{
NODE_PTR ptr;
int i;
/* allocate and initialize a node */
#ifdef DEBUG
totmem += sizeof(NODE);
(void)fprintf(stderr,"make_key(): malloc(%d)\ttotmem = %ld\n",
sizeof(NODE), totmem);
#endif /* DEBUG */
if((ptr = (NODE_PTR) malloc(sizeof(NODE))) == NULL)
Fatal("Not enough core...abort.\n");
for(i = 0; i < FIELD_MAX; i++)
{
ptr->data.sf[i] = EMPTY_STRING; /* initialize fields to pointers */;
ptr->data.af[i] = EMPTY_STRING; /* to constant empty strings */
}
ptr->data.encap = EMPTY_STRING;
ptr->data.lpg[0] = EOS;
ptr->data.count = 0;
ptr->data.type = EMPTY;
/* process index key */
if(!scan_key(&(ptr->data)))
return(False); /* WM OK*/
/* determine group type */
ptr->data.group = group_type(ptr->data.sf[0]);
/* process page number */
strcpy(ptr->data.lpg, no);
if(!scan_no((unsigned char *)no, ptr->data.npg, &(ptr->data.count),
&(ptr->data.type)))
return(False);
if(first_entry)
{
head = tail = ptr;
first_entry = False;
}
else
{
tail->next = ptr;
tail = ptr;
}
ptr->data.lc = idx_lc;
ptr->data.fn = idx_fn;
tail->next = NULL;
return(True);
}
Local void
make_string(unsigned char **ppstr, int n)
{
if((*ppstr)[0] == EOS) /* then we have an empty string */
{
(*ppstr) = (unsigned char*)malloc(n);
if((*ppstr) == (unsigned char*)NULL)
Fatal("Not enough core...abort.\n");
(*ppstr)[0] = EOS;
}
}
Local Logical
scan_key(FIELD_PTR data)
{
int i = 0; /* current level */
int n = 0; /* index to the key[] array */
int second_round = False;
int last = FIELD_MAX - 1;
while(True)
{
if(key[n] == EOS)
break;
if(key[n] == idx_encap)
{
n++;
make_string(&(data->encap), strlen((char *)key) + 1);
if(scan_field(&n, data->encap, strlen((char *)key), False, False,
False))
break;
else
return(False);
}
if(key[n] == idx_actual)
{
n++;
make_string(&(data->af[i]), strlen((char *)key) + 1);
if(i == last)
{
if(!scan_field(&n, data->af[i], strlen((char *)key),
False, True, False))
return(False);
}
else
{
if(!scan_field(&n, data->af[i], strlen((char *)key), True,
True, False))
return(False);
}
}
else
{
/* Next nesting level */
if(second_round)
{
i++;
n++;
}
make_string(&(data->sf[i]), strlen((char *)key) + 1);
if(i == last)
{
if(!scan_field(&n, data->sf[i], strlen((char *)key), False,
True, True))
return(False);
}
else
{
if(!scan_field(&n, data->sf[i], strlen((char *)key), True,
True, True))
return(False);
}
second_round = True;
}
if((multilanguage[Language].flags & SPECIAL_FLAG) &&
multilanguage[Language]._special != NULL &&
(isdigit(data->sf[i][0]) && data->af[i][0] == EOS))
{
data->af[i] = data->sf[i];
data->sf[i] = (unsigned char *)
(*(multilanguage[Language]._special))(atol((char *)data->af[i]));
}
}
/* check for empty fields which shouldn't be empty */
if(*data->sf[0] == EOS)
{
Idx_Error("Illegal null field.\n");
return(False);
}
for(i = 1; i < FIELD_MAX - 1; i++)
if((*data->sf[i] == EOS) &&
((*data->af[i] != EOS) || (*data->sf[i + 1] != EOS)))
{
Idx_Error("Illegal null field.\n");
return(False);
}
/* i == FIELD_MAX-1 */
if((*data->sf[i] == EOS) && (*data->af[i] != EOS))
{
Idx_Error("Illegal null field.\n");
return(False);
}
return(True);
}
Local Logical
scan_field(int *n, unsigned char field[], int len_field, Logical ck_level,
Logical ck_encap, Logical ck_actual)
{
int i = 0;
int nbsh; /* backslash count */
if(compress_blanks && ((key[*n] == SPC) || (key[*n] == TAB)))
++* n;
while(True)
{
nbsh = 0;
while(key[*n] == idx_escape)
{
nbsh++;
field[i++] = key[*n];
CHECK_LENGTH();
++*n;
}
if(key[*n] == idx_quote)
{
if(nbsh % 2 == 0)
field[i++] = key[++*n];
else
field[i++] = key[*n];
CHECK_LENGTH();
}
else if((ck_level && (key[*n] == idx_level)) ||
(ck_encap && (key[*n] == idx_encap)) ||
(ck_actual && (key[*n] == idx_actual)) ||
(key[*n] == EOS))
{
if((i > 0) && compress_blanks && (field[i - 1] == SPC))
field[i - 1] = EOS;
else
field[i] = EOS;
return(True);
}
else
{
field[i++] = key[*n];
CHECK_LENGTH();
if((!ck_level) && (key[*n] == idx_level))
{
Idx_Error("Extra `%c' at position %d of first argument.\n",
idx_level, *n + 1);
return(False);
}
else if((!ck_encap) && (key[*n] == idx_encap))
{
Idx_Error("Extra `%c' at position %d of first argument.\n",
idx_encap, *n + 1);
return(False);
}
else if((!ck_actual) && (key[*n] == idx_actual))
{
Idx_Error("Extra `%c' at position %d of first argument.\n",
idx_actual, *n + 1);
return(False);
}
}
/* check if max field length is reached */
if(i > len_field)
{
OVERFLOW:
if(!ck_encap)
Idx_Error("Encapsulator of page number too long (max. %d).\n",
len_field);
else if(ck_actual)
Idx_Error("Index sort key too long (max. %d).\n", len_field);
else
Idx_Error("Text of key entry too long (max. %d).\n", len_field);
return(False);
}
++*n;
}
}
Public int
group_type(unsigned char *str)
{
int i = 0;
while((str[i] != EOS) && ISDIGIT(str[i]))
i++;
if(str[i] == EOS)
{
sscanf((char *)str, "%d", &i);
return(i);
}
else if(ISSYMBOL(str[0]))
return(SYMBOL);
else
return(ALPHA);
}
Local Logical
scan_no(unsigned char no[], short npg[], short *count, short *type)
{
int i = 1;
if(isdigit(no[0]))
{
*type = ARAB;
if(!scan_arabic(no, npg, count))
return(False);
/* simple heuristic to determine if a letter is Roman or Alpha */
}
else if(IS_ROMAN_LOWER(no[0]) && (!IS_COMPOSITOR))
{
*type = ROML;
if(!scan_roman_lower(no, npg, count))
return(False);
/* simple heuristic to determine if a letter is Roman or Alpha */
}
else if(IS_ROMAN_UPPER(no[0]) &&
((no[0] == ROMAN_I) || (!IS_COMPOSITOR)))
{
*type = ROMU;
if(!scan_roman_upper(no, npg, count))
return(False);
}
else if(IS_ALPHA_LOWER(no[0]))
{
*type = ALPL;
if(!scan_alpha_lower(no, npg, count))
return(False);
}
else if(IS_ALPHA_UPPER(no[0]))
{
*type = ALPU;
if(!scan_alpha_upper(no, npg, count))
return(False);
}
else
{
Idx_Error("Illegal page number %s.\n", no);
return(False);
}
return(True);
}
Local Logical
scan_arabic(unsigned char no[], short npg[], short *count)
{
short i = 0;
char str[ARABIC_MAX + 1]; /* space for trailing EOS */
while((no[i] != EOS) && (i <= ARABIC_MAX) && (!IS_COMPOSITOR))
{
if(isdigit(no[i]))
{
str[i] = no[i];
i++;
}
else
{
Idx_Error("Illegal Arabic digit: position %d in %s.\n", i + 1, no);
return(False);
}
}
if(i > ARABIC_MAX)
{
Idx_Error("Arabic page number %s too big (max %d digits).\n",
no, ARABIC_MAX);
return(False);
}
str[i] = EOS;
if(*count >= PAGEFIELD_MAX)
{
Idx_Error("Page number %s has too many fields (max. %d).",
no, PAGEFIELD_MAX);
return(False);
}
npg[*count] = (strtoint(str) + page_offset[ARAB]);
++*count;
if(IS_COMPOSITOR)
return(scan_no(&no[i + comp_len], npg, count, &i));
else
return(True);
}
Local Logical
scan_roman_lower(unsigned char no[], short npg[], short *count)
{
short i = 0;
int inp = 0;
int prev = 0;
int the_new;
while((no[i] != EOS) && (i < ROMAN_MAX) && (!IS_COMPOSITOR))
{
if((IS_ROMAN_LOWER(no[i])) &&
((the_new = ROMAN_LOWER_VAL(no[i])) != 0))
{
if(prev == 0)
prev = the_new;
else
{
if(prev < the_new)
{
prev = the_new - prev;
the_new = 0;
}
inp += prev;
prev = the_new;
}
}
else
{
Idx_Error("Illegal Roman number: position %d in %s.\n", i + 1, no);
return(False);
}
i++;
}
if(i == ROMAN_MAX)
{
Idx_Error("Roman page number %s too big (max %d digits).\n",
no, ROMAN_MAX);
return(False);
}
inp += prev;
if(*count >= PAGEFIELD_MAX)
{
Idx_Error("Page number %s has too many fields (max. %d).",
no, PAGEFIELD_MAX);
return(False);
}
npg[*count] = (inp + page_offset[ROML]);
++*count;
if(IS_COMPOSITOR)
return(scan_no(&no[i + comp_len], npg, count, &i));
else
return(True);
}
Local Logical
scan_roman_upper(unsigned char no[], short npg[], short *count)
{
short i = 0;
int inp = 0;
int prev = 0;
int the_new;
while((no[i] != EOS) && (i < ROMAN_MAX) && (!IS_COMPOSITOR))
{
if((IS_ROMAN_UPPER(no[i])) &&
((the_new = ROMAN_UPPER_VAL(no[i])) != 0))
{
if(prev == 0)
prev = the_new;
else
{
if(prev < the_new)
{
prev = the_new - prev;
the_new = 0;
}
inp += prev;
prev = the_new;
}
}
else
{
Idx_Error("Illegal Roman number: position %d in %s.\n", i + 1, no);
return(False);
}
i++;
}
if(i == ROMAN_MAX)
{
Idx_Error("Roman page number %s too big (max %d digits).\n",
no, ROMAN_MAX);
return(False);
}
inp += prev;
if(*count >= PAGEFIELD_MAX)
{
Idx_Error("Page number %s has too many fields (max. %d).",
no, PAGEFIELD_MAX);
return(False);
}
npg[*count] = (inp + page_offset[ROMU]);
++*count;
if(IS_COMPOSITOR)
return(scan_no(&no[i + comp_len], npg, count, &i));
else
return(True);
}
Local Logical
scan_alpha_lower(unsigned char no[], short npg[], short *count)
{
short i;
if(*count >= PAGEFIELD_MAX)
{
Idx_Error("Page number %s has too many fields (max. %d).",
no, PAGEFIELD_MAX);
return(False);
}
npg[*count] = (ALPHA_VAL(no[0]) + page_offset[ALPL]);
++*count;
i = 1;
if(IS_COMPOSITOR)
return(scan_no(&no[comp_len + 1], npg, count, &i));
else
return(True);
}
Local Logical
scan_alpha_upper(unsigned char no[], short npg[], short *count)
{
short i;
if(*count >= PAGEFIELD_MAX)
{
Idx_Error("Page number %s has too many fields (max. %d).",
no, PAGEFIELD_MAX);
return(False);
}
npg[*count] = (ALPHA_VAL(no[0]) + page_offset[ALPU]);
++*count;
i = 1;
if(IS_COMPOSITOR)
return(scan_no(&no[comp_len + 1], npg, count, &i));
else
return(True);
}
Local Logical
scan_arg1(VOID_ARG)
{
int i = 0;
int n = 0; /* delimiter count */
int a;
if(compress_blanks)
while(((a = GET_CHAR(idx_fp)) == SPC) || (a == TAB))
;
else
a = GET_CHAR(idx_fp);
while((i < ARGUMENT_MAX) && (a != EOF))
{
if((a == idx_quote) || (a == idx_escape))
{ /* take next character literally */
key[i++] = (char) a; /* but preserve quote or escape */
a = GET_CHAR(idx_fp);
key[i++] = (unsigned char)a; /* save literal character */
}
else if(a == idx_aopen)
{ /* opening delimiters within the argument list */
key[i++] = (unsigned char)a;
n++;
}
else if(a == idx_aclose)
{
if(n == 0) /* end of argument */
{
if(compress_blanks && key[i - 1] == SPC)
key[i - 1] = EOS;
else
key[i] = EOS;
return(True);
}
else /* nested delimiters */
{
key[i++] = (unsigned char) a;
n--;
}
}
else
{
switch(a)
{
case LFD:
idx_lc++;
Idx_Error("Incomplete first argument (premature LFD).\n");
return(False);
case TAB:
case SPC:
/* compress successive SPC's to one SPC */
if(compress_blanks)
{
if((i > 0) && (key[i - 1] != SPC) &&
(key[i - 1] != TAB))
key[i++] = SPC;
break;
}
default:
key[i++] = (unsigned char) a;
break;
}
}
a = GET_CHAR(idx_fp);
}
flush_to_eol(); /* Skip to end of line */
idx_lc++;
Idx_Error("First argument too long (max %d).\n", ARGUMENT_MAX);
return(False);
}
Local Logical
scan_arg2(VOID_ARG)
{
int i = 0;
int a;
int hit_blank = False;
while(((a = GET_CHAR(idx_fp)) == SPC) || (a == TAB))
;
while(i < NUMBER_MAX)
{
if(a == idx_aclose)
{
no[i] = EOS;
return(True);
}
else
switch(a)
{
case LFD:
idx_lc++;
Idx_Error("Incomplete second argument (premature LFD).\n");
return(False);
case TAB:
case SPC:
hit_blank = True;
break;
default:
if(hit_blank)
{
flush_to_eol(); /* Skip to end of line */
idx_lc++;
Idx_Error("Illegal space within numerals in second " \
"argument.\n");
return(False);
}
no[i++] = (char)a;
break;
}
a = GET_CHAR(idx_fp);
}
flush_to_eol(); /* Skip to end of line */
idx_lc++;
Idx_Error("Second argument too long (max %d).\n", NUMBER_MAX);
return(False);
}
Local void
Idx_Error(const char *fmt, ...)
{
va_list arg_ptr;
va_start(arg_ptr, fmt);
if(idx_dot)
{
fprintf(ilg_fp, "\n");
idx_dot = False;
}
fprintf(ilg_fp,
#if KCC_20
"!! Input index error (file = %s, line = %d):\n\040\040 -- ",
#else
"!! Input index error (file = %s, line = %d):\n -- ",
#endif
idx_fn, idx_lc);
vfprintf(ilg_fp, fmt, arg_ptr);
va_end(arg_ptr);
idx_ec++;
}
Local int
Idx_Skipline(VOID_ARG)
{
int tmp;
while((tmp = GET_CHAR(idx_fp)) != LFD)
if(tmp == EOF)
break;
idx_lc++;
return(-1);
}

View File

@ -1,93 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
*
* Author:
* Pehong Chen
* Chen & Harrison International Systems, Inc.
* Palo Alto, California
* USA
* (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
*
* Contributors:
* Please refer to the CONTRIB file that comes with this release
* for a list of people who have contributed to this and/or previous
* release(s) of MakeIndex.
*
* All rights reserved by the copyright holders. See the copyright
* notice distributed with this software for a complete description of
* the conditions under which it is made available.
*
*/
#define IS_COMPOSITOR (mystrncmp((unsigned char *)&no[i], (unsigned char *)page_comp, comp_len) == 0)
#define ROMAN_I 'I'
#define ROMAN_V 'V'
#define ROMAN_X 'X'
#define ROMAN_L 'L'
#define ROMAN_C 'C'
#define ROMAN_D 'D'
#define ROMAN_M 'M'
#define ROMAN_i 'i'
#define ROMAN_v 'v'
#define ROMAN_x 'x'
#define ROMAN_l 'l'
#define ROMAN_c 'c'
#define ROMAN_d 'd'
#define ROMAN_m 'm'
#define VAL_I 1
#define VAL_V 5
#define VAL_X 10
#define VAL_L 50
#define VAL_C 100
#define VAL_D 500
#define VAL_M 1000
#define ROMAN_LOWER_VAL(C) \
((C == ROMAN_i) ? VAL_I : \
(C == ROMAN_v) ? VAL_V : \
(C == ROMAN_x) ? VAL_X : \
(C == ROMAN_l) ? VAL_L : \
(C == ROMAN_c) ? VAL_C : \
(C == ROMAN_d) ? VAL_D : \
(C == ROMAN_m) ? VAL_M : 0)
#define ROMAN_UPPER_VAL(C) \
((C == ROMAN_I) ? VAL_I : \
(C == ROMAN_V) ? VAL_V : \
(C == ROMAN_X) ? VAL_X : \
(C == ROMAN_L) ? VAL_L : \
(C == ROMAN_C) ? VAL_C : \
(C == ROMAN_D) ? VAL_D : \
(C == ROMAN_M) ? VAL_M : 0)
#define IS_ROMAN_LOWER(C) \
((C == ROMAN_i) || (C == ROMAN_v) || (C == ROMAN_x) || \
(C == ROMAN_l) || (C == ROMAN_c) || (C == ROMAN_d) || (C == ROMAN_m))
#define IS_ROMAN_UPPER(C) \
((C == ROMAN_I) || (C == ROMAN_V) || (C == ROMAN_X) || \
(C == ROMAN_L) || (C == ROMAN_C) || (C == ROMAN_D) || (C == ROMAN_M))
#if (OS_MVSXA)
#define ALPHA_VAL(C) ((isalpha(C)) ? (mystrchr(UPCC,mytoupper(C))-UPCC) : 0)
#define IS_ALPHA_LOWER(C) (isalpha(C) && islower(C))
#define IS_ALPHA_UPPER(C) (isalpha(C) && isupper(C))
#else
#define IS_ALPHA_LOWER(C) islower(C)
#define IS_ALPHA_UPPER(C) isupper(C)
#define ALPHA_VAL(C) \
((('A' <= C) && (C <= 'Z')) ? C - 'A' : \
(('a' <= C) && (C <= 'z')) ? C - 'a' : 0)
#endif /* OS_MVSXA */

View File

@ -1,755 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
*
* Author:
* Pehong Chen
* Chen & Harrison International Systems, Inc.
* Palo Alto, California
* USA
* (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
*
* Contributors:
* Please refer to the CONTRIB file that comes with this release
* for a list of people who have contributed to this and/or previous
* release(s) of MakeIndex.
*
* All rights reserved by the copyright holders. See the copyright
* notice distributed with this software for a complete description of
* the conditions under which it is made available.
*
*/
#include "mkind.h"
#include <stdarg.h>
#include "scanst.h"
Local int sty_lc = 0; /* line count */
Local int sty_tc = 0; /* total count */
Local int sty_ec = 0; /* error count */
Public unsigned char idx_keyword[ARRAY_MAX] = IDX_KEYWORD;
Public char idx_aopen = IDX_AOPEN;
Public char idx_aclose = IDX_ACLOSE;
Public char idx_level = IDX_LEVEL;
Public char idx_ropen = IDX_ROPEN;
Public char idx_rclose = IDX_RCLOSE;
Public char idx_quote = IDX_QUOTE;
Public char idx_actual = IDX_ACTUAL;
Public char idx_encap = IDX_ENCAP;
Public char idx_escape = IDX_ESCAPE;
Public char preamble[ARRAY_MAX] = PREAMBLE_DEF;
Public char postamble[ARRAY_MAX] = POSTAMBLE_DEF;
Public int prelen = PREAMBLE_LEN;
Public int postlen = POSTAMBLE_LEN;
Public char setpage_open[ARRAY_MAX] = SETPAGEOPEN_DEF;
Public char setpage_close[ARRAY_MAX] = SETPAGECLOSE_DEF;
Public int setpagelen = SETPAGE_LEN;
Public char group_skip[ARRAY_MAX] = GROUPSKIP_DEF;
Public int skiplen = GROUPSKIP_LEN;
Public int headings_flag = HEADINGSFLAG_DEF;
Public char heading_pre[ARRAY_MAX] = HEADINGPRE_DEF;
Public char heading_suf[ARRAY_MAX] = HEADINGSUF_DEF;
Public int headprelen = HEADINGPRE_LEN;
Public int headsuflen = HEADINGSUF_LEN;
Public char symhead_pos[ARRAY_MAX] = SYMHEADPOS_DEF;
Public char symhead_neg[ARRAY_MAX] = SYMHEADNEG_DEF;
Public char numhead_pos[ARRAY_MAX] = NUMHEADPOS_DEF;
Public char numhead_neg[ARRAY_MAX] = NUMHEADNEG_DEF;
Public char item_r[FIELD_MAX][ARRAY_MAX] = {ITEM0_DEF, ITEM1_DEF, ITEM2_DEF,
ITEM3_DEF};
Public char item_u[FIELD_MAX][ARRAY_MAX] = {"", ITEM1_DEF, ITEM2_DEF,
ITEM3_DEF};
Public char item_x[FIELD_MAX][ARRAY_MAX] = {"", ITEM1_DEF, ITEM2_DEF,
ITEM3_DEF};
Public int ilen_r[FIELD_MAX] = {ITEM_LEN, ITEM_LEN, ITEM_LEN, ITEM_LEN};
Public int ilen_u[FIELD_MAX] = {0, ITEM_LEN, ITEM_LEN, ITEM_LEN};
Public int ilen_x[FIELD_MAX] = {0, ITEM_LEN, ITEM_LEN, ITEM_LEN};
Public char delim_p[FIELD_MAX][ARRAY_MAX] = {DELIM_DEF, DELIM_DEF, DELIM_DEF,
DELIM_DEF};
Public char delim_n[ARRAY_MAX] = DELIM_DEF;
/* page number separator */
Public char delim_r[ARRAY_MAX] = DELIMR_DEF;
/* page range designator */
Public char delim_t[ARRAY_MAX] = DELIMT_DEF;
/* page list terminating delimiter */
Public char suffix_2p[ARRAY_MAX] = ""; /* suffix for two page ranges */
Public char suffix_3p[ARRAY_MAX] = ""; /* suffix for three page ranges*/
Public char suffix_mp[ARRAY_MAX] = "";
/* suffix for multiple page ranges */
Public char encap_p[ARRAY_MAX] = ENCAP0_DEF; /* encapsulator prefix */
Public char encap_i[ARRAY_MAX] = ENCAP1_DEF; /* encapsulator infix */
Public char encap_s[ARRAY_MAX] = ENCAP2_DEF; /* encapsulator postfix */
Public int linemax = LINE_MAX;
Public int indent_length = INDENTLEN_DEF;
Public char indent_space[ARRAY_MAX] = INDENTSPC_DEF;
Public char page_comp[ARRAY_MAX] = COMPOSITOR_DEF;
Public int page_offset[PAGETYPE_MAX] =
{
0,
ROMAN_LOWER_OFFSET,
ROMAN_LOWER_OFFSET + ARABIC_OFFSET,
ROMAN_LOWER_OFFSET + ARABIC_OFFSET + ALPHA_LOWER_OFFSET,
ROMAN_LOWER_OFFSET + ARABIC_OFFSET + ALPHA_LOWER_OFFSET + ROMAN_UPPER_OFFSET
};
Local char page_prec[ARRAY_MAX] = PRECEDENCE_DEF;
Local int put_dot;
Local void Sty_Error_prec(const char ch, const char *str);
Local void Sty_Error(const char *F, ...);
Local void Sty_Skipline (void);
Local int count_lfd (char *str);
Local int next_nonblank (void);
Local Logical process_precedence (void);
Local Logical scan_char (unsigned char *c);
Local Logical scan_spec (unsigned char *spec);
Local Logical scan_string (unsigned char *str);
Public void
scan_sty(VOID_ARG)
{
unsigned char *spec;
int tmp;
if((spec = (unsigned char *)calloc(1, STRING_MAX)) == NULL)
Fatal("Not enough core...abort.\n");
Message("Scanning style file %s...", sty_fn);
while(scan_spec(spec))
{
sty_tc++;
put_dot = True;
/* output pre- and post-ambles */
if(STREQ(spec, PREAMBLE))
{
(void) scan_string((unsigned char *)preamble);
prelen = count_lfd(preamble);
}
else if(STREQ(spec, POSTAMBLE))
{
(void) scan_string((unsigned char *)postamble);
postlen = count_lfd(postamble);
}
else if(STREQ(spec, GROUP_SKIP))
{
(void) scan_string((unsigned char *)group_skip);
skiplen = count_lfd(group_skip);
}
else if(STREQ(spec, HEADINGS_FLAG))
fscanf(sty_fp, "%d", &headings_flag);
else if(STREQ(spec, HEADING_PRE))
{
(void) scan_string((unsigned char *)heading_pre);
headprelen = count_lfd(heading_pre);
}
else if(STREQ(spec, HEADING_SUF))
{
(void) scan_string((unsigned char *)heading_suf);
headsuflen = count_lfd(heading_suf);
}
else if(STREQ(spec, SYMHEAD_POS))
{
(void) scan_string((unsigned char *)symhead_pos);
}
else if(STREQ(spec, SYMHEAD_NEG))
{
(void) scan_string((unsigned char *)symhead_neg);
}
else if(STREQ(spec, NUMHEAD_POS))
{
(void) scan_string((unsigned char *)numhead_pos);
}
else if(STREQ(spec, NUMHEAD_NEG))
{
(void) scan_string((unsigned char *)numhead_neg);
}
else if(STREQ(spec, SETPAGEOPEN))
{
(void) scan_string((unsigned char *)setpage_open);
setpagelen = count_lfd(setpage_open);
}
else if(STREQ(spec, SETPAGECLOSE))
{
(void) scan_string((unsigned char *)setpage_close);
setpagelen = count_lfd(setpage_close);
/* output index item commands */
}
else if(STREQ(spec, ITEM_0))
{
(void) scan_string((unsigned char *)item_r[0]);
ilen_r[0] = count_lfd(item_r[0]);
}
else if(STREQ(spec, ITEM_1))
{
(void) scan_string((unsigned char *)item_r[1]);
ilen_r[1] = count_lfd(item_r[1]);
}
else if(STREQ(spec, ITEM_2))
{
(void) scan_string((unsigned char *)item_r[2]);
ilen_r[2] = count_lfd(item_r[2]);
}
else if(STREQ(spec, ITEM_01))
{
(void) scan_string((unsigned char *)item_u[1]);
ilen_u[1] = count_lfd(item_u[1]);
}
else if(STREQ(spec, ITEM_12))
{
(void) scan_string((unsigned char *)item_u[2]);
ilen_u[2] = count_lfd(item_u[2]);
}
else if(STREQ(spec, ITEM_x1))
{
(void) scan_string((unsigned char *)item_x[1]);
ilen_x[1] = count_lfd(item_x[1]);
}
else if(STREQ(spec, ITEM_x2))
{
(void) scan_string((unsigned char *)item_x[2]);
ilen_x[2] = count_lfd(item_x[2]);
/* output encapsulators */
}
else if(STREQ(spec, ENCAP_0))
(void) scan_string((unsigned char *)encap_p);
else if(STREQ(spec, ENCAP_1))
(void) scan_string((unsigned char *)encap_i);
else if(STREQ(spec, ENCAP_2))
(void) scan_string((unsigned char *)encap_s);
/* output delimiters */
else if(STREQ(spec, DELIM_0))
(void) scan_string((unsigned char *)delim_p[0]);
else if(STREQ(spec, DELIM_1))
(void) scan_string((unsigned char *)delim_p[1]);
else if(STREQ(spec, DELIM_2))
(void) scan_string((unsigned char *)delim_p[2]);
else if(STREQ(spec, DELIM_N))
(void) scan_string((unsigned char *)delim_n);
else if(STREQ(spec, DELIM_R))
(void) scan_string((unsigned char *)delim_r);
else if(STREQ(spec, DELIM_T))
(void) scan_string((unsigned char *)delim_t);
else if(STREQ(spec, SUFFIX_2P))
(void) scan_string((unsigned char *)suffix_2p);
else if(STREQ(spec, SUFFIX_3P))
(void) scan_string((unsigned char *)suffix_3p);
else if(STREQ(spec, SUFFIX_MP))
(void) scan_string((unsigned char *)suffix_mp);
/* output line width */
else if(STREQ(spec, LINEMAX))
{
fscanf(sty_fp, "%d", &tmp);
if(tmp > 0)
linemax = tmp;
else
Sty_Error("%s must be positive (got %d)", LINEMAX, tmp);
/* output line indentation length */
}
else if(STREQ(spec, INDENT_LENGTH))
{
fscanf(sty_fp, "%d", &tmp);
if(tmp >= 0)
indent_length = tmp;
else
Sty_Error("%s must be nonnegative (got %d)", INDENT_LENGTH,
tmp);
/* output line indentation */
}
else if(STREQ(spec, INDENT_SPACE))
{
(void) scan_string((unsigned char *)indent_space);
/* composite page delimiter */
}
else if(STREQ(spec, COMPOSITOR))
{
(void) scan_string((unsigned char *)page_comp);
/* page precedence */
}
else if(STREQ(spec, PRECEDENCE))
{
(void) scan_string((unsigned char *)page_prec);
(void) process_precedence();
/* index input format */
}
else if(STREQ(spec, KEYWORD))
(void) scan_string(idx_keyword);
else if(STREQ(spec, AOPEN))
(void) scan_char((unsigned char *)&idx_aopen);
else if(STREQ(spec, ACLOSE))
(void) scan_char((unsigned char *)&idx_aclose);
else if(STREQ(spec, LEVEL))
(void) scan_char((unsigned char *)&idx_level);
else if(STREQ(spec, ROPEN))
(void) scan_char((unsigned char *)&idx_ropen);
else if(STREQ(spec, RCLOSE))
(void) scan_char((unsigned char *)&idx_rclose);
else if(STREQ(spec, QUOTE))
(void) scan_char((unsigned char *)&idx_quote);
else if(STREQ(spec, ACTUAL))
(void) scan_char((unsigned char *)&idx_actual);
else if(STREQ(spec, ENCAP))
(void) scan_char((unsigned char *)&idx_encap);
else if(STREQ(spec, ESCAPE))
(void) scan_char((unsigned char *)&idx_escape);
else
{
(void) next_nonblank();
Sty_Skipline();
Sty_Error("Unknown specifier %s.\n", spec);
put_dot = False;
}
if(put_dot)
{
idx_dot = True;
Message(DOT);
}
}
/* check if quote and escape are distinct */
if(idx_quote == idx_escape)
{
Sty_Error(
"Quote and escape symbols must be distinct (both `%c' now).\n",
idx_quote);
idx_quote = IDX_QUOTE;
idx_escape = IDX_ESCAPE;
}
CLOSE(sty_fp);
free(spec);
Message("done (%d %s, %d %s).\n", sty_tc - sty_ec, "attributes redefined",
sty_ec, "ignored");
}
Local Logical
scan_spec(unsigned char spec[])
{
int i = 0;
int c;
while(True)
if((c = next_nonblank()) == -1)
return(False);
else if(c == COMMENT)
Sty_Skipline();
else
break;
spec[0] = TOLOWER(c);
while((i++ < STRING_MAX) && ((c = GET_CHAR(sty_fp)) != SPC) &&
(c != TAB) && (c != LFD) && (c != EOF))
spec[i] = TOLOWER(c);
if(i < STRING_MAX)
{
spec[i] = EOS;
if(c == EOF)
{
Sty_Error("No attribute for specifier %s (premature EOF)\n", spec);
return(False);
}
if(c == LFD)
sty_lc++;
return(True);
}
else
{
Sty_Error("Specifier %s too long (max %d).\n", spec, STRING_MAX);
return(False);
}
}
Local int
next_nonblank(VOID_ARG)
{
int c;
while(True)
{
switch(c = GET_CHAR(sty_fp))
{
case EOF:
return(-1);
case LFD:
sty_lc++;
case SPC:
case TAB:
break;
default:
return(c);
}
}
}
Local Logical
scan_string(unsigned char str[])
{
char *clone;
int i = 0;
int c;
if((clone = (char *) calloc(1, ARRAY_MAX)) == NULL)
Fatal("Not enough core...abort.\n");
switch(c = next_nonblank())
{
case STR_DELIM:
while(True)
switch(c = GET_CHAR(sty_fp))
{
case EOF:
Sty_Error("No closing delimiter in %s.\n", clone);
free(clone);
return(False);
case STR_DELIM:
clone[i] = EOS;
strcpy((char *)str, clone);
free(clone);
return(True);
case BSH:
switch(c = GET_CHAR(sty_fp))
{
case 't':
clone[i++] = TAB;
break;
case 'n':
clone[i++] = LFD;
break;
default:
clone[i++] = (char) c;
}
break;
default:
if(c == LFD)
sty_lc++;
if(i < ARRAY_MAX)
clone[i++] = (char) c;
else
{
Sty_Skipline();
Sty_Error(
"Attribute string %s too long (max %d).\n",
clone, ARRAY_MAX);
free(clone);
return(False);
}
}
case COMMENT:
Sty_Skipline();
break;
default:
Sty_Skipline();
Sty_Error("No opening delimiter.\n");
free(clone);
return(False);
}
free(clone);
return(True); /* function value no longer used */
}
Local Logical
scan_char(unsigned char *c)
{
int clone;
switch(clone = next_nonblank())
{
case CHR_DELIM:
switch(clone = GET_CHAR(sty_fp))
{
case CHR_DELIM:
Sty_Skipline();
Sty_Error("Premature closing delimiter.\n");
return(False);
case LFD:
sty_lc++;
case EOF:
Sty_Error("No character (premature EOF).\n");
return(False);
case BSH:
clone = GET_CHAR(sty_fp);
default:
if(GET_CHAR(sty_fp) == CHR_DELIM)
{
*c = (char) clone;
return(True);
}
else
{
Sty_Error("No closing delimiter or too many letters.\n");
return(False);
}
}
/* break; */ /* NOT REACHED */
case COMMENT:
Sty_Skipline();
break;
default:
Sty_Skipline();
Sty_Error("No opening delimiter.\n");
return(False);
}
return(True); /* function value no longer used */
}
Local int
count_lfd(char *str)
{
register int i = 0;
register int n = 0;
while(str[i] != EOS)
{
if(str[i] == LFD)
n++;
i++;
}
return(n);
}
Local Logical
process_precedence(VOID_ARG)
{
int order[PAGETYPE_MAX];
int type[PAGETYPE_MAX];
int i = 0;
int last;
Logical roml = False;
Logical romu = False;
Logical arab = False;
Logical alpl = False;
Logical alpu = False;
/* check for llegal specifiers first */
while((i < PAGETYPE_MAX) && (page_prec[i] != EOS))
{
switch(page_prec[i])
{
case ROMAN_LOWER:
if(roml)
{
Sty_Error_prec(ROMAN_LOWER, page_prec);
return(False);
}
else
roml = True;
break;
case ROMAN_UPPER:
if(romu)
{
Sty_Error_prec(ROMAN_UPPER, page_prec);
return(False);
}
else
romu = True;
break;
case ARABIC:
if(arab)
{
Sty_Error_prec(ARABIC, page_prec);
return(False);
}
else
arab = True;
break;
case ALPHA_LOWER:
if(alpl)
{
Sty_Error_prec(ALPHA_LOWER, page_prec);
return(False);
}
else
alpl = True;
break;
case ALPHA_UPPER:
if(alpu)
{
Sty_Error_prec(ALPHA_UPPER, page_prec);
return(False);
}
else
alpu = True;
break;
default:
Sty_Skipline();
Sty_Error("Unknow type `%c' in page precedence " \
"specification.\n", page_prec[i]);
return(False);
}
i++;
}
if(page_prec[i] != EOS)
{
Sty_Skipline();
Sty_Error("Page precedence specification string too long.\n");
return(False);
}
last = i;
switch(page_prec[0])
{
case ROMAN_LOWER:
order[0] = ROMAN_LOWER_OFFSET;
type[0] = ROML;
break;
case ROMAN_UPPER:
order[0] = ROMAN_UPPER_OFFSET;
type[0] = ROMU;
break;
case ARABIC:
order[0] = ARABIC_OFFSET;
type[0] = ARAB;
break;
case ALPHA_LOWER:
order[0] = ALPHA_LOWER_OFFSET;
type[0] = ALPL;
break;
case ALPHA_UPPER:
order[0] = ALPHA_LOWER_OFFSET;
type[0] = ALPU;
break;
}
i = 1;
while(i < last)
{
switch(page_prec[i])
{
case ROMAN_LOWER:
order[i] = order[i - 1] + ROMAN_LOWER_OFFSET;
type[i] = ROML;
break;
case ROMAN_UPPER:
order[i] = order[i - 1] + ROMAN_UPPER_OFFSET;
type[i] = ROMU;
break;
case ARABIC:
order[i] = order[i - 1] + ARABIC_OFFSET;
type[i] = ARAB;
break;
case ALPHA_LOWER:
order[i] = order[i - 1] + ALPHA_LOWER_OFFSET;
type[i] = ALPL;
break;
case ALPHA_UPPER:
order[i] = order[i - 1] + ALPHA_LOWER_OFFSET;
type[i] = ALPU;
break;
}
i++;
}
for(i = 0; i < PAGETYPE_MAX; i++)
page_offset[i] = -1;
page_offset[type[0]] = 0;
for(i = 1; i < last; i++)
{
page_offset[type[i]] = order[i - 1];
}
for(i = 0; i < PAGETYPE_MAX; i++)
{
if(page_offset[i] == -1)
{
switch(type[last - 1])
{
case ROML:
order[last] = order[last - 1] + ROMAN_LOWER_OFFSET;
break;
case ROMU:
order[last] = order[last - 1] + ROMAN_UPPER_OFFSET;
break;
case ARAB:
order[last] = order[last - 1] + ARABIC_OFFSET;
break;
case ALPL:
order[last] = order[last - 1] + ALPHA_LOWER_OFFSET;
break;
case ALPU:
order[last] = order[last - 1] + ALPHA_UPPER_OFFSET;
break;
}
type[last] = i;
page_offset[i] = order[last];
last++;
}
}
return(True); /* function value no longer used */
}
Local void
Sty_Skipline(VOID_ARG)
{
register int a;
while(((a = GET_CHAR(sty_fp)) != LFD) && (a != EOF))
;
sty_lc++;
}
Local void
Sty_Error(const char *fmt, ...)
{
va_list arg_ptr;
va_start(arg_ptr, fmt);
if(idx_dot)
{
fprintf(ilg_fp, "\n");
idx_dot = False;
}
fprintf(ilg_fp,
#if KCC_20
"** Input style error (file = %s, line = %d):\n\040\040 -- ",
#else
"** Input style error (file = %s, line = %d):\n -- ",
#endif /* KCC_20 */
sty_fn, sty_lc);
vfprintf(ilg_fp, fmt, arg_ptr);
va_end(arg_ptr);
sty_ec++;
put_dot = False;
}
Local void
Sty_Error_prec(const char ch, const char *str)
{
Sty_Skipline();
Sty_Error("Multiple instances of type `%c' " \
"in page precedence specification `%s'.\n", ch, str);
}

View File

@ -1,173 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
*
* Author:
* Pehong Chen
* Chen & Harrison International Systems, Inc.
* Palo Alto, California
* USA
* (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
*
* Contributors:
* Please refer to the CONTRIB file that comes with this release
* for a list of people who have contributed to this and/or previous
* release(s) of MakeIndex.
*
* All rights reserved by the copyright holders. See the copyright
* notice distributed with this software for a complete description of
* the conditions under which it is made available.
*
*/
#define COMMENT '%'
#define STR_DELIM '"'
#define CHR_DELIM '\''
#define KEYWORD "keyword"
#define AOPEN "arg_open"
#define ACLOSE "arg_close"
#define ROPEN "range_open"
#define RCLOSE "range_close"
#define LEVEL "level"
#define QUOTE "quote"
#define ACTUAL "actual"
#define ENCAP "encap"
#define ESCAPE "escape"
#define IDX_KEYWORD "\\indexentry"
#define IDX_AOPEN '{'
#define IDX_ACLOSE '}'
#define IDX_ROPEN '('
#define IDX_RCLOSE ')'
#define IDX_LEVEL '!'
#define IDX_QUOTE '"'
#define IDX_ACTUAL '@'
#define IDX_ENCAP '|'
#define IDX_ESCAPE '\\'
#define COMPOSITOR "page_compositor"
#define COMPOSITOR_DEF "--"
#define PRECEDENCE "page_precedence"
#define PRECEDENCE_DEF "rnaRA"
#define ROMAN_LOWER 'r'
#define ROMAN_UPPER 'R'
#define ARABIC 'n'
#define ALPHA_LOWER 'a'
#define ALPHA_UPPER 'A'
#define ROMAN_LOWER_OFFSET 10000
#define ROMAN_UPPER_OFFSET 10000
#define ARABIC_OFFSET 10000
#define ALPHA_LOWER_OFFSET 26
#define ALPHA_UPPER_OFFSET 26
#define PREAMBLE "preamble"
#define PREAMBLE_DEF "\\begin{theindex}\n"
#define PREAMBLE_LEN 1
#define POSTAMBLE "postamble"
#define POSTAMBLE_DEF "\n\n\\end{theindex}\n"
#define POSTAMBLE_LEN 3
#define SETPAGEOPEN "setpage_prefix"
#define SETPAGECLOSE "setpage_suffix"
#if KCC_20
/* KCC preprocessor bug collapses multiple blanks to single blank */
#define SETPAGEOPEN_DEF "\n\040\040\\setcounter{page}{"
#else
#define SETPAGEOPEN_DEF "\n \\setcounter{page}{"
#endif /* KCC_20 */
#define SETPAGECLOSE_DEF "}\n"
#define SETPAGE_LEN 2
#define GROUP_SKIP "group_skip"
#if KCC_20
/* KCC preprocessor bug collapses multiple blanks to single blank */
#define GROUPSKIP_DEF "\n\n\040\040\\indexspace\n"
#else
#define GROUPSKIP_DEF "\n\n \\indexspace\n"
#endif /* KCC_20 */
#define GROUPSKIP_LEN 3
#define HEADINGS_FLAG "headings_flag"
#define HEADINGSFLAG_DEF 0
#define HEADING_PRE "heading_prefix"
#define HEADINGPRE_DEF ""
#define HEADINGPRE_LEN 0
#define HEADING_SUF "heading_suffix"
#define HEADINGSUF_DEF ""
#define HEADINGSUF_LEN 0
#define SYMHEAD_POS "symhead_positive"
#define SYMHEADPOS_DEF "Symbols"
#define SYMHEAD_NEG "symhead_negative"
#define SYMHEADNEG_DEF "symbols"
#define NUMHEAD_POS "numhead_positive"
#define NUMHEADPOS_DEF "Numbers"
#define NUMHEAD_NEG "numhead_negative"
#define NUMHEADNEG_DEF "numbers"
#define ITEM_0 "item_0"
#define ITEM_1 "item_1"
#define ITEM_2 "item_2"
#define ITEM_3 "item_3"
#define ITEM_01 "item_01"
#define ITEM_x1 "item_x1"
#define ITEM_12 "item_12"
#define ITEM_x2 "item_x2"
#define ITEM_23 "item_23"
#define ITEM_x3 "item_x3"
#if KCC_20
/* KCC preprocessor bug collapses multiple blanks to single blank */
#define ITEM0_DEF "\n\040\040\\item\040"
#define ITEM1_DEF "\n\040\040\040\040\\subitem\040"
#define ITEM2_DEF "\n\040\040\040\040\040\040\\subsubitem\040"
#define ITEM3_DEF "\n\040\040\040\040\040\040\\subsubsubitem\040"
#else
#define ITEM0_DEF "\n \\item "
#define ITEM1_DEF "\n \\subitem "
#define ITEM2_DEF "\n \\subsubitem "
#define ITEM3_DEF "\n \\subsubsubitem "
#endif /* KCC_20 */
#define ITEM_LEN 1
#define DELIM_0 "delim_0"
#define DELIM_1 "delim_1"
#define DELIM_2 "delim_2"
#define DELIM_3 "delim_3"
#define DELIM_N "delim_n"
#define DELIM_R "delim_r"
#define DELIM_T "delim_t"
#define DELIM_DEF ", "
#define DELIMR_DEF "--"
#define DELIMT_DEF ""
#define SUFFIX_2P "suffix_2p"
#define SUFFIX_3P "suffix_3p"
#define SUFFIX_MP "suffix_mp"
#define ENCAP_0 "encap_prefix"
#define ENCAP_1 "encap_infix"
#define ENCAP_2 "encap_suffix"
#define ENCAP0_DEF "\\"
#define ENCAP1_DEF "{"
#define ENCAP2_DEF "}"
#define LINEMAX "line_max"
#define INDENT_SPACE "indent_space"
#define INDENT_LENGTH "indent_length"
#if (OS_MVSXA)
#define INDENTSPC_DEF " "
#else
#define INDENTSPC_DEF "\t\t"
#endif /* OS_MVSXA */
#define INDENTLEN_DEF 16

View File

@ -1,278 +0,0 @@
/*
*
* This file is part of
* MakeIndex - A formatter and format independent index processor
*
* Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
* Copyright (C) 1988 by Olivetti Research Center
* Copyright (C) 1987 by Regents of the University of California
*
* Author:
* Pehong Chen
* Chen & Harrison International Systems, Inc.
* Palo Alto, California
* USA
* (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
*
* Contributors:
* Please refer to the CONTRIB file that comes with this release
* for a list of people who have contributed to this and/or previous
* release(s) of MakeIndex.
*
* All rights reserved by the copyright holders. See the copyright
* notice distributed with this software for a complete description of
* the conditions under which it is made available.
*
*/
#include "mkind.h"
Local long idx_gc;
Local int check_mixsym (unsigned char *x, unsigned char *y);
Local int compare (struct KFIELD * *a,struct KFIELD * *b);
Local int compare_one (unsigned char *x, unsigned char *y);
Local int compare_page (struct KFIELD * *a,struct KFIELD * *b);
Local int compare_string (unsigned char *a,unsigned char *b);
Public void
sort_idx(VOID_ARG)
{
Message("Sorting entries...");
idx_dc = 0;
idx_gc = 0L;
qqsort((char *) idx_key, (int) idx_gt, (int) sizeof(FIELD_PTR),
(int (*) (char*, char*))compare);
Message("done (%ld comparisons).\n", idx_gc);
}
Local int
compare(FIELD_PTR *a, FIELD_PTR *b)
{
int i;
int dif;
idx_gc++;
idx_dot = True;
if(idx_dc++ == 0)
Message(DOT);
if(idx_dc == CMP_MAX)
idx_dc = 0;
for(i = 0; i < FIELD_MAX; i++)
{
/* compare the sort fields */
if((dif = compare_one((*a)->sf[i], (*b)->sf[i])) != 0)
break;
if((dif = compare_one((*a)->af[i], (*b)->af[i])) != 0)
break;
}
/* both key aggregates are identical, compare page numbers */
if(i == FIELD_MAX)
dif = compare_page(a, b);
return(dif);
}
Local int
compare_one(unsigned char *x, unsigned char *y)
{
int m;
int n;
if((x[0] == EOS) && (y[0] == EOS))
return(0);
if(x[0] == EOS)
return(-1);
if(y[0] == EOS)
return(1);
m = group_type(x);
n = group_type(y);
/* both pure digits */
if((m >= 0) && (n >= 0))
return(m - n);
/* x digit, y non-digit */
if(m >= 0)
return((n == -1) ? 1 : -1);
/* x non-digit, y digit */
if(n >= 0)
return((m == -1) ? -1 : 1);
/* strings started with a symbol (including digit) */
if((m == SYMBOL) && (n == SYMBOL))
return(check_mixsym(x, y));
/* x symbol, y non-symbol */
if(m == SYMBOL)
return(-1);
/* x non-symbol, y symbol */
if(n == SYMBOL)
return(1);
/* strings with a leading letter, the ALPHA type */
return(compare_string((unsigned char*)x, (unsigned char*)y));
}
Local int
check_mixsym(unsigned char *x, unsigned char *y)
{
int m;
int n;
m = ISDIGIT(x[0]);
n = ISDIGIT(y[0]);
if(m && !n)
return(1);
if(!m && n)
return(-1);
return(mystrcmp(x, y));
}
Local int
compare_string(unsigned char *a, unsigned char *b)
{
int i = 0;
int j = 0;
unsigned char al;
unsigned char bl;
while((a[i] != EOS) || (b[j] != EOS))
{
if(a[i] == EOS)
return(-1);
if(b[j] == EOS)
return(1);
if(blank_ignore)
{
if(a[i] == SPC)
i++;
if(b[j] == SPC)
j++;
}
al = TOLOWER(a[i]);
bl = TOLOWER(b[j]);
if(al != bl)
return(charcmp(al, bl));
i++;
j++;
}
return(mystrcmp(a, b));
}
Local int
compare_page(FIELD_PTR *a, FIELD_PTR *b)
{
int m = 0;
short i = 0;
while((i < (*a)->count) && (i < (*b)->count) &&
((m = (*a)->npg[i] - (*b)->npg[i]) == 0))
{
i++;
}
if(m == 0)
{ /* common leading page numbers match */
if((i == (*a)->count) && (i == (*b)->count))
{ /* all page numbers match */
/***********************************************************
We have identical entries, except possibly in encap fields.
The ordering is tricky here. Consider the following input
sequence of index names, encaps, and page numbers:
foo|( 2
foo|) 6
foo|( 6
foo|) 10
This might legimately occur when a page range ends, and
subsequently, a new range starts, on the same page. If we
just order by range_open and range_close (here, parens),
then we will produce
foo|( 2
foo|( 6
foo|) 6
foo|) 10
This will later generate the index entry
foo, 2--6, \({6}, 10
which is not only wrong, but has also introduced an illegal
LaTeX macro, \({6}, because the merging step treated this
like a \see{6} entry.
The solution is to preserve the original input order, which
we can do by treating range_open and range_close as equal,
and then ordering by input line number. This will then
generate the correct index entry
foo, 2--10
Ordering inconsistencies from missing range open or close
entries, or mixing roman and arabic page numbers, will be
detected later.
***********************************************************/
#define isrange(c) ( ((c) == idx_ropen) || ((c) == idx_rclose) )
/* Order two range values by input line number */
if(isrange(*(*a)->encap) && isrange(*(*b)->encap))
m = (*a)->lc - (*b)->lc;
/* Handle identical encap fields; neither is a range delimiter */
else if(STREQ((*a)->encap, (*b)->encap))
{
/* If neither are yet marked duplicate, mark the second
of them to be ignored. */
if(((*a)->type != DUPLICATE) && ((*b)->type != DUPLICATE))
(*b)->type = DUPLICATE;
/* leave m == 0 to show equality */
}
/* Encap fields differ: only one may be a range delimiter, */
/* or else neither of them is. If either of them is a range */
/* delimiter, order by input line number; otherwise, order */
/* by name. */
else
{
if(isrange(*(*a)->encap) || isrange(*(*b)->encap))
m = (*a)->lc - (*b)->lc; /* order by input line number */
else /* order non-range items by */
/* their encap strings */
m = compare_string((unsigned char*)((*a)->encap),
(unsigned char*)((*b)->encap));
}
}
else if((i == (*a)->count) && (i < (*b)->count))
m = -1;
else if((i < (*a)->count) && (i == (*b)->count))
m = 1;
}
return(m);
}

View File

@ -1,548 +0,0 @@
{% raw %}
static p_char_u us_day_name_ptr =
{
(char_u *)NULL,
(char_u *)"Sunday",
(char_u *)"Monday",
(char_u *)"Tuesday",
(char_u *)"Wednesday",
(char_u *)"Thursday",
(char_u *)"Friday",
(char_u *)"Saturday",
};
static p_char_u us_day_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"Sun",
(char_u *)"Mon",
(char_u *)"Tue",
(char_u *)"Wed",
(char_u *)"Thu",
(char_u *)"Fri",
(char_u *)"Sat",
};
static p_char_u us_mon_name_ptr =
{
(char_u *)NULL,
(char_u *)"Januar",
(char_u *)"Februar",
(char_u *)"March",
(char_u *)"April",
(char_u *)"May",
(char_u *)"June",
(char_u *)"July",
(char_u *)"August",
(char_u *)"September",
(char_u *)"October",
(char_u *)"November",
(char_u *)"December"
};
static p_char_u us_mon_name_ptr_a =
{
(char_u *)NULL,
(char_u *)"Jan",
(char_u *)"Feb",
(char_u *)"Mar",
(char_u *)"Apr",
(char_u *)"May",
(char_u *)"Jun",
(char_u *)"Jul",
(char_u *)"Aug",
(char_u *)"Sep",
(char_u *)"Oct",
(char_u *)"Nov",
(char_u *)"Dec"
};
static int_u us_toascii_table =
{
' ', /* 128 0x80 */
' ', /* 129 0x81 */
' ', /* 130 0x82 */
' ', /* 131 0x83 */
' ', /* 132 0x84 */
' ', /* 133 0x85 */
' ', /* 134 0x86 */
' ', /* 135 0x87 */
' ', /* 136 0x88 */
' ', /* 137 0x89 */
' ', /* 138 0x8a */
' ', /* 139 0x8b */
' ', /* 140 0x8c */
' ', /* 141 0x8d */
' ', /* 142 0x8e */
' ', /* 143 0x8f */
' ', /* 144 0x90 */
' ', /* 145 0x91 */
' ', /* 146 0x92 */
' ', /* 147 0x93 */
' ', /* 148 0x94 */
' ', /* 149 0x95 */
' ', /* 150 0x96 */
' ', /* 151 0x97 */
' ', /* 152 0x98 */
' ', /* 153 0x99 */
' ', /* 154 0x9a */
' ', /* 155 0x9b */
' ', /* 156 0x9c */
' ', /* 157 0x9d */
' ', /* 158 0x9e */
' ', /* 159 0x9f */
' ', /* 160 0xa0 */
'!', /* 161 0xa1 */
'c', /* 162 0xa2 */
'L', /* 163 0xa3 */
'o', /* 164 0xa4 */
'Y', /* 165 0xa5 */
'|', /* 166 0xa6 */
'S', /* 167 0xa7 */
'"', /* 168 0xa8 */
'c', /* 169 0xa9 */
'a', /* 170 0xaa */
'<', /* 171 0xab */
' ', /* 172 0xac */
'-', /* 173 0xad */
'R', /* 174 0xae */
'-', /* 175 0xaf */
'o', /* 176 0xb0 */
'+', /* 177 0xb1 */
'2', /* 178 0xb2 */
'3', /* 179 0xb3 */
'\'', /* 180 0xb4 */
'u', /* 181 0xb5 */
'P', /* 182 0xb6 */
'.', /* 183 0xb7 */
',', /* 184 0xb8 */
'1', /* 185 0xb9 */
'o', /* 186 0xba */
'>', /* 187 0xbb */
' ', /* 188 0xbc */
' ', /* 189 0xbd */
' ', /* 190 0xbe */
'?', /* 191 0xbf */
'A', /* 192 0xc0 */
'A', /* 193 0xc1 */
'A', /* 194 0xc2 */
'A', /* 195 0xc3 */
'A', /* 196 0xc4 */
'A', /* 197 0xc5 */
'A', /* 198 0xc6 */
'C', /* 199 0xc7 */
'E', /* 200 0xc8 */
'E', /* 201 0xc9 */
'E', /* 202 0xca */
'E', /* 203 0xcb */
'I', /* 204 0xcc */
'I', /* 205 0xcd */
'I', /* 206 0xce */
'I', /* 207 0xcf */
'D', /* 208 0xd0 */
'N', /* 209 0xd1 */
'O', /* 210 0xd2 */
'O', /* 211 0xd3 */
'O', /* 212 0xd4 */
'O', /* 213 0xd5 */
'O', /* 214 0xd6 */
'x', /* 215 0xd7 */
'0', /* 216 0xd8 */
'U', /* 217 0xd9 */
'U', /* 218 0xda */
'U', /* 219 0xdb */
'U', /* 220 0xdc */
'Y', /* 221 0xdd */
'P', /* 222 0xde */
'B', /* 223 0xdf */
'a', /* 224 0xe0 */
'a', /* 225 0xe1 */
'a', /* 226 0xe2 */
'a', /* 227 0xe3 */
'a', /* 228 0xe4 */
'a', /* 229 0xe5 */
'a', /* 230 0xe6 */
'c', /* 231 0xe7 */
'e', /* 232 0xe8 */
'e', /* 233 0xe9 */
'e', /* 234 0xea */
'e', /* 235 0xeb */
'i', /* 236 0xec */
'i', /* 237 0xed */
'i', /* 238 0xee */
'i', /* 239 0xef */
'd', /* 240 0xf0 */
'n', /* 241 0xf1 */
'o', /* 242 0xf2 */
'o', /* 243 0xf3 */
'o', /* 244 0xf4 */
'o', /* 245 0xf5 */
'o', /* 246 0xf6 */
':', /* 247 0xf7 */
'o', /* 248 0xf8 */
'u', /* 249 0xf9 */
'u', /* 250 0xfa */
'u', /* 251 0xfb */
'u', /* 252 0xfc */
'y', /* 253 0xfd */
'p', /* 254 0xfe */
'Y', /* 255 0xff */
};
static a_char_u us_lower_table =
{
'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z'
};
static a_char_u us_upper_table =
{
'A','B','C','D','E','F','G',
'H','I','J','K','L','M','N','O',
'P','Q','R','S','T','U','V','W',
'X','Y','Z'
};
static a_char_u us_char_type =
{
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR | IS_BLANK,
IS_CTR | IS_BLANK, IS_CTR | IS_BLANK, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_CTR, IS_CTR, IS_CTR, IS_CTR,
IS_BLANK, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, IS_XDIG | IS_DIG,
IS_XDIG | IS_DIG, IS_XDIG | IS_DIG, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,
IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_XDIG | IS_UPPER,IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, IS_UPPER,
IS_UPPER, IS_UPPER, IS_UPPER, 0x000,
0x000, 0x000, 0x000, IS_ALPH,
0x000, IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,
IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_XDIG | IS_LOWER,IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, IS_LOWER,
IS_LOWER, IS_LOWER, IS_LOWER, 0x000,
0x000, 0x000, 0x000, IS_CTR,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x000
};
static int_u us_order_tbl =
{
0, /* 0 */
'', /* 1 */
'', /* 2 */
'', /* 3 */
'', /* 4 */
'', /* 5 */
'', /* 6 */
'', /* 7 */
'', /* 8 */
TAB, /* 9 */
LF, /* 10 0a */
' ', /* 11 0b */
' ', /* 12 0c */
CR, /* 13 0d */
'', /* 14 0e */
'', /* 15 0f */
'', /* 16 10 */
'', /* 17 11 */
'', /* 18 12 */
'', /* 19 13 */
'', /* 20 14 */
'', /* 21 15 */
'', /* 22 16 */
'', /* 23 17 */
'', /* 24 18 */
'', /* 25 19 */
0x1a, /* 26 1a */
'', /* 27 1b */
'', /* 28 1c */
'', /* 29 1d */
'', /* 30 1e */
'', /* 31 1f */
' ', /* 32 20 */
'!', /* 33 21 */
0x22, /* 34 22 quote */
'#', /* 35 23 */
'$', /* 36 24 */
'%', /* 37 25 */
'&', /* 38 26 */
0x27, /* 39 27 single quote */
'(', /* 40 28 */
')', /* 41 29 */
'*', /* 42 2a */
'+', /* 43 2b */
',', /* 44 2c */
'-', /* 45 2d */
'.', /* 46 2e */
'/', /* 47 2f */
'0', /* 48 30 */
'1', /* 49 31 */
'2', /* 50 32 */
'3', /* 51 33 */
'4', /* 52 34 */
'5', /* 53 35 */
'6', /* 54 36 */
'7', /* 55 37 */
'8', /* 56 38 */
'9', /* 57 39 */
':', /* 58 3a */
';', /* 59 3b */
'<', /* 60 3c */
'=', /* 61 3d */
'>', /* 62 3e */
'?', /* 63 3f */
'@', /* 64 40 */
'A', /* 'A', 65 41 */
'B', /* 'B', 66 42 */
'C', /* 'C', 67 43 */
'D', /* 'D', 68 44 */
'E', /* 'E', 69 45 */
'F', /* 'F', 70 46 */
'G', /* 'G', 71 47 */
'H', /* 'H', 72 48 */
'I', /* 'I', 73 49 */
'J', /* 'J', 74 4a */
'K', /* 'K', 75 4b */
'L', /* 'L', 76 4c */
'M', /* 'M', 77 4d */
'N', /* 'N', 78 4e */
'O', /* 'O', 79 4f */
'P', /* 'P', 80 50 */
'Q', /* 'Q', 81 51 */
'R', /* 'R', 82 52 */
'S', /* 'S', 83 53 */
'T', /* 'T', 84 54 */
'U', /* 'U', 85 55 */
'V', /* 'V', 86 56 */
'W', /* 'W', 87 57 */
'x', /* 'X', 88 58 */
'y', /* 'Y', 89 59 */
'z', /* 'Z', 90 5a */
0x5b, /* 91 5b */
0x5c, /* 92 5c */
0x5d, /* 93 5d ] */
0x5e, /* 94 5e */
'_', /* 95 5f */
0x60, /* 96 60 ` */
'a', /* 97 61 */
'b', /* 98 62 */
'c', /* 99 63 */
'd', /* 100 64 */
'e', /* 101 65 */
'f', /* 102 66 */
'g', /* 103 67 */
'h', /* 104 68 */
'i', /* 105 69 */
'j', /* 106 6a */
'k', /* 107 6b */
'l', /* 108 6c */
'm', /* 109 6d */
'n', /* 110 6e */
'o', /* 111 6f */
'p', /* 112 70 */
'q', /* 113 71 */
'r', /* 114 72 */
's', /* 115 73 */
't', /* 116 74 */
'u', /* 117 75 */
'v', /* 118 76 */
'w', /* 119 77 */
'x', /* 120 78 */
'y', /* 121 79 */
'z', /* 122 7a */
'{', /* 123 7b */
'|', /* 124 7c */
'}', /* 125 7d */
'~', /* 126 7e */
'', /* 127 7f */
'\0x80', /* 128 80 */
'\0x81', /* 129 81 */
'\0x82', /* 130 82 */
'\0x83', /* 131 83 */
'\0x84', /* 132 84 */
'\0x85', /* 133 85 */
'\0x86', /* 134 86 */
'\0x87', /* 135 87 */
'\0x88', /* 136 88 */
'\0x89', /* 137 89 */
'\0x8A', /* 138 8a */
'\0x8B', /* 139 8b */
'\0x8C', /* 140 8c */
'\0x8D', /* 141 8d */
'\0x8E', /* 142 8e */
'\0x8F', /* 143 8f */
'\0x90', /* 144 90 */
'\0x91', /* 145 91 */
'\0x92', /* 146 92 */
'\0x93', /* 147 93 */
'\0x94', /* 148 94 */
'\0x95', /* 149 95 */
'\0x96', /* 150 96 */
'\0x97', /* 151 97 */
'\0x98', /* 152 98 */
'\0x99', /* 153 99 */
'\0x9A', /* 154 9a */
'\0x9B', /* 155 9b */
'\0x9C', /* 156 9c */
'\0x9D', /* 157 9d */
'\0x9E', /* 158 9e */
'\0x9F', /* 159 9f */
'\0xA0', /* 160 a0 */
'\0xA1' , /* 161 a1 */
'\0xA2', /* 162 a2 */
'\0xA3' , /* 163 a3 */
'\0xA4', /* 164 a4 */
'\0xA5', /* 165 a5 */
'\0xA6' , /* 166 a6 */
'\0xA7', /* 167 a7 */
'\0xA8', /* 168 a8 */
'\0xA9', /* 169 a9 */
'\0xAA', /* 170 aa */
'\0xAB', /* 171 ab */
'\0xAC' , /* 172 ac */
'\0xAD', /* 173 ad */
'\0xAE', /* 174 ae */
'\0xAF' , /* 175 af */
'\0xB0', /* 176 b0 */
'\0xB1' , /* 177 b1 */
'\0xB2', /* 178 b2 */
'\0xB3' , /* 179 b3 */
'\0xB4', /* 180 b4 */
'\0xB5', /* 181 b5 */
'\0xB6' , /* 182 b6 */
'\0xB7', /* 183 b7 */
'\0xB8', /* 184 b8 */
'\0xB9', /* 185 b9 */
'\0xBA', /* 186 ba */
'\0xBB', /* 187 bb */
'\0xBC' , /* 188 bc */
'\0xBD', /* 189 bd */
'\0xBE', /* 190 be */
'\0xBF' , /* 191 bf */
'\0xC0', /* 192 c0 */
'\0xC1', /* 193 c1 */
'\0xC2', /* 194 c2 */
'\0xC3', /* 195 c3 */
'\0xC4', /* 196 c4 */
'\0xC5', /* 197 c5 */
'\0xC6' , /* 198 c6 */
'\0xC7', /* 199 c7 */
'\0xC8', /* 200 c8 */
'\0xC9', /* 201 c9 */
'\0xCA' , /* 202 ca */
'\0xCB', /* 203 cb */
'\0xCC', /* 204 cc */
'\0xCD', /* 205 cd */
'\0xCE', /* 206 ce */
'\0xCF', /* 207 cf */
'\0xD0', /* 208 d0 */
'\0xD1' , /* 209 d1 */
'\0xD2', /* 210 d2 */
'\0xD3' , /* 211 d3 */
'\0xD4', /* 212 d4 */
'\0xD5', /* 213 d5 */
'\0xD6', /* 214 d6 */
'\0xD7', /* 215 d7 */
'\0xD8', /* 216 d8 */
'\0xD9', /* 217 d9 */
'\0xDA', /* 218 da */
'\0xDB', /* 219 db */
'\0xDC', /* 220 dc */
'\0xDD', /* 221 dd */
'\0xDE', /* 222 de */
'\0xDF', /* 223 df */
'\0xE0', /* 224 e0 */
'\0xE1', /* 225 e1 */
'\0xE2', /* 226 e2 */
'\0xE3', /* 227 e3 */
'\0xE4', /* 228 e4 */
'\0xE5', /* 229 e5 */
'\0xE6' , /* 230 e6 */
'\0xE7', /* 231 e7 */
'\0xE8', /* 232 e8 */
'\0xE9', /* 233 e9 */
'\0xEA' , /* 234 ea */
'\0xEB', /* 235 eb */
'\0xEC', /* 236 ec */
'\0xED', /* 237 ed */
'\0xEE', /* 238 ee */
'\0xEF', /* 239 ef */
'\0xF0', /* 240 f0 */
'\0xF1' , /* 241 f1 */
'\0xF2', /* 242 f2 */
'\0xF3' , /* 243 f3 */
'\0xF4', /* 244 f4 */
'\0xF5', /* 245 f5 */
'\0xF6', /* 246 f6 */
'\0xF7', /* 247 f7 */
'\0xF8', /* 248 f8 */
'\0xF9', /* 249 f9 */
'\0xFA', /* 250 fa */
'\0xFB', /* 251 fb */
'\0xFC', /* 252 fc */
'\0xFD', /* 253 fd */
'\0xFE', /* 254 fe */
255 /* 255 ff */
};
/* ******************************************************************* */
{% endraw %}

View File

@ -1,13 +0,0 @@
*~
*.aux
*.bbl
*.blg
*.brf
*.idx
*.ind
*.lof
*.log
*.lot
*.out
*.toc
janus.pdf

View File

@ -1,28 +0,0 @@
#!/bin/bash
NAME="$1"
if [[ "$NAME" == "" ]]
then
echo 'no name given'
exit 1
fi
mkdir ../msc-$NAME
cp sample/sample.tex ../msc-$NAME/$NAME.tex
cp sample/sample.bib ../msc-$NAME/$NAME.bib
perl -pne "s/janus/$NAME/g" < gitignore-template > ../msc-$NAME/.gitignore
echo "ROOTFILE=$NAME.tex" > ../msc-$NAME/Makefile
echo 'COMMONDIR=../uam-wmi-msc' >> ../msc-$NAME/Makefile
echo >> ../msc-$NAME/Makefile
echo 'include $(COMMONDIR)/msc.mk' >> ../msc-$NAME/Makefile
cd ../msc-$NAME
git init
git add --all
git commit -m 'init'
git remote add origin ssh://gitolite@gonito.net/msc-$NAME
#git push origin master

View File

@ -1,38 +0,0 @@
{% raw %}
# Plik, który powinien być załączany (include'owany) przez pliki
# Makefile poszczególnych prac.
# W pliku Makefile załączającym niniejszy plik powinny być
# zdefiniowane następujące zmienne:
# ROOTFILE - główny plik .tex pracy
# PICTURES - ewentualne pliki graficzne
PDFTARGET=$(ROOTFILE:.tex=.pdf)
BASENAME=$(ROOTFILE:.tex=)
WITHGLOSSARIES ?= no
# Choć jesteśmy w katalogu common, niniejszy plik będzie załączany
# w katalogach poszczególnych prac, dlatego też musimy wpisać względną
# ścieżkę "..".
INPUTSDIR=".:$(COMMONDIR):"
RELDIR=$(COMMONDIR)
.DELETE_ON_ERROR:
all: $(PDFTARGET)
$(PDFTARGET) : $(ROOTFILE) $(PICTURES) $(RELDIR)/plain-pl.bst $(RELDIR)/uam.png $(RELDIR)/wmimgr.cls
TEXINPUTS=$(INPUTSDIR) pdflatex -halt-on-error $(ROOTFILE)
sed -f ../../common/fixidx.sed $(BASENAME).idx | iconv -f utf-8 -t iso-8859-2 | ../../ext/plmindex/plmindex | iconv -f iso-8859-2 -t utf-8 > $(BASENAME).ind
BSTINPUTS=$(INPUTSDIR) bibtex $(BASENAME)
# pdflatecha należy uruchomić 3 razy, ze względu na możliwe referencje
TEXINPUTS=$(INPUTSDIR) pdflatex -halt-on-error $(ROOTFILE)
TEXINPUTS=$(INPUTSDIR) pdflatex -halt-on-error $(ROOTFILE)
ifeq ($(WITHGLOSSARIES), yes)
makeglossaries $(BASENAME)
TEXINPUTS=$(INPUTSDIR) pdflatex -halt-on-error $(ROOTFILE)
endif
# czyszczenie z latechowych śmieci
clean:
rm -f $(PDFTARGET) *.bbl *.aux *.blg *.brf *.log *.lof *.idx *.out *.toc *.lot *.idx *.ind *.loa *.ist *.glo *.glg *.gls *.not *.ntn *.xdy
{% endraw %}