in */
outchar(m_textchar, outfile) ;
footnoteno++;
if (!had_an_otherfront_head) {
endhead();
}
PushForm(NULL, NULL, NULL);
PushForm(NULL, NULL, NULL);
char *string =
GetDefaultHeaderString("GlossaryElementDefaultHeadingString",
M_SDATA,
"Glossary");
static char glossary_string[] = "-GLOSSARY";
char id[SDLNAMESIZ+sizeof(glossary_string)];
thisnodelevel = 2;
sprintf(id, "%s%s", sdlReservedName, glossary_string);
mb_starthelpnode("_GLOSSARY", id, thisnodelevel);
if (strlen(string) + 1 > sizeof(chapstring)) {
m_error("Program error: exceeded chapstring") ;
m_exit(TRUE) ;
}
snprintf(chapstring, sizeof(chapstring), "%s", string) ;
fputs("\nGlossary\n", stderr) ;
glossary = TRUE ;
fprintf(outfile, "%s\n", string);
m_free(string, "default header string return");
CloseVirpage();
thisnodelevel = 0;
id = ID ;
file = ENTITY ;
unsigned char etype, wheredef ;
/* Code from figstart */
if (id) {
mbstowcs(xrefstring, "\\", 400);
xstrlen = w_strlen(xrefstring) ;
m_getline(&xrffile, &xrfline) ;
if (xrffile == NULL) {
/* set to primary input source */
xrffile = inputname;
}
setid(id,
TRUE,
FALSE,
inchapter,
chapstring,
xrffile,
xrfline,
FALSE) ;
}
/* initialize some stuff first:
- file is the entity name,
- f_file is the content of the entity,
used only if f_content nonNULL
- f_content is f_file with the relative pathname, initialized to NULL,
- f_contqual is fully qualified f_file, assigned ONLY IF
f_content nonNULL
*/
file_ent = FALSE ;
f_content = NULL ;
f_contqual[0] = M_EOS ;
/* check ENTITY and determine the figure type */
if (file) {
m_lookent(file, &etype, &f_file, &wheredef) ;
if (etype != M_SYSTEM) {
M_WCHAR *wc_stago, *wc_tagc, *wc_entsystem, *wc_entkw;
wc_stago = MakeWideCharString(m_stago);
wc_tagc = MakeWideCharString(m_tagc);
wc_entsystem = MakeWideCharString(m_entsystem);
wc_entkw = MakeWideCharString(m_entkw);
m_err6("%s not a %s %s, as required for the ENTITY parameter of %s%s%s",
file,
wc_entsystem,
wc_entkw,
wc_stago,
m_parent(0),
wc_tagc) ;
m_free(wc_stago,"wide character string");
m_free(wc_tagc,"wide character string");
m_free(wc_entsystem,"wide character string");
m_free(wc_entkw,"wide character string");
}
else {
file_ent = TRUE ;
f_content = searchforfile(f_file) ;
if (f_content) {
if (getqualified(f_contqual, f_content)) {
/* unsuccessful qual */
if (w_strlen(f_content) < FNAMELEN)
w_strcpy(f_contqual, f_content) ;
else {
m_err1("Internal error. File name too long: %s", f_content) ;
m_exit(m_errexit) ;
}
}
}
else {
m_err2("Can't find file %s (declared in entity %s)", f_file, file) ;
}
}
}
{
char *mb_content, snb_id[32];
char buffer[BIGBUF];
static M_WCHAR empty[1];
empty[0] = M_EOS;
if (!f_content) f_content = empty;
mb_content = MakeMByteString(f_content);
sprintf(snb_id, "%s%d", sdlReservedName, NextId());
mb_strcode("\n \n ",
snb_id);
mb_strcode(buffer, outfile);
AddToSNB(snb_id, mb_content);
m_free(mb_content,"multi-byte string");
}
/* Accent headings */
notehead = TRUE ;
newhline = 0 ;
fputs("", outfile);
/* Other headings */
char *ssi;
ssi = MakeMByteString(m_parent(1));
newhline = 0 ;
fprintf(outfile, "", ssi);
m_free(ssi, "multi-byte string");
/* Node headings */
char *ssi;
ssi = MakeMByteString(m_parent(1));
newhline = 0 ;
echo = TRUE ;
savhd = TRUE ;
hderr = FALSE ;
svheadlen = 0 ;
savesnb = mb_malloc(1);
*savesnb = '\0';
tooutput = FALSE;
fprintf(outfile, "
char *ssi;
ssi = MakeMByteString(m_parent(1));
newhline = 0 ;
echo = TRUE ;
savhd = TRUE ;
hderr = FALSE ;
svheadlen = 0 ;
tooutput = FALSE;
fprintf(outfile, "
newhline = 0 ;
echo = TRUE ;
savhd = TRUE ;
hderr = FALSE ;
svheadlen = 0 ;
tooutput = FALSE;
fputs("
char *ssi;
ssi = MakeMByteString(m_parent(1));
newhline = 0 ;
echo = TRUE ;
savhd = TRUE ;
hderr = FALSE ;
svheadlen = 0 ;
fprintf(outfile, "", ssi);
m_free(ssi, "multi-byte string");
/* Other headings */
M_WCHAR *wc_stago, *wc_tagc;
wc_stago = MakeWideCharString(m_stago);
wc_tagc = MakeWideCharString(m_tagc);
m_err2("Unimplemented %sCHAPHEAD%s reached", wc_stago, wc_tagc);
m_free(wc_stago,"wide character string");
m_free(wc_tagc,"wide character string");
/* Non-node headings */
char *ssi;
ssi = MakeMByteString(m_parent(1));
echo = TRUE ;
newhline = 0 ;
fprintf(outfile, "", ssi);
m_free(ssi, "multi-byte string");
/* Non-node headings */
echo = TRUE ;
newhline = 0 ;
needabstracthead = FALSE;
fputs("", outfile);
/* Node headings */
had_an_otherfront_head = TRUE;
newhline = 0 ;
echo = TRUE ;
savhd = TRUE ;
hderr = FALSE ;
svheadlen = 0 ;
fputs("", outfile);
/* Other headings (mixed content) */
endhead();
fputs("", outfile);
/* Accent and Other headings (no mixed content) */
fputs("\n", outfile);
/* Non node headings */
echo = FALSE ;
chksnb();
/* Node headings */
echo = FALSE;
savhd = FALSE;
savehead[svheadlen] = '\0';
tooutput = TRUE;
/* Non node headings */
echo = FALSE;
savhd = FALSE;
savehead[svheadlen] = '\0';
tooutput = TRUE;
/* Non node headings */
endhead() ;
fputs("\n", outfile);
/* Node headings. */
endhead() ;
chksnb();
/* Other headings. */
fputs("", outfile);
outchar(m_textchar, outfile) ;
char hostname[BIGBUF];
char **tossline = toss;
char *mb_language, *mb_charset;
long timeStamp;
ModifyEntities(); /* convert SDATA [......] to */
if (!getenv("_DTHELPTAG_NO_UNIQUE_ID"))
{
hostname[sizeof(hostname)-1] = '\0';
gethostname(hostname, sizeof(hostname)-1);
docId = mb_malloc(strlen(hostname)+1);
strcpy(docId, hostname);
timeStamp = time(0);
}
else
{
docId = "test";
timeStamp = 0;
}
thisnodelevel = 0;
fprintf(outfile,
"\n", "SDLDTD", "1.1.1");
fprintf(outfile, "\n", docId);
fputs("\n \n", outfile);
IncludeToss();
fputs(" \n", outfile);
snbstart = ftell(outfile);
assert_hometopic_exists();
fputs(" \n", outfile);
static char hometopic[] = "-HOMETOPIC";
char id[SDLNAMESIZ+sizeof(hometopic)];
sprintf(id, "%s%s", sdlReservedName, hometopic);
mb_starthelpnode("_HOMETOPIC", id, 1);
nohometopic = FALSE;
CloseVirpage();
have_index = TRUE ;
print[0] = '\0';
subprint[0] = '\0';
sort[0] = '\0';
subsort[0] = '\0';
/* ignore 's in cache creek */
{ /* sort field */
char *mb_print, *mb_nospace1, *mb_nospace2, id[32];
M_WCHAR *pwc, wnl, wsp;
mbtowc(&wnl, "\n", 1);
mbtowc(&wsp, " ", 1);
pwc = print;
while (pwc = w_strchr(pwc, wnl))
*pwc = wsp;
mb_print = MakeMByteString(print);
if (w_strlen(sort) > 0)
{ /* use sort[] */
char *mb_sort;
pwc = sort;
while (pwc = w_strchr(pwc, wnl))
*pwc = wsp;
mb_sort = MakeMByteString(sort);
if (w_strlen(subsort) > 0 || w_strlen(subprint) > 0)
{
/* append subsort or subprint */
char *mb_sub;
M_WCHAR *pwcSub;
pwcSub = (w_strlen(subsort) > 0) ? subsort : subprint;
pwc = pwcSub;
while (pwc = w_strchr(pwc, wnl))
*pwc = wsp;
mb_sub = MakeMByteString(pwcSub);
/* strip trailing spaces */
mb_nospace1 = mb_sort;
while (*mb_nospace1++); --mb_nospace1; /* end of string */
while (*--mb_nospace1 == ' ') *mb_nospace1 = '\0';
mb_nospace2 = mb_sub;
while (*mb_nospace2++); --mb_nospace2; /* end of string */
while (*--mb_nospace2 == ' ') *mb_nospace2 = '\0';
/* strip leading spaces */
mb_nospace1 = mb_sort;
while (*mb_nospace1++ == ' '); --mb_nospace1;
mb_nospace2 = mb_sub;
while (*mb_nospace2++ == ' '); --mb_nospace2;
fprintf(indexfp, "%s, %s", mb_nospace1, mb_nospace2);
m_free(mb_sub,"multi-byte string");
}
else
{ /* plain sort */
/* strip trailing spaces */
mb_nospace1 = mb_sort;
while (*mb_nospace1++); --mb_nospace1; /* end of string */
while (*--mb_nospace1 == ' ') *mb_nospace1 = '\0';
/* strip leading spaces */
mb_nospace1 = mb_sort;
while (*mb_nospace1++ == ' '); --mb_nospace1;
fprintf(indexfp, "%s", mb_nospace1);
}
m_free(mb_sort,"multi-byte string");
}
else
{ /* use print field */
if (w_strlen(subsort) > 0 || w_strlen(subprint) > 0)
{
/* append subsort or subprint */
char *mb_sub;
M_WCHAR *pwcSub;
pwcSub = (w_strlen(subsort) > 0) ? subsort : subprint;
pwc = pwcSub;
while (pwc = w_strchr(pwc, wnl))
*pwc = wsp;
mb_sub = MakeMByteString(pwcSub);
/* strip trailing spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++); --mb_nospace1; /* end of string */
while (*--mb_nospace1 == ' ') *mb_nospace1 = '\0';
mb_nospace2 = mb_sub;
while (*mb_nospace2++); --mb_nospace2; /* end of string */
while (*--mb_nospace2 == ' ') *mb_nospace2 = '\0';
/* strip leading spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++ == ' '); --mb_nospace1;
mb_nospace2 = mb_sub;
while (*mb_nospace2++ == ' '); --mb_nospace2;
fprintf(indexfp, "%s, %s", mb_nospace1, mb_nospace2);
m_free(mb_sub,"multi-byte string");
}
else
{ /* plain print */
/* strip trailing spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++); --mb_nospace1; /* end of string */
while (*--mb_nospace1 == ' ') *mb_nospace1 = '\0';
/* strip leading spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++ == ' '); --mb_nospace1;
fprintf(indexfp, "%s", mb_nospace1);
}
}
putc('\036' /* ascii record separator */, indexfp);
/* print field */
if (w_strlen(subprint) > 0)
{
char *mb_subprint;
pwc = subprint;
while (pwc = w_strchr(pwc, wnl))
*pwc = wsp;
mb_subprint = MakeMByteString(subprint);
/* strip trailing spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++); --mb_nospace1; /* end of string */
while (*--mb_nospace1 == ' ') *mb_nospace1 = '\0';
mb_nospace2 = mb_subprint;
while (*mb_nospace2++); --mb_nospace2; /* end of string */
while (*--mb_nospace2 == ' ') *mb_nospace2 = '\0';
/* strip leading spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++ == ' '); --mb_nospace1;
mb_nospace2 = mb_subprint;
while (*mb_nospace2++ == ' '); --mb_nospace2;
fprintf(indexfp, "%s, %s", mb_nospace1, mb_nospace2);
m_free(mb_subprint,"multi-byte string");
}
else
{
/* strip trailing spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++); --mb_nospace1; /* end of string */
while (*--mb_nospace1 == ' ') *mb_nospace1 = '\0';
/* strip leading spaces */
mb_nospace1 = mb_print;
while (*mb_nospace1++ == ' '); --mb_nospace1;
fprintf(indexfp, "%s", mb_nospace1);
}
m_free(mb_print,"multi-byte string");
putc('\036' /* ascii record separator */, indexfp);
/* id field */
if (inSdlP)
{
if (inParText)
{
sprintf(id, "%s%d", sdlReservedName, NextId());
fprintf(outfile, "", id);
fputs(id, indexfp);
fputs("\n", indexfp);
}
else
{
if (!parTextId)
parTextId = NextId();
sprintf(id, "%s%d", sdlReservedName, parTextId);
fputs(id, indexfp);
fputs("\n", indexfp);
}
}
else if (*nodeid)
{
char *mb_nodeid;
mb_nodeid = MakeMByteString(nodeid);
fputs(mb_nodeid, indexfp);
fputs("\n", indexfp);
m_free(mb_nodeid,"multi-byte string");
}
else
fprintf(indexfp, "%s-HOMETOPIC\n", sdlReservedName);
}
indexchar(m_textchar) ;
indent = INDENT ;
gentity = GENTITY ;
gposition = GPOSITION (QLEFT = LEFT,
QRIGHT = RIGHT) ;
ghyperlink = GHYPERLINK ;
glinktype = GLINKTYPE (QJUMP = JUMP,
QJUMPNEWVIEW = JUMPNEWVIEW,
QDEFINITION = DEFINITION,
QEXECUTE = EXECUTE,
QAPPDEFINED = APPDEFINED,
QMAN = MAN) ;
gdescription = GDESCRIPTION ;
id = ID;
indentp = indent;
imagegentityp = gentity;
imagegpositionp = gposition;
imageghyperlinkp = ghyperlink;
imageglinktypep = glinktype;
imagegdescription = gdescription;
if (!inBlock)
StartBlock(NULL, NULL, NULL);
inSdlP = TRUE;
fputs("", outfile);
inSdlP = FALSE;
fputs("
\n", outfile);
imoutchar(m_textchar) ;
idxsavlen = 0;
didsort = FALSE;
/* capture saved term unless got it already */
if (! didsort) {
idxsav[idxsavlen] = M_EOS;
w_strcpy(print, idxsav);
}
else { /* save the sort field */
idxsav[idxsavlen] = M_EOS;
w_strcpy(sort, idxsav);
}
idxsavlen = 0;
didsubsort = FALSE;
/* capture saved term unless got it already */
if (! didsubsort) {
idxsav[idxsavlen] = M_EOS;
w_strcpy(subprint, idxsav);
}
else { /* save the sort field */
idxsav[idxsavlen] = M_EOS;
w_strcpy(subsort, idxsav);
}
id = ID ;
Item(id) ;
indexchar('[');
mb_strcode("", outfile) ;
if (echo) mb_echohead("[[") ;
indexchar(']');
mb_strcode(" ", outfile) ;
if (echo) mb_echohead("]]") ;
indexchar(m_textchar) ;
esoutchar(m_textchar) ;
char *first, *loose, *wrap;
first = "";
if (listitems[list].firstitem)
{
first = "FIRST-";
if (needFData)
{
fputs("\n", outfile);
needFData = FALSE;
}
}
loose = lablisttight[list] ? "TIGHT" : "LOOSE";
wrap = (listitems[list].longlabel == WRAP) ? "" : " TYPE=\"LINED\"";
labelid[list] = NextId();
fprintf(outfile,
"\n",
sdlReservedName,
labelid[list],
first,
loose);
fprintf(outfile, "", wrap);
char *first, *loose;
char ssi[BIGBUF], labelId[BIGBUF];
fputs("
\n \n", outfile);
first = "";
if (listitems[list].firstitem)
{
first = "FIRST-";
listitems[list].firstitem = FALSE;
}
loose = lablisttight[list] ? "TIGHT" : "LOOSE";
sprintf(ssi, "%s%s", first, loose);
sprintf(labelId, "%s%d", sdlReservedName, labelid[list]);
PushForm2("ITEM", ssi, labelId, NULL);
if (listitems[list].firstitem)
{
listitems[list].firstitem = FALSE;
}
labhid[list] = NextId();
if (needFData)
{
fputs("\n", outfile);
needFData = FALSE;
}
fprintf(outfile,
"\n",
sdlReservedName,
labhid[list],
lablisttight[list] ? "TIGHT" : "LOOSE");
fputs("", outfile);
fputs("
\n \n", outfile);
labhtextid[list] = NextId();
fprintf(outfile,
"\n",
sdlReservedName,
labhtextid[list],
lablisttight[list] ? "TIGHT" : "LOOSE");
fputs("", outfile);
char labh_id[SDLNAMESIZ + 10], labhtext_id[SDLNAMESIZ + 10];
fputs("
\n \n", outfile);
strcpy(labh_id, sdlReservedName);
m_itoa(labhid[list], labh_id + SDLNAMESIZ - 1);
strcpy(labhtext_id, sdlReservedName);
m_itoa(labhtextid[list], labhtext_id + SDLNAMESIZ - 1);
Add2ToRowVec(&formStackTop->vecLen,
&formStackTop->rowVec,
labh_id,
labhtext_id);
longlabel = LONGLABEL (QWRAP = WRAP,
QNOWRAP = NOWRAP) ;
spacing = SPACING (QTIGHT = TIGHT,
QLOOSE = LOOSE) ;
StartLabList(spacing, longlabel);
PopForm2();
list--;
id = ID ;
char mb_xrefstring[400];
if (! tonumexlines)
m_error(
"Preparing cross-reference to a line in an example without line numbers"
) ;
sprintf(mb_xrefstring, "%d", exLineNum) ;
mbstowcs(xrefstring, mb_xrefstring, 400);
xstrlen = w_strlen(xrefstring) ;
m_getline(&xrffile, &xrfline) ;
if (xrffile == NULL) {
/* set to primary input */
xrffile = inputname;
}
setid(id,
TRUE,
FALSE,
inchapter,
chapstring,
xrffile,
xrfline,
TRUE) ;
{
char *mb_id, buffer[BIGBUF];
mb_id = MakeMByteString(id);
sprintf(buffer, "", mb_id);
mb_strcode(buffer, outfile);
m_free(mb_id,"multi-byte string");
}
hyperlink = HYPERLINK ;
type = TYPE (QJUMP = JUMP,
QJUMPNEWVIEW = JUMPNEWVIEW,
QDEFINITION = DEFINITION,
QEXECUTE = EXECUTE,
QAPPDEFINED = APPDEFINED,
QMAN = MAN) ;
description = DESCRIPTION ;
HandleLink(hyperlink, type, description);
/* reset link type to default. This is braindead, but enough.
E.g.,
will do the right thing (remember that xref turns to an implicit link).
Right_thing => xref becomes definition link.
However, in
Test
the xref will think that is supposed to become a link of type jump,
not definition. This case is odd, so we won't worry about it.
*/
global_linktype = 0;
mb_strcode("", outfile);
type = TYPE (QORDER = ORDER,
QBULLET = BULLET,
QPLAIN = PLAIN,
QMILSPEC = MILSPEC,
QCHECK = CHECK) ;
order = ORDERTYPE (QUALPHA = UALPHA,
QLALPHA = LALPHA,
QARABIC = ARABIC,
QUROMAN = UROMAN,
QLROMAN = LROMAN) ;
spacing = SPACING (QTIGHT = TIGHT,
QLOOSE = LOOSE) ;
cont = CONTINUE ;
StartList(type, order, spacing, cont) ;
EndList();
id = ID ;
if (id)
{
char *mb_id;
char buffer[BIGBUF];
mb_id = MakeMByteString(id);
sprintf(buffer, "", mb_id);
mb_strcode(buffer, outfile);
m_free(mb_id,"multi-byte string");
savid = checkid(id);
}
if (savid)
{
mb_shchar(M_EOS,
&xstrlen,
(sizeof(xrefstring) / sizeof(M_WCHAR)),
xrefstring,
idstring,
"Too many characters in corresponding cross-reference",
&iderr);
setid(savid,
TRUE,
TRUE,
inchapter,
chapstring,
xrffile,
xrfline,
TRUE);
}
if (memo && inSdlP)
{
if (m_textchar == '"')
{ /* handle funny quote in memo bug */
}
else
{
outchar(m_textchar, outfile);
}
}
/* could need to handle calculator context sensitive entities
* here if needed to reduce tex macro count
*/
if (memo)
{
outpi(m_enttype, m_pi, m_entname) ;
}
thisnodelevel = 2;
mb_starthelpnode("MESSAGE", "", thisnodelevel);
chapst = FALSE ;
fprintf(stderr, "\nMessages.\n") ;
emsghead = DEFHEAD ;
CloseVirpage();
thisnodelevel = 0;
PushForm(NULL, "MSG", NULL);
checkmsghead() ;
PopForm();
fputs("", outfile);
fputs("\n", outfile);
include = INCLUDE ;
exclude = EXCLUDE ;
PushForm(NULL, NULL, NULL);
checkmsghead() ;
chapst = TRUE ;
savid = checkid(NULL) ; /* hook for possible future ID */
iderr = FALSE ;
PopForm();
inSdlP = TRUE;
StartBlock(NULL, "MSGTEXT", NULL);
fputs("", outfile);
inSdlP = FALSE;
fputs("
\n", outfile);
mb_strcode("\n", outfile);
fputs("&\n", outfile) ;
StartNCW("NOTE");
synelcnt = 0;
fputs("[", outfile);
fputs("]", outfile);
id = ID ;
char *mb_id;
if (!id)
mb_id = NULL;
else
mb_id = MakeMByteString(id);
mb_starthelpnode("METAINFO", mb_id, 0);
if (mb_id)
m_free(mb_id, "multi-byte string");
had_an_otherfront_head = FALSE;
savid = checkid(id) ;
iderr = FALSE ;
CloseVirpage();
if (id && !had_an_otherfront_head) {
m_errline("You must use a tag after \n");
}
PushForm(NULL, "OTHERHEAD", NULL);
PopFormMaybe();
indent = INDENT ;
gentity = GENTITY ;
gposition = GPOSITION (QLEFT = LEFT,
QRIGHT = RIGHT) ;
ghyperlink = GHYPERLINK ;
glinktype = GLINKTYPE (QJUMP = JUMP,
QJUMPNEWVIEW = JUMPNEWVIEW,
QDEFINITION = DEFINITION,
QEXECUTE = EXECUTE,
QAPPDEFINED = APPDEFINED,
QMAN = MAN) ;
gdescription = GDESCRIPTION ;
id = ID;
paragraph(indent,
id,
gentity,
gposition,
ghyperlink,
glinktype,
gdescription);
inSdlP = FALSE;
fputs("\n
\n", outfile);
M_WCHAR *wc_image;
wc_image = MakeWideCharString("IMAGE");
handle_link_and_graphic(wc_image,
imagegentityp,
imagegpositionp,
imageghyperlinkp,
imageglinktypep,
imagegdescription);
m_free(wc_image,"wide character string");
inParText++;
if (tooutput)
EmitSavedAnchors();
savid = NULL; /* in case there was no head */
inParText++;
if (tooutput)
EmitSavedAnchors();
inParText++;
if (tooutput)
EmitSavedAnchors();
putc('\n', stderr) ;
--inParText;
putc('\n', stderr) ;
--inParText;
--inParText;
M_WCHAR wc_nl;
mbtowc(&wc_nl, "\n", 1);
if (m_textchar == wc_nl)
fputs("&\n", outfile);
else
outchar(m_textchar, outfile);
M_WCHAR wc_nl;
mbtowc(&wc_nl, "\n", 1);
if (m_textchar == wc_nl)
mb_shstring("\n",
&svheadlen,
(sizeof(savehead) / sizeof(M_WCHAR)),
savehead,
"Too many characters in head or caption",
&hderr) ;
else
outchar(m_textchar, outfile);
M_WCHAR wc_nl;
mbtowc(&wc_nl, "\n", 1);
if (m_textchar == wc_nl) {
fputs(" ", stderr) ;
mb_strcode("\n", outfile) ;
if (savid) shchar(' ',
&xstrlen,
(sizeof(xrefstring) / sizeof(M_WCHAR)),
xrefstring,
idstring,
"Too many characters in corresponding cross-reference",
&iderr) ;
shchar(' ',
&svheadlen,
(sizeof(savehead) / sizeof(M_WCHAR)),
savehead,
svhdstring,
"Too many characters in head or caption",
&hderr) ;
}
else
outchar(m_textchar, outfile);
M_WCHAR wc_nl;
mbtowc(&wc_nl, "\n", 1);
if (m_textchar == wc_nl)
fputs("\n", outfile) ;
else
outchar(m_textchar, outfile);
M_WCHAR wc_nl;
mbtowc(&wc_nl, "\n", 1);
if (m_textchar == wc_nl)
fputc('\n', outfile) ;
else
outchar(m_textchar, outfile);
PushForm("TEXT", "PROCEDURE", NULL);
PopFormMaybe();
mb_strcode("``", outfile) ;
if (echo) putc('"', stderr) ;
mb_strcode(" ", outfile) ;
if (echo) putc('"', stderr) ;
mb_strcode("''", outfile) ;
if (echo) putc('"', stderr) ;
mb_strcode(" ", outfile) ;
if (echo) putc('"', stderr) ;
indexchar('\"') ;
indexchar('\"') ;
indexchar(m_textchar) ;
synelcnt = 0;
fputs("{", outfile);
fputs("}", outfile);
id = ID ;
M_WCHAR *wc_rsect, *wc_helpvolume;
wc_rsect = MakeWideCharString("RSECT");
wc_helpvolume = MakeWideCharString("HELPVOLUME");
assert_hometopic_exists();
if (!rsectseq) thisnodelevel = thisnodelevel + 1;
if (w_strcmp(m_parent(1), wc_helpvolume) != 0)
{
CloseVirpage();
starthelpnode(wc_rsect, id, thisnodelevel);
}
else
starthelpnode(wc_rsect, id, 2);
m_free(wc_rsect, "wide character string");
m_free(wc_helpvolume, "wide character string");
rsectstart(id) ;
M_WCHAR *wc_helpvolume;
wc_helpvolume = MakeWideCharString("HELPVOLUME");
if (w_strcmp(m_parent(1), wc_helpvolume) == 0)
CloseVirpage();
m_free(wc_helpvolume, "wide character string");
PushForm(NULL, NULL, NULL);
PushForm(NULL, NULL, NULL);
PopFormMaybe();
id = ID ;
M_WCHAR *wc_s1;
wc_s1 = MakeWideCharString("S1");
assert_hometopic_exists();
thisnodelevel = 2;
starthelpnode(wc_s1, id, thisnodelevel);
m_free(wc_s1, "wide character string");
rsectseq = FALSE ;
chapst = TRUE ;
savid = checkid(id) ;
iderr = FALSE ;
M_WCHAR *wc_s1;
wc_s1 = MakeWideCharString("S1");
assert_hometopic_exists();
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s1, id, thisnodelevel);
m_free(wc_s1, "wide character string");
rsectseq = FALSE ;
chapst = TRUE ;
savid = checkid(id) ;
iderr = FALSE ;
CloseVirpage();
rseqend() ;
thisnodelevel = 0;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s2;
wc_s2 = MakeWideCharString("S2");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s2, id, thisnodelevel);
m_free(wc_s2, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s3;
wc_s3 = MakeWideCharString("S3");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s3, id, thisnodelevel);
m_free(wc_s3, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s4;
wc_s4 = MakeWideCharString("S4");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s4, id, thisnodelevel);
m_free(wc_s4, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s5;
wc_s5 = MakeWideCharString("S5");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s5, id, thisnodelevel);
m_free(wc_s5, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s6;
wc_s6 = MakeWideCharString("S6");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s6, id, thisnodelevel);
m_free(wc_s6, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s7;
wc_s7 = MakeWideCharString("S7");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s7, id, thisnodelevel);
m_free(wc_s7, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s8;
wc_s8 = MakeWideCharString("S8");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s8, id, thisnodelevel);
m_free(wc_s8, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
id = ID ;
M_WCHAR *wc_s9;
wc_s9 = MakeWideCharString("S9");
thisnodelevel++;
CloseVirpage();
starthelpnode(wc_s9, id, thisnodelevel);
m_free(wc_s9, "wide character string");
rsectseq = FALSE ;
savid = checkid(id) ;
iderr = FALSE ;
rseqend() ;
--thisnodelevel;
didsort = TRUE;
idxsav[idxsavlen] = M_EOS;
w_strcpy(print, idxsav);
idxsavlen = 0;
idxsav[idxsavlen] = M_EOS;
w_strcpy(sort, idxsav);
didsubsort = TRUE;
idxsav[idxsavlen] = M_EOS;
w_strcpy(subprint, idxsav);
idxsavlen = 0;
idxsav[idxsavlen] = M_EOS;
w_strcpy(subsort, idxsav);
mb_strcode("", outfile);
mb_strcode("", outfile);
if (echo) mb_echohead("__") ;
mb_strcode(" ", outfile);
if (echo) mb_echohead("__") ;
outchar(m_textchar, outfile) ;
indexchar(m_textchar) ;
outchar(m_textchar, outfile) ;
mb_strcode("", outfile);
mb_strcode("", outfile);
if (echo) mb_echohead("^^") ;
mb_strcode(" ", outfile);
if (echo) mb_echohead("^^") ;
outchar(m_textchar, outfile) ;
indexchar(m_textchar) ;
outchar(m_textchar, outfile) ;
if (synelcnt++) {
fputs("\n", outfile);
}
fputs("\n", outfile);
outchar(m_textchar, outfile) ;
inSdlP = TRUE;
if (!inBlock)
StartBlock(NULL, NULL, NULL);
fprintf(outfile, "");
inSdlP = FALSE;
fputs("
\n", outfile);
outchar(m_textchar, outfile) ;
base = BASE ;
gloss = GLOSS (QGLOSS = GLOSS,
QNOGLOSS = NOGLOSS) ;
termp = term ;
wsterm = FALSE ;
tooutput = FALSE;
if (echo) mb_echohead("++") ;
endterm(base, gloss, "current"); /* don't use definition window for link */
endterm(base, gloss, "popup"); /* use definition window for link */
termchar(m_textchar) ;
termpi(m_enttype, m_pi, m_entname) ;
StartNCWtext("NOTE",
"NoteElementDefaultIconFile",
"NoteElementDefaultHeadingString");
StartNCWtext("CAUTION",
"CautionElementDefaultIconFile",
"CautionElementDefaultHeadingString");
StartNCWtext("WARNING",
"WarningElementDefaultIconFile",
"WarningElementDefaultHeadingString");
PushForm(NULL, "MESSAGE", NULL);
checkmsghead() ;
PushForm(NULL, "MSGSUB", NULL);
if (needabstracthead)
{
fputs("", outfile);
chksnb();
needabstracthead = FALSE;
}
M_WCHAR *p ;
char id[SDLNAMESIZ+10];
sprintf(id, "%s%d", sdlReservedName, lastTermId);
PushForm(NULL, NULL, id);
StartBlock(NULL, "TERM", NULL);
mb_strcode("", outfile);
strcode(term, outfile);
mb_strcode("
\n", outfile);
PushForm(NULL, "DEFINITION", NULL);
PopForm(); PopForm();
if (formStackBase && (formStackTop >= formStackBase))
{
if (formStackTop->vecLen == 1)
StartBlock(NULL, NULL, NULL);
PopForm();
}
else if (inBlock)
{
fputs("\n", outfile);
inBlock = FALSE;
}
fputs("", outfile);
hadtitle = TRUE;
newhline = 0 ;
savhd = TRUE ;
hderr = FALSE ;
svheadlen = 0 ;
char *mb_savehead, *ssi;
static char title_string[] = "-TITLE";
char id[SDLNAMESIZ+sizeof(title_string)];
if (hderr)
{
m_error("Error collecting title characters.");
}
savhd = FALSE ;
fputs("\n", outfile);
sprintf(id, "%s%s", sdlReservedName, title_string);
mb_starthelpnode("_TITLE", id, 0);
ssi = MakeMByteString(m_parent(1));
fprintf(outfile, "", ssi);
savehead[svheadlen] = M_EOS ;
mb_savehead = MakeMByteString(savehead);
fputs(mb_savehead, outfile);
m_free(mb_savehead,"multi-byte string");
m_free(ssi,"multi-byte string");
fputs("\n", outfile);
CloseVirpage();
savedtitle = (M_WCHAR *) m_malloc(w_strlen(savehead) + 1, "saved title");
w_strcpy(savedtitle, savehead);
if (echo) {
mb_echohead(m_stago) ;
echohead(m_parent(0)) ;
mb_echohead(m_net) ;
}
mb_strcode("", outfile) ;
esoutchar(m_textchar) ;
if (echo) mb_echohead(m_net) ;
mb_strcode(" ", outfile) ;
exoutchar(m_textchar) ;
indexchar(m_textchar) ;
mb_strcode("", outfile) ;
if (echo) mb_echohead("%%") ;
mb_strcode(" ", outfile) ;
if (echo) mb_echohead("%%") ;
indexchar(m_textchar) ;
mb_strcode("", outfile) ;
/* added to fix calculator computer chars */
if (m_textchar == M_SPACE) fputs("\\ ", outfile) ;
else outchar(m_textchar, outfile) ;
textsize = TEXTSIZE (QNORMAL = NORMAL,
QSMALLER = SMALLER,
QSMALLEST = SMALLEST) ;
int tsize;
char *ssi;
inSdlP = TRUE;
StartBlock(NULL, "EX", NULL);
tsize = vextextsize(textsize);
if (tsize == SMALLEST)
ssi = "SMLST";
else if (tsize == SMALLER)
ssi = "SMLR";
else
ssi = "NML";
fprintf(outfile, "", ssi);
inSdlP = FALSE;
fputs("
\n", outfile);
fputs("\n", outfile);
inBlock = FALSE;
vexoutchar(m_textchar) ;
StartNCW("WARNING");
/* Cross-referencing that allows forward references is inherently a two-pass
process. However, this interface assumes a two-pass process. MARKUP
provides the first pass and TeX the second. MARKUP can therefore define
a TeX macro for every cross-reference and write a file of definitions of
these macros that is read at the beginning of the TeX pass. In fact,
information about cross-references is stored in a trie by MARKUP. Data is
entered into this structure both when a cross-reference is defined (with
an id parameter on a chapter, figure, etc.) and when it is used (with the
xref element). At the end of the manual, the file xref.tex is written
with definitions of macros corresponding to all cross-references defined
or accessed. In addition, the file xreftbl is written to save this
information in a form that can be read to initialize the trie the next
time the manual is processed. Saving cross-reference information across
runs of MARKUP allows a manual to be processed a chapter at a time without
invalidating interchapter references. The file xreftbl should be
deleted before final processing, however, to verify that no cross-references
remain to an id that existed at one time and was deleted. Such an id could
remain in the cross-reference table indefinitely.
*/
id = ID ;
indexchar(m_textchar) ;
xrefexpand(id) ;