Automatically remove trailing whitespace
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
/*
|
||||
* A minimalistic constraint widget
|
||||
*
|
||||
* Sun Sep 12 20:03:49 GMT 1993 Gustaf Neumann
|
||||
* Sun Sep 12 20:03:49 GMT 1993 Gustaf Neumann
|
||||
*/
|
||||
#include "../config.h"
|
||||
#ifndef MOTIF
|
||||
@@ -70,7 +70,7 @@ DrawingAreaClassRec drawingAreaClassRec = {
|
||||
{ /* constraint_class fields */
|
||||
/* subresourses */ NULL,
|
||||
/* subresource_count */ 0,
|
||||
/* constraint_size */ 0,
|
||||
/* constraint_size */ 0,
|
||||
/* initialize */ NULL, /*ConstraintInitialize,*/
|
||||
/* destroy */ NULL,
|
||||
/* set_values */ NULL, /*ConstraintSetValues,*/
|
||||
@@ -157,9 +157,9 @@ static Boolean ConstraintSetValues(current, request, new, args, num_args)
|
||||
Cardinal *num_args;
|
||||
{
|
||||
/*
|
||||
register DrawingAreaConstraints cfc =
|
||||
register DrawingAreaConstraints cfc =
|
||||
(DrawingAreaConstraints) current->core.constraints;
|
||||
register DrawingAreaConstraints nfc =
|
||||
register DrawingAreaConstraints nfc =
|
||||
(DrawingAreaConstraints) new->core.constraints;
|
||||
*/
|
||||
return( FALSE );
|
||||
@@ -184,7 +184,7 @@ static XtGeometryResult PreferredGeometry( widget, request, reply )
|
||||
{
|
||||
/*
|
||||
DrawingAreaWidget w = (DrawingAreaWidget)widget;
|
||||
*/
|
||||
*/
|
||||
return XtGeometryNo;
|
||||
}
|
||||
|
||||
|
@@ -31,5 +31,5 @@ typedef struct _DrawingAreaClassRec *DrawingAreaWidgetClass;
|
||||
typedef struct _DrawingAreaRec *DrawingAreaWidget;
|
||||
|
||||
extern WidgetClass drawingAreaWidgetClass;
|
||||
|
||||
|
||||
#endif /* _XawDrawingArea_h */
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* Purpose: to parse Hypertext widget contents into appropriate PostScript
|
||||
*
|
||||
* Author: Ameet A. Raval & Frans van Hoesel & Andrew Ford
|
||||
* (aar@gfdl.gov & hoesel@chem.rug.nl).
|
||||
* (aar@gfdl.gov & hoesel@chem.rug.nl).
|
||||
* send bugreports to hoesel@chem.rug.nl
|
||||
*
|
||||
* Institution: for Ameet A. Raval:
|
||||
@@ -24,7 +24,7 @@
|
||||
* Montpelier, Bristol, BS6 5HR, GB
|
||||
* E-mail: andrew@icarus.demon.co.uk
|
||||
*
|
||||
* Date: 1 aug 1993
|
||||
* Date: 1 aug 1993
|
||||
* Modification: 8 nov 1993
|
||||
* o added support for bold/italics courier
|
||||
* o removed unused or no longer needed stuff
|
||||
@@ -49,8 +49,8 @@
|
||||
* WE MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
|
||||
* ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
|
||||
* WARRANTY. WE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE
|
||||
* USERS OF THIS SOFTWARE.
|
||||
*
|
||||
* USERS OF THIS SOFTWARE.
|
||||
*
|
||||
* pieces of code are taken from xvps by kind
|
||||
* permission of John Bradley.
|
||||
*
|
||||
@@ -121,7 +121,7 @@ extern int SwapElements();
|
||||
PSprintf("%s\n", txt[i]) ; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/* STREQ tests whether two strings are equal. */
|
||||
#define STREQ(a, b) (strcmp((a), (b)) == 0)
|
||||
|
||||
@@ -165,7 +165,7 @@ PAGE_DIMENS_T;
|
||||
PAGE_DIMENS_T page_dimens;
|
||||
PAGE_DIMENS_T a4_page_dimens = {
|
||||
297 * MM,
|
||||
210 * MM,
|
||||
210 * MM,
|
||||
20 * MM,
|
||||
20 * MM,
|
||||
20 * MM,
|
||||
@@ -201,7 +201,7 @@ extern Colormap installed_cmap;
|
||||
* screen
|
||||
*
|
||||
*/
|
||||
static float
|
||||
static float
|
||||
GetDpi(HTMLWidget hw)
|
||||
{
|
||||
Screen *s = XtScreen(hw);
|
||||
@@ -228,17 +228,17 @@ GetDpi(HTMLWidget hw)
|
||||
* in this call, otherwise it returns EOF (just as printf does)
|
||||
*
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
PSprintf(char *format, ...)
|
||||
{
|
||||
int len;
|
||||
char *s;
|
||||
va_list args;
|
||||
|
||||
if (PS_size - PS_len < 1024)
|
||||
if (PS_size - PS_len < 1024)
|
||||
{
|
||||
PS_size += 1024;
|
||||
if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
|
||||
if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -254,7 +254,7 @@ PSprintf(char *format, ...)
|
||||
/* this is a hack to make it work on systems were vsprintf(s,...)
|
||||
* returns s, instead of the len.
|
||||
*/
|
||||
if (len != EOF && len != 0)
|
||||
if (len != EOF && len != 0)
|
||||
PS_len += strlen(PS_string+PS_len);
|
||||
va_end(args);
|
||||
return(len);
|
||||
@@ -270,13 +270,13 @@ PSprintf(char *format, ...)
|
||||
* PSprintf).
|
||||
*
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
PShex(unsigned char val, int flush)
|
||||
{
|
||||
static unsigned char hexline[80];
|
||||
static char digit[] = "0123456789abcdef";
|
||||
|
||||
if (!flush)
|
||||
if (!flush)
|
||||
{
|
||||
hexline[PS_hexi++] = (char) digit[((unsigned) val >>
|
||||
(unsigned) 4) & (unsigned) 0x0f];
|
||||
@@ -287,7 +287,7 @@ PShex(unsigned char val, int flush)
|
||||
/* Changed from ">78" to ">77" on advice of
|
||||
debra@info.win.tue.nl (Paul De Bra). */
|
||||
|
||||
if ((flush && PS_hexi) || (PS_hexi>77))
|
||||
if ((flush && PS_hexi) || (PS_hexi>77))
|
||||
{
|
||||
hexline[PS_hexi] = '\0';
|
||||
PS_hexi=0;
|
||||
@@ -306,13 +306,13 @@ PShex(unsigned char val, int flush)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
{
|
||||
PS_fontstyle fn;
|
||||
int style, size;
|
||||
int fs;
|
||||
|
||||
static PS_fontstyle fontstyle[17] =
|
||||
static PS_fontstyle fontstyle[17] =
|
||||
{
|
||||
RF, IF, BF, FF, BF, BF, BF, BF, BF,
|
||||
BF, IF, FF, FF, FB, FI, FB, FI
|
||||
@@ -323,7 +323,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
/* fontsizes as set in gui.c and in HTML.c (listing font is only
|
||||
* defined in HTML.c)
|
||||
*/
|
||||
static int fontsizes[4][3][17] =
|
||||
static int fontsizes[4][3][17] =
|
||||
{
|
||||
/* times font sizes */
|
||||
{
|
||||
@@ -351,7 +351,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
}
|
||||
};
|
||||
|
||||
/* next is for each fontfamily the ascent value as given by the
|
||||
/* next is for each fontfamily the ascent value as given by the
|
||||
* medium sized bold x-font (the regular font has the same
|
||||
* ascent value for both the medium and the large size Century
|
||||
* font).
|
||||
@@ -446,12 +446,12 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
|
||||
/* check size, by looking at the size of the regular font */
|
||||
size = 1;
|
||||
if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
|
||||
if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
|
||||
{
|
||||
/* large font */
|
||||
size = 2;
|
||||
}
|
||||
else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
|
||||
else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
|
||||
{
|
||||
/* small font */
|
||||
size = 0;
|
||||
@@ -460,7 +460,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
fs = fontsizes[fontfamily][size][style];
|
||||
PS_fontascent = fontascent[fontfamily][size][style];
|
||||
|
||||
if (fn != PS_oldfn || fs != PS_oldfs)
|
||||
if (fn != PS_oldfn || fs != PS_oldfs)
|
||||
{
|
||||
PSprintf( "%2s %d SF\n", fnchar[fn], fs);
|
||||
PS_oldfn=fn, PS_oldfs=fs;
|
||||
@@ -475,26 +475,26 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
* Any accumulated footnotes are output and the outstanding footnote count
|
||||
* reset to zero. Footnotes are preceded by a footnote rule and each footnote
|
||||
* is consists of a raised mark and the footnote text (i.e. the url). The mark
|
||||
* is in a smaller font than the text. The ideas are filched from LaTeX.
|
||||
* is in a smaller font than the text. The ideas are filched from LaTeX.
|
||||
*/
|
||||
static void
|
||||
PSshowpage(void)
|
||||
{
|
||||
PSprintf("restore\n");
|
||||
if (n_saved_ftns > 0)
|
||||
if (n_saved_ftns > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
|
||||
PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
|
||||
page_dimens.left_margin,
|
||||
(page_dimens.bot_margin + (footnote_ptsize * n_saved_ftns) + 4),
|
||||
(page_dimens.text_width * 0.4));
|
||||
for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
|
||||
for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
|
||||
{
|
||||
PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
|
||||
PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
|
||||
page_dimens.left_margin,
|
||||
page_dimens.bot_margin + 5 + (n_saved_ftns - 1) * footnote_ptsize,
|
||||
(0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
|
||||
(0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
|
||||
footnote_ptsize, footnotes[i]);
|
||||
}
|
||||
PSprintf("grestore\n");
|
||||
@@ -512,10 +512,10 @@ PSshowpage(void)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSnewpage(void)
|
||||
PSnewpage(void)
|
||||
{
|
||||
PS_curr_page++;
|
||||
|
||||
|
||||
/* the PostScript reference Manual states that the Page: Tag
|
||||
should have a label and a ordinal; otherwise programs like
|
||||
psutils fail -gustaf */
|
||||
@@ -534,7 +534,7 @@ PSnewpage(void)
|
||||
* PSinit_latin1 - handle ISO encoding
|
||||
*
|
||||
* print out initializing PostScript text for ISO Latin1 font encoding
|
||||
* This code is copied from the Idraw program (from Stanford's InterViews
|
||||
* This code is copied from the Idraw program (from Stanford's InterViews
|
||||
* package), courtesy of Steinar Kjaernsr|d, steinar@ifi.uio.no
|
||||
*
|
||||
*/
|
||||
@@ -595,7 +595,7 @@ PSinit_latin1(void)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSinit(void)
|
||||
PSinit(void)
|
||||
{
|
||||
PS_size = PS_len = PS_offset = PS_hexi = PS_page_offset = 0;
|
||||
PS_start_y = 0;
|
||||
@@ -637,8 +637,8 @@ PSinit(void)
|
||||
* title title of document
|
||||
* date date modified/printed
|
||||
*/
|
||||
static void
|
||||
PSheader(char *title, int font, char *url, char *time_str)
|
||||
static void
|
||||
PSheader(char *title, int font, char *url, char *time_str)
|
||||
{
|
||||
static char *notitle="Untitled";
|
||||
int set_to_null=0;
|
||||
@@ -680,7 +680,7 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
time_t clock = time(NULL);
|
||||
|
||||
#if !defined(VMS) || defined (__DECC)
|
||||
strftime(time_buf, sizeof(time_buf),
|
||||
strftime(time_buf, sizeof(time_buf),
|
||||
"Printed %a %b %e %T %Y", localtime(&clock));
|
||||
#else
|
||||
sprintf(time_buf,"Printed %s",asctime(localtime(&clock)));
|
||||
@@ -732,16 +732,16 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
PSprintf("/title (%s) D\n", title);
|
||||
PSprintf("/date (%s) D\n", time_str);
|
||||
PSconst_out(txt);
|
||||
|
||||
|
||||
/* Output the newpage definition. */
|
||||
|
||||
|
||||
PSprintf("/NP {");
|
||||
if (HTML_Print_Headers)
|
||||
if (HTML_Print_Headers)
|
||||
{
|
||||
PSprintf("gsave 0.4 setlinewidth\n");
|
||||
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
|
||||
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
|
||||
page_dimens.left_margin,
|
||||
(page_dimens.bot_margin + page_dimens.text_height),
|
||||
(page_dimens.bot_margin + page_dimens.text_height),
|
||||
page_dimens.text_width);
|
||||
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke\n",
|
||||
page_dimens.left_margin, page_dimens.bot_margin,
|
||||
@@ -751,7 +751,7 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
(page_dimens.bot_margin + page_dimens.text_height + 6), title);
|
||||
PSprintf(" nstr cvs dup stringwidth pop pgno stringwidth pop add\n");
|
||||
PSprintf(" %.2f E sub %.2f M pgno S S\n",
|
||||
(page_dimens.left_margin + page_dimens.text_width),
|
||||
(page_dimens.left_margin + page_dimens.text_width),
|
||||
(page_dimens.bot_margin + page_dimens.text_height + 6));
|
||||
PSprintf(" BF 10 SF %.2f %.2f M (%s) S\n",
|
||||
page_dimens.left_margin, page_dimens.bot_margin - 12, url);
|
||||
@@ -760,11 +760,11 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
page_dimens.bot_margin - 12);
|
||||
}
|
||||
PSprintf(" %.2f %.2f translate %.5f %.5f scale } D\n",
|
||||
page_dimens.left_margin,
|
||||
page_dimens.left_margin,
|
||||
page_dimens.bot_margin + page_dimens.text_height,
|
||||
Points_Pixel, Points_Pixel);
|
||||
PSinit_latin1();
|
||||
|
||||
|
||||
PSprintf("%%%%EndProlog\n");
|
||||
|
||||
if (set_to_null) {
|
||||
@@ -802,9 +802,9 @@ PStrailer(void)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSmoveto(int x, int y)
|
||||
PSmoveto(int x, int y)
|
||||
{
|
||||
if (y > PS_start_y + Pixels_Page)
|
||||
if (y > PS_start_y + Pixels_Page)
|
||||
{
|
||||
PS_start_y = y;
|
||||
PSshowpage();
|
||||
@@ -824,7 +824,7 @@ PSmoveto(int x, int y)
|
||||
static void
|
||||
PSmove_offset(int offset)
|
||||
{
|
||||
if (offset != PS_offset)
|
||||
if (offset != PS_offset)
|
||||
{
|
||||
PSprintf("0 %d R\n", PS_offset - offset );
|
||||
PS_offset = offset;
|
||||
@@ -836,12 +836,12 @@ PSmove_offset(int offset)
|
||||
* Return an indication of whether or not the current element has a footnote.
|
||||
*
|
||||
* an element has a footnote if it is text or an image and its anchorHRef is not null.
|
||||
* If the element is a textual element with an anchorHRef, that has been split across
|
||||
* If the element is a textual element with an anchorHRef, that has been split across
|
||||
* lines then it should be followed by a linefeed element and a text element with the
|
||||
* same anchorHRef. In this case say that the element doesn't have a footnote so as
|
||||
* to avoid duplicate footnotes.
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
has_footnote(struct ele_rec *el)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -904,10 +904,10 @@ has_footnote(struct ele_rec *el)
|
||||
static void
|
||||
PSfootnote(char *href, double height)
|
||||
{
|
||||
PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
|
||||
PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
|
||||
height, footnote_ptsize, cur_ftn_no++);
|
||||
|
||||
if (n_saved_ftns == ftn_array_size)
|
||||
if (n_saved_ftns == ftn_array_size)
|
||||
{
|
||||
ftn_array_size += 16;
|
||||
if (!footnotes) {
|
||||
@@ -917,7 +917,7 @@ PSfootnote(char *href, double height)
|
||||
footnotes = (char **)realloc((void *)footnotes,
|
||||
(ftn_array_size * sizeof(char *)));
|
||||
}
|
||||
if (footnotes == NULL)
|
||||
if (footnotes == NULL)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -948,9 +948,9 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
unsigned char ch;
|
||||
int underline = eptr->underline_number;
|
||||
int ascent;
|
||||
|
||||
|
||||
PSfont(hw, eptr->font, fontfamily); /* set font */
|
||||
if (PS_fontascent == 0)
|
||||
if (PS_fontascent == 0)
|
||||
ascent = eptr->font->ascent;
|
||||
else
|
||||
ascent = PS_fontascent;
|
||||
@@ -961,7 +961,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
every character stored as an octal escape (worst case scenario). */
|
||||
|
||||
s2 = (String) malloc(strlen(s) * 4 + 1);
|
||||
if (s2 == NULL)
|
||||
if (s2 == NULL)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -982,14 +982,14 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
*stmp++ = B_SLASH;
|
||||
*stmp++ = ch;
|
||||
}
|
||||
else if (ch > (unsigned char) MAX_ASCII)
|
||||
else if (ch > (unsigned char) MAX_ASCII)
|
||||
{
|
||||
/* convert to octal */
|
||||
*stmp++ = B_SLASH;
|
||||
*stmp++ = ((ch >> 6) & 007) + '0';
|
||||
*stmp++ = ((ch >> 3) & 007) + '0';
|
||||
*stmp++ = (ch & 007) + '0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*stmp++ = ch;
|
||||
@@ -997,7 +997,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
}
|
||||
*(stmp) = '\0';
|
||||
PSprintf("(%s)%c\n", s2, (underline)?'U':'S');
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
{
|
||||
PSfootnote(eptr->anchorHRef, 0.7 * ascent);
|
||||
}
|
||||
@@ -1012,10 +1012,10 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
* of two. The size of the higher level bullets is just somewhat smaller
|
||||
*
|
||||
*/
|
||||
static void
|
||||
static void
|
||||
PSbullet(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
{
|
||||
int width = ( eptr->font->max_bounds.lbearing
|
||||
int width = ( eptr->font->max_bounds.lbearing
|
||||
+ eptr->font->max_bounds.rbearing);
|
||||
int offset = eptr->y_offset + eptr->font->ascent;
|
||||
int level = eptr->indent_level;
|
||||
@@ -1123,7 +1123,7 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
* does the run-length encoding. This is done to reduce the file size and
|
||||
* therefore the time to send the file to the printer. You get longer
|
||||
* processing time instead.
|
||||
*
|
||||
*
|
||||
* rle is encoded as such:
|
||||
* <count> <value> # 'run' of count+1 equal pixels
|
||||
* <count | 0x80> <count+1 data bytes> # count+1 non-equal pixels
|
||||
@@ -1131,18 +1131,18 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
*
|
||||
* returns length of the rleline vector
|
||||
*
|
||||
*/
|
||||
*/
|
||||
static int
|
||||
PSrle_encode(unsigned char *scanline,
|
||||
PSrle_encode(unsigned char *scanline,
|
||||
unsigned char *rleline,
|
||||
int wide)
|
||||
int wide)
|
||||
{
|
||||
int i, j, blocklen, isrun, rlen;
|
||||
unsigned char block[256], pix;
|
||||
|
||||
blocklen = isrun = rlen = 0;
|
||||
|
||||
for (i = 0; i < wide; i++)
|
||||
for (i = 0; i < wide; i++)
|
||||
{
|
||||
/* there are 5 possible states:
|
||||
* 0: block empty.
|
||||
@@ -1154,23 +1154,23 @@ PSrle_encode(unsigned char *scanline,
|
||||
|
||||
pix = scanline[i];
|
||||
|
||||
if (!blocklen)
|
||||
if (!blocklen)
|
||||
{
|
||||
/* case 0: empty */
|
||||
block[blocklen++] = pix;
|
||||
isrun = 1;
|
||||
}
|
||||
else if (isrun)
|
||||
else if (isrun)
|
||||
{
|
||||
if (pix == block[blocklen-1])
|
||||
{
|
||||
{
|
||||
/* case 1: isrun, prev==cur */
|
||||
block[blocklen++] = pix;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* case 2: isrun, prev!=cur */
|
||||
if (blocklen>1)
|
||||
if (blocklen>1)
|
||||
{
|
||||
/* we have a run block to flush */
|
||||
rleline[rlen++] = blocklen-1;
|
||||
@@ -1188,12 +1188,12 @@ PSrle_encode(unsigned char *scanline,
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
/* not a run */
|
||||
if (pix == block[blocklen-1])
|
||||
if (pix == block[blocklen-1])
|
||||
{
|
||||
/* case 3: non-run, prev==cur */
|
||||
if (blocklen>1)
|
||||
if (blocklen>1)
|
||||
{
|
||||
/* have a non-run block to flush */
|
||||
rleline[rlen++] = (blocklen-1) | 0x80;
|
||||
@@ -1202,7 +1202,7 @@ PSrle_encode(unsigned char *scanline,
|
||||
/* start new run block with pix */
|
||||
block[0] = pix;
|
||||
blocklen = isrun = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* blocklen<=1 turn into a run */
|
||||
@@ -1210,17 +1210,17 @@ PSrle_encode(unsigned char *scanline,
|
||||
block[blocklen++] = pix;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* case 4: non-run, prev!=cur */
|
||||
block[blocklen++] = pix;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* max block length. flush */
|
||||
if (blocklen == 128)
|
||||
{
|
||||
if (isrun)
|
||||
if (isrun)
|
||||
{
|
||||
rleline[rlen++] = blocklen-1;
|
||||
rleline[rlen++] = block[0];
|
||||
@@ -1256,7 +1256,7 @@ PSrle_encode(unsigned char *scanline,
|
||||
|
||||
|
||||
/*
|
||||
* PScolor_image - created postscript colorimage operator
|
||||
* PScolor_image - created postscript colorimage operator
|
||||
*
|
||||
* spits out code that checks if the PostScript device in question
|
||||
* knows about the 'colorimage' operator. If it doesn't, it defines
|
||||
@@ -1265,8 +1265,8 @@ PSrle_encode(unsigned char *scanline,
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
PScolor_image(void)
|
||||
static void
|
||||
PScolor_image(void)
|
||||
{
|
||||
static char *txt[] = {
|
||||
|
||||
@@ -1316,21 +1316,21 @@ PScolor_image(void)
|
||||
|
||||
PSconst_out(txt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* PScolormap - write colormap
|
||||
*
|
||||
* spits out code for the colormap of the following image
|
||||
* if !color, it spits out a mono-ized graymap
|
||||
*
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PScolormap(int color,
|
||||
int nc,
|
||||
int *rmap,
|
||||
int *gmap,
|
||||
int *bmap)
|
||||
PScolormap(int color,
|
||||
int nc,
|
||||
int *rmap,
|
||||
int *gmap,
|
||||
int *bmap)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1340,12 +1340,12 @@ PScolormap(int color,
|
||||
/* load up the colormap */
|
||||
PSprintf("currentfile cmap readhexstring\n");
|
||||
|
||||
for (i=0; i<nc; i++)
|
||||
for (i=0; i<nc; i++)
|
||||
{
|
||||
if (color)
|
||||
if (color)
|
||||
PSprintf("%02x%02x%02x ", rmap[i]>>8,
|
||||
gmap[i]>>8, bmap[i]>>8);
|
||||
else
|
||||
else
|
||||
PSprintf("%02x ", MONO(rmap[i], gmap[i], bmap[i]));
|
||||
if ((i%10) == 9)
|
||||
PSprintf("\n");
|
||||
@@ -1357,10 +1357,10 @@ PScolormap(int color,
|
||||
|
||||
/*
|
||||
* PSrle_cmapimage - define rlecmapimage operator
|
||||
*
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSrle_cmapimage(int color)
|
||||
PSrle_cmapimage(int color)
|
||||
{
|
||||
|
||||
static char *txt[] = {
|
||||
@@ -1413,11 +1413,11 @@ PSrle_cmapimage(int color)
|
||||
};
|
||||
|
||||
PSconst_out(txt);
|
||||
if (color)
|
||||
if (color)
|
||||
{
|
||||
PSconst_out(txt_color);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
PSconst_out(txt_gray);
|
||||
}
|
||||
@@ -1439,14 +1439,14 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
|
||||
int i, j;
|
||||
int err=0;
|
||||
unsigned char outbyte, bitnum, bit;
|
||||
|
||||
|
||||
outbyte = bitnum = 0;
|
||||
for (i=0; i<h && err != EOF; i++) {
|
||||
for (j=0; j<w && err != EOF; j++) {
|
||||
bit = *(pic++);
|
||||
outbyte = (outbyte<<1) | ((bit)&0x01);
|
||||
bitnum++;
|
||||
|
||||
|
||||
if (bitnum==8) {
|
||||
if (flipbw)
|
||||
outbyte = ~outbyte & 0xff;
|
||||
@@ -1463,7 +1463,7 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
|
||||
}
|
||||
}
|
||||
err=PShex('\0', True); /* Flush the hex buffer if needed */
|
||||
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1475,15 +1475,15 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
|
||||
* rectangle is shown.
|
||||
* If anchor is set, a black border is shown around the image.
|
||||
* Positioning is not exactly that of Xmosaic's screen, but close enough.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
{
|
||||
ImageInfo *img = eptr->pic_data;
|
||||
unsigned char *imgp = img->image_data;
|
||||
int anchor = (eptr->anchorHRef != NULL);
|
||||
int anchor = (eptr->anchorHRef != NULL);
|
||||
int ncolors = img->num_colors;
|
||||
int i, j;
|
||||
int w = img->width;
|
||||
@@ -1504,7 +1504,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
|
||||
|
||||
PSmove_offset(eptr->y_offset);
|
||||
if (anchor)
|
||||
if (anchor)
|
||||
{
|
||||
/* draw an outline by drawing a slightly larger black square
|
||||
* below the actual image
|
||||
@@ -1515,8 +1515,8 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
PSprintf("grestore\n");
|
||||
extra = 4;
|
||||
}
|
||||
|
||||
if (imgp == NULL)
|
||||
|
||||
if (imgp == NULL)
|
||||
{
|
||||
/* image was not available... do something instead
|
||||
* draw an empty square for example
|
||||
@@ -1534,20 +1534,20 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
return;
|
||||
}
|
||||
|
||||
/* this is a hack to see if the image is Black & White,
|
||||
/* this is a hack to see if the image is Black & White,
|
||||
* Greyscale or 8 bit color
|
||||
* assume it's bw if it has only one or two colors, both some grey's
|
||||
* assume it's greyscale if all the colors (>2) are grey
|
||||
* Images with only one color do occur too.
|
||||
*/
|
||||
|
||||
if ( ( (ncolors == 2)
|
||||
|
||||
if ( ( (ncolors == 2)
|
||||
&& ( (Isgray(img,0) && Isgray(img,1))
|
||||
|| (Is_bg(img,0) && Is_fg(img,1))
|
||||
|| (Is_bg(img,0) && Is_fg(img,1))
|
||||
|| (Is_fg(img,0) && Is_bg(img,1)) ))
|
||||
|| ( (ncolors == 1)
|
||||
&& (Isgray(img,0)
|
||||
|| Is_bg(img,0)
|
||||
|| Is_bg(img,0)
|
||||
|| Is_fg(img,0))))
|
||||
{
|
||||
colortype = F_BWDITHER;
|
||||
@@ -1569,13 +1569,13 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* build a temporary dictionary */
|
||||
PSprintf("20 dict begin\n\n");
|
||||
|
||||
/* define string to hold a scanline's worth of data */
|
||||
PSprintf("/pix %d string def\n\n", slen);
|
||||
|
||||
|
||||
/* position and scaling */
|
||||
PSprintf("gsave currentpoint %d sub translate", h);
|
||||
if (anchor)
|
||||
@@ -1583,45 +1583,45 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
else
|
||||
PSprintf(" 0 2 translate");
|
||||
PSprintf(" %d %d scale\n", w, h);
|
||||
|
||||
if (colortype == F_BWDITHER)
|
||||
|
||||
if (colortype == F_BWDITHER)
|
||||
{
|
||||
/* 1-bit dither code uses 'image' */
|
||||
int flipbw = 0;
|
||||
|
||||
|
||||
/* set if color#0 is 'white' */
|
||||
if ((ncolors == 2 &&
|
||||
MONO(img->reds[0], img->greens[0],img->blues[0]) >
|
||||
MONO(img->reds[1], img->greens[1], img->blues[1])) ||
|
||||
(ncolors == 1 &&
|
||||
(ncolors == 1 &&
|
||||
MONO(img->reds[0], img->greens[0],img->blues[0]) >
|
||||
MONO(127, 127, 127) ))
|
||||
{
|
||||
flipbw=1;
|
||||
flipbw=1;
|
||||
}
|
||||
|
||||
|
||||
/* dimensions of data */
|
||||
PSprintf("%d %d %d\n", w, h, bits);
|
||||
|
||||
|
||||
/* mapping matrix */
|
||||
PSprintf("[%d 0 0 %d 0 %d]\n\n", w, -h, h);
|
||||
|
||||
|
||||
PSprintf("{currentfile pix readhexstring pop}\n");
|
||||
PSprintf("image\n");
|
||||
|
||||
/* write the actual image data */
|
||||
err = PSwrite_bw(imgp, w, h, flipbw);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* all other formats */
|
||||
unsigned char *rleline = (unsigned char *) NULL;
|
||||
int rlen;
|
||||
|
||||
|
||||
/* if we're using color, make sure 'colorimage' is defined */
|
||||
if (colorps)
|
||||
PScolor_image();
|
||||
|
||||
|
||||
PScolormap(colorps, ncolors, img->reds, img->greens, img->blues);
|
||||
PSrle_cmapimage(colorps);
|
||||
|
||||
@@ -1630,9 +1630,9 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
/* mapping matrix */
|
||||
PSprintf("[%d 0 0 %d 0 %d]\n", w, -h, h);
|
||||
PSprintf("rlecmapimage\n");
|
||||
|
||||
|
||||
rleline = (unsigned char *) malloc(w * 2);
|
||||
if (!rleline)
|
||||
if (!rleline)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -1643,7 +1643,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
return;
|
||||
}
|
||||
|
||||
for (i=0; i<h && err != EOF; i++)
|
||||
for (i=0; i<h && err != EOF; i++)
|
||||
{
|
||||
rlen = PSrle_encode(imgp, rleline, w);
|
||||
imgp += w;
|
||||
@@ -1653,14 +1653,14 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
}
|
||||
free(rleline);
|
||||
}
|
||||
|
||||
|
||||
/* stop using temporary dictionary */
|
||||
PSprintf("end\n");
|
||||
PSprintf("grestore\n");
|
||||
|
||||
|
||||
/* move currentpoint just right of image */
|
||||
PSprintf("%d 0 R\n", w + extra);
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
PSprintf("%d 0 R\n", w + extra);
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
{
|
||||
PSmove_offset(0);
|
||||
PSfootnote(eptr->anchorHRef, 2.0);
|
||||
@@ -1699,11 +1699,11 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
* 2: new century schoolbook
|
||||
* 3: lucida
|
||||
*/
|
||||
String ParseTextToPSString(HTMLWidget hw,
|
||||
String ParseTextToPSString(HTMLWidget hw,
|
||||
struct ele_rec *elist,
|
||||
struct ele_rec *startp,
|
||||
struct ele_rec *endp,
|
||||
int start_pos,
|
||||
int start_pos,
|
||||
int end_pos,
|
||||
int space_width,
|
||||
int lmargin,
|
||||
@@ -1720,11 +1720,11 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
struct ele_rec *end;
|
||||
struct ele_rec *last;
|
||||
struct ele_rec *tmpptr;
|
||||
unsigned long fg_pixel, bg_pixel;
|
||||
unsigned long fg_pixel, bg_pixel;
|
||||
int footnotes_this_page = 0;
|
||||
int footnotes_this_line;
|
||||
int reserved_space;
|
||||
|
||||
|
||||
if (startp == NULL)
|
||||
return(NULL);
|
||||
|
||||
@@ -1733,17 +1733,17 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
* Get the foreground and background colors so we can check later
|
||||
* for black&white documents
|
||||
*/
|
||||
XtVaGetValues (hw->html.view,
|
||||
XtVaGetValues (hw->html.view,
|
||||
#ifdef MOTIF
|
||||
XtNforeground, &fg_pixel,
|
||||
#endif
|
||||
XtNbackground, &bg_pixel,
|
||||
XtNbackground, &bg_pixel,
|
||||
NULL);
|
||||
#ifndef MOTIF
|
||||
XtVaGetValues ((Widget)hw,
|
||||
XtVaGetValues ((Widget)hw,
|
||||
XtNforeground, &fg_pixel,
|
||||
NULL);
|
||||
#endif
|
||||
#endif
|
||||
fg_color.pixel = fg_pixel;
|
||||
bg_color.pixel = bg_pixel;
|
||||
XQueryColor(XtDisplay(hw->html.view),
|
||||
@@ -1758,12 +1758,12 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
DefaultColormap(XtDisplay(hw->html.view),
|
||||
DefaultScreen(XtDisplay(hw->html.view)))),
|
||||
&bg_color);
|
||||
|
||||
|
||||
/* this piece of code is needed if the user selects a portion
|
||||
* of the document with the mouse.
|
||||
* I think it will never be used, but I left it in anyway. F.
|
||||
*/
|
||||
if (SwapElements(startp, endp, start_pos, end_pos))
|
||||
if (SwapElements(startp, endp, start_pos, end_pos))
|
||||
{
|
||||
start = endp;
|
||||
end = startp;
|
||||
@@ -1776,7 +1776,7 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
start = startp;
|
||||
end = endp;
|
||||
}
|
||||
|
||||
|
||||
/* Setup page size according to user preference. */
|
||||
|
||||
if (HTML_Print_Paper_Size_A4)
|
||||
@@ -1785,10 +1785,10 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
page_dimens = us_letter_page_dimens;
|
||||
|
||||
page_dimens.text_height = ( page_dimens.page_height
|
||||
- page_dimens.top_margin
|
||||
- page_dimens.top_margin
|
||||
- page_dimens.bot_margin);
|
||||
page_dimens.text_width = ( page_dimens.page_width
|
||||
- page_dimens.left_margin
|
||||
- page_dimens.left_margin
|
||||
- page_dimens.right_margin);
|
||||
|
||||
/* Calculate the number of Postscript points per pixel of current
|
||||
@@ -1808,10 +1808,10 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
* wide), but I guess that the hw->html.doc_width includes some
|
||||
* left and right margins, so it seems to work in practice.
|
||||
*/
|
||||
if (pagewidth > page_dimens.text_width)
|
||||
if (pagewidth > page_dimens.text_width)
|
||||
Points_Pixel = Points_Pixel * page_dimens.text_width / pagewidth;
|
||||
Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
|
||||
|
||||
Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
|
||||
|
||||
PSinit();
|
||||
PSheader(hw->html.title, fontfamily, url, time_str);
|
||||
PSnewpage();
|
||||
@@ -1819,14 +1819,14 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
last = start;
|
||||
eptr = start;
|
||||
|
||||
while ((eptr != NULL) && (eptr != end))
|
||||
while ((eptr != NULL) && (eptr != end))
|
||||
{
|
||||
/* Skip the special internal text added for multi-page
|
||||
* documents.
|
||||
*/
|
||||
if (eptr->internal == True)
|
||||
if (eptr->internal == True)
|
||||
{
|
||||
if (eptr->type == E_LINEFEED)
|
||||
if (eptr->type == E_LINEFEED)
|
||||
{
|
||||
PS_page_offset += eptr->line_height;
|
||||
}
|
||||
@@ -1835,14 +1835,14 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
}
|
||||
|
||||
/* check if this is a newline */
|
||||
if (line != eptr->line_number)
|
||||
if (line != eptr->line_number)
|
||||
{
|
||||
/* calculate max height */
|
||||
height = 0;
|
||||
footnotes_this_line = 0;
|
||||
line = eptr->line_number;
|
||||
tmpptr = eptr;
|
||||
while (tmpptr != NULL && tmpptr->line_number == line)
|
||||
while (tmpptr != NULL && tmpptr->line_number == line)
|
||||
{
|
||||
if (tmpptr->line_height > height)
|
||||
height = tmpptr->line_height;
|
||||
@@ -1856,18 +1856,18 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
xpos = 0;
|
||||
|
||||
/* check if line fits completly on page */
|
||||
|
||||
|
||||
reserved_space = 0;
|
||||
if (footnotes_this_page || footnotes_this_line)
|
||||
if (footnotes_this_page || footnotes_this_line)
|
||||
{
|
||||
reserved_space = ( ( footnote_space
|
||||
+ ( footnote_ptsize
|
||||
* ( footnotes_this_page
|
||||
* ( footnotes_this_page
|
||||
+ footnotes_this_line)))
|
||||
/ Points_Pixel);
|
||||
}
|
||||
|
||||
if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
|
||||
if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
|
||||
{
|
||||
PS_start_y = ypos;
|
||||
PSshowpage();
|
||||
@@ -1877,24 +1877,24 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
footnotes_this_page += footnotes_this_line;
|
||||
PSmoveto( xpos, ypos);
|
||||
}
|
||||
|
||||
|
||||
switch (eptr->type)
|
||||
|
||||
switch (eptr->type)
|
||||
{
|
||||
case E_TEXT:
|
||||
PStext(hw, eptr, fontfamily,
|
||||
(String)((eptr == start) ? (eptr->edata + start_pos) : eptr->edata));
|
||||
break;
|
||||
|
||||
case E_BULLET:
|
||||
case E_BULLET:
|
||||
PSbullet(hw, eptr, fontfamily);
|
||||
break;
|
||||
|
||||
case E_IMAGE:
|
||||
case E_IMAGE:
|
||||
PSimage(hw, eptr, fontfamily);
|
||||
break;
|
||||
|
||||
case E_LINEFEED:
|
||||
case E_LINEFEED:
|
||||
break;
|
||||
|
||||
case E_HRULE:
|
||||
@@ -1913,7 +1913,7 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
last = eptr;
|
||||
eptr = eptr->next;
|
||||
}
|
||||
|
||||
|
||||
PSshowpage();
|
||||
PStrailer();
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* Purpose: to parse Hypertext widget contents into appropriate PostScript
|
||||
*
|
||||
* Author: Ameet A. Raval & Frans van Hoesel & Andrew Ford
|
||||
* (aar@gfdl.gov & hoesel@chem.rug.nl).
|
||||
* (aar@gfdl.gov & hoesel@chem.rug.nl).
|
||||
* send bugreports to hoesel@chem.rug.nl
|
||||
*
|
||||
* Institution: for Ameet A. Raval:
|
||||
@@ -24,7 +24,7 @@
|
||||
* Montpelier, Bristol, BS6 5HR, GB
|
||||
* E-mail: andrew@icarus.demon.co.uk
|
||||
*
|
||||
* Date: 1 aug 1993
|
||||
* Date: 1 aug 1993
|
||||
* Modification: 8 nov 1993
|
||||
* o added support for bold/italics courier
|
||||
* o removed unused or no longer needed stuff
|
||||
@@ -49,8 +49,8 @@
|
||||
* WE MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
|
||||
* ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
|
||||
* WARRANTY. WE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE
|
||||
* USERS OF THIS SOFTWARE.
|
||||
*
|
||||
* USERS OF THIS SOFTWARE.
|
||||
*
|
||||
* pieces of code are taken from xvps by kind
|
||||
* permission of John Bradley.
|
||||
*
|
||||
@@ -121,7 +121,7 @@ extern int SwapElements();
|
||||
PSprintf("%s\n", txt[i]) ; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/* STREQ tests whether two strings are equal. */
|
||||
#define STREQ(a, b) (strcmp((a), (b)) == 0)
|
||||
|
||||
@@ -165,7 +165,7 @@ PAGE_DIMENS_T;
|
||||
PAGE_DIMENS_T page_dimens;
|
||||
PAGE_DIMENS_T a4_page_dimens = {
|
||||
297 * MM,
|
||||
210 * MM,
|
||||
210 * MM,
|
||||
20 * MM,
|
||||
20 * MM,
|
||||
20 * MM,
|
||||
@@ -201,7 +201,7 @@ extern Colormap installed_cmap;
|
||||
* screen
|
||||
*
|
||||
*/
|
||||
static float
|
||||
static float
|
||||
GetDpi(HTMLWidget hw)
|
||||
{
|
||||
Screen *s = XtScreen(hw);
|
||||
@@ -228,7 +228,7 @@ GetDpi(HTMLWidget hw)
|
||||
* in this call, otherwise it returns EOF (just as printf does)
|
||||
*
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
PSprintf(format, va_alist)
|
||||
char* format;
|
||||
va_dcl
|
||||
@@ -237,10 +237,10 @@ PSprintf(format, va_alist)
|
||||
char *s;
|
||||
va_list args;
|
||||
|
||||
if (PS_size - PS_len < 1024)
|
||||
if (PS_size - PS_len < 1024)
|
||||
{
|
||||
PS_size += 1024;
|
||||
if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
|
||||
if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -256,7 +256,7 @@ PSprintf(format, va_alist)
|
||||
/* this is a hack to make it work on systems were vsprintf(s,...)
|
||||
* returns s, instead of the len.
|
||||
*/
|
||||
if (len != EOF && len != 0)
|
||||
if (len != EOF && len != 0)
|
||||
PS_len += strlen(PS_string+PS_len);
|
||||
va_end(args);
|
||||
return(len);
|
||||
@@ -272,13 +272,13 @@ PSprintf(format, va_alist)
|
||||
* PSprintf).
|
||||
*
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
PShex(unsigned char val, int flush)
|
||||
{
|
||||
static unsigned char hexline[80];
|
||||
static char digit[] = "0123456789abcdef";
|
||||
|
||||
if (!flush)
|
||||
if (!flush)
|
||||
{
|
||||
hexline[PS_hexi++] = (char) digit[((unsigned) val >>
|
||||
(unsigned) 4) & (unsigned) 0x0f];
|
||||
@@ -289,7 +289,7 @@ PShex(unsigned char val, int flush)
|
||||
/* Changed from ">78" to ">77" on advice of
|
||||
debra@info.win.tue.nl (Paul De Bra). */
|
||||
|
||||
if ((flush && PS_hexi) || (PS_hexi>77))
|
||||
if ((flush && PS_hexi) || (PS_hexi>77))
|
||||
{
|
||||
hexline[PS_hexi] = '\0';
|
||||
PS_hexi=0;
|
||||
@@ -308,13 +308,13 @@ PShex(unsigned char val, int flush)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
{
|
||||
PS_fontstyle fn;
|
||||
int style, size;
|
||||
int fs;
|
||||
|
||||
static PS_fontstyle fontstyle[17] =
|
||||
static PS_fontstyle fontstyle[17] =
|
||||
{
|
||||
RF, IF, BF, FF, BF, BF, BF, BF, BF,
|
||||
BF, IF, FF, FF, FB, FI, FB, FI
|
||||
@@ -325,7 +325,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
/* fontsizes as set in gui.c and in HTML.c (listing font is only
|
||||
* defined in HTML.c)
|
||||
*/
|
||||
static int fontsizes[4][3][17] =
|
||||
static int fontsizes[4][3][17] =
|
||||
{
|
||||
/* times font sizes */
|
||||
{
|
||||
@@ -353,7 +353,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
}
|
||||
};
|
||||
|
||||
/* next is for each fontfamily the ascent value as given by the
|
||||
/* next is for each fontfamily the ascent value as given by the
|
||||
* medium sized bold x-font (the regular font has the same
|
||||
* ascent value for both the medium and the large size Century
|
||||
* font).
|
||||
@@ -448,12 +448,12 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
|
||||
/* check size, by looking at the size of the regular font */
|
||||
size = 1;
|
||||
if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
|
||||
if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
|
||||
{
|
||||
/* large font */
|
||||
size = 2;
|
||||
}
|
||||
else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
|
||||
else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
|
||||
{
|
||||
/* small font */
|
||||
size = 0;
|
||||
@@ -462,7 +462,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
fs = fontsizes[fontfamily][size][style];
|
||||
PS_fontascent = fontascent[fontfamily][size][style];
|
||||
|
||||
if (fn != PS_oldfn || fs != PS_oldfs)
|
||||
if (fn != PS_oldfn || fs != PS_oldfs)
|
||||
{
|
||||
PSprintf( "%2s %d SF\n", fnchar[fn], fs);
|
||||
PS_oldfn=fn, PS_oldfs=fs;
|
||||
@@ -477,26 +477,26 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
|
||||
* Any accumulated footnotes are output and the outstanding footnote count
|
||||
* reset to zero. Footnotes are preceded by a footnote rule and each footnote
|
||||
* is consists of a raised mark and the footnote text (i.e. the url). The mark
|
||||
* is in a smaller font than the text. The ideas are filched from LaTeX.
|
||||
* is in a smaller font than the text. The ideas are filched from LaTeX.
|
||||
*/
|
||||
static void
|
||||
PSshowpage(void)
|
||||
{
|
||||
PSprintf("restore\n");
|
||||
if (n_saved_ftns > 0)
|
||||
if (n_saved_ftns > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
|
||||
PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
|
||||
page_dimens.left_margin,
|
||||
(page_dimens.bot_margin + (footnote_ptsize * n_saved_ftns) + 4),
|
||||
(page_dimens.text_width * 0.4));
|
||||
for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
|
||||
for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
|
||||
{
|
||||
PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
|
||||
PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
|
||||
page_dimens.left_margin,
|
||||
page_dimens.bot_margin + 5 + (n_saved_ftns - 1) * footnote_ptsize,
|
||||
(0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
|
||||
(0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
|
||||
footnote_ptsize, footnotes[i]);
|
||||
}
|
||||
PSprintf("grestore\n");
|
||||
@@ -514,10 +514,10 @@ PSshowpage(void)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSnewpage(void)
|
||||
PSnewpage(void)
|
||||
{
|
||||
PS_curr_page++;
|
||||
|
||||
|
||||
/* the PostScript reference Manual states that the Page: Tag
|
||||
should have a label and a ordinal; otherwise programs like
|
||||
psutils fail -gustaf */
|
||||
@@ -536,7 +536,7 @@ PSnewpage(void)
|
||||
* PSinit_latin1 - handle ISO encoding
|
||||
*
|
||||
* print out initializing PostScript text for ISO Latin1 font encoding
|
||||
* This code is copied from the Idraw program (from Stanford's InterViews
|
||||
* This code is copied from the Idraw program (from Stanford's InterViews
|
||||
* package), courtesy of Steinar Kjaernsr|d, steinar@ifi.uio.no
|
||||
*
|
||||
*/
|
||||
@@ -597,7 +597,7 @@ PSinit_latin1(void)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSinit(void)
|
||||
PSinit(void)
|
||||
{
|
||||
PS_size = PS_len = PS_offset = PS_hexi = PS_page_offset = 0;
|
||||
PS_start_y = 0;
|
||||
@@ -639,8 +639,8 @@ PSinit(void)
|
||||
* title title of document
|
||||
* date date modified/printed
|
||||
*/
|
||||
static void
|
||||
PSheader(char *title, int font, char *url, char *time_str)
|
||||
static void
|
||||
PSheader(char *title, int font, char *url, char *time_str)
|
||||
{
|
||||
static char *notitle="Untitled";
|
||||
int set_to_null=0;
|
||||
@@ -682,7 +682,7 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
time_t clock = time(NULL);
|
||||
|
||||
#if !defined(VMS) || defined (__DECC)
|
||||
strftime(time_buf, sizeof(time_buf),
|
||||
strftime(time_buf, sizeof(time_buf),
|
||||
"Printed %a %b %e %T %Y", localtime(&clock));
|
||||
#else
|
||||
sprintf(time_buf,"Printed %s",asctime(localtime(&clock)));
|
||||
@@ -734,16 +734,16 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
PSprintf("/title (%s) D\n", title);
|
||||
PSprintf("/date (%s) D\n", time_str);
|
||||
PSconst_out(txt);
|
||||
|
||||
|
||||
/* Output the newpage definition. */
|
||||
|
||||
|
||||
PSprintf("/NP {");
|
||||
if (HTML_Print_Headers)
|
||||
if (HTML_Print_Headers)
|
||||
{
|
||||
PSprintf("gsave 0.4 setlinewidth\n");
|
||||
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
|
||||
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
|
||||
page_dimens.left_margin,
|
||||
(page_dimens.bot_margin + page_dimens.text_height),
|
||||
(page_dimens.bot_margin + page_dimens.text_height),
|
||||
page_dimens.text_width);
|
||||
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke\n",
|
||||
page_dimens.left_margin, page_dimens.bot_margin,
|
||||
@@ -753,7 +753,7 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
(page_dimens.bot_margin + page_dimens.text_height + 6), title);
|
||||
PSprintf(" nstr cvs dup stringwidth pop pgno stringwidth pop add\n");
|
||||
PSprintf(" %.2f E sub %.2f M pgno S S\n",
|
||||
(page_dimens.left_margin + page_dimens.text_width),
|
||||
(page_dimens.left_margin + page_dimens.text_width),
|
||||
(page_dimens.bot_margin + page_dimens.text_height + 6));
|
||||
PSprintf(" BF 10 SF %.2f %.2f M (%s) S\n",
|
||||
page_dimens.left_margin, page_dimens.bot_margin - 12, url);
|
||||
@@ -762,11 +762,11 @@ PSheader(char *title, int font, char *url, char *time_str)
|
||||
page_dimens.bot_margin - 12);
|
||||
}
|
||||
PSprintf(" %.2f %.2f translate %.5f %.5f scale } D\n",
|
||||
page_dimens.left_margin,
|
||||
page_dimens.left_margin,
|
||||
page_dimens.bot_margin + page_dimens.text_height,
|
||||
Points_Pixel, Points_Pixel);
|
||||
PSinit_latin1();
|
||||
|
||||
|
||||
PSprintf("%%%%EndProlog\n");
|
||||
|
||||
if (set_to_null) {
|
||||
@@ -804,9 +804,9 @@ PStrailer(void)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSmoveto(int x, int y)
|
||||
PSmoveto(int x, int y)
|
||||
{
|
||||
if (y > PS_start_y + Pixels_Page)
|
||||
if (y > PS_start_y + Pixels_Page)
|
||||
{
|
||||
PS_start_y = y;
|
||||
PSshowpage();
|
||||
@@ -826,7 +826,7 @@ PSmoveto(int x, int y)
|
||||
static void
|
||||
PSmove_offset(int offset)
|
||||
{
|
||||
if (offset != PS_offset)
|
||||
if (offset != PS_offset)
|
||||
{
|
||||
PSprintf("0 %d R\n", PS_offset - offset );
|
||||
PS_offset = offset;
|
||||
@@ -838,12 +838,12 @@ PSmove_offset(int offset)
|
||||
* Return an indication of whether or not the current element has a footnote.
|
||||
*
|
||||
* an element has a footnote if it is text or an image and its anchorHRef is not null.
|
||||
* If the element is a textual element with an anchorHRef, that has been split across
|
||||
* If the element is a textual element with an anchorHRef, that has been split across
|
||||
* lines then it should be followed by a linefeed element and a text element with the
|
||||
* same anchorHRef. In this case say that the element doesn't have a footnote so as
|
||||
* to avoid duplicate footnotes.
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
has_footnote(struct ele_rec *el)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -906,10 +906,10 @@ has_footnote(struct ele_rec *el)
|
||||
static void
|
||||
PSfootnote(char *href, double height)
|
||||
{
|
||||
PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
|
||||
PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
|
||||
height, footnote_ptsize, cur_ftn_no++);
|
||||
|
||||
if (n_saved_ftns == ftn_array_size)
|
||||
if (n_saved_ftns == ftn_array_size)
|
||||
{
|
||||
ftn_array_size += 16;
|
||||
if (!footnotes) {
|
||||
@@ -919,7 +919,7 @@ PSfootnote(char *href, double height)
|
||||
footnotes = (char **)realloc((void *)footnotes,
|
||||
(ftn_array_size * sizeof(char *)));
|
||||
}
|
||||
if (footnotes == NULL)
|
||||
if (footnotes == NULL)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -950,9 +950,9 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
unsigned char ch;
|
||||
int underline = eptr->underline_number;
|
||||
int ascent;
|
||||
|
||||
|
||||
PSfont(hw, eptr->font, fontfamily); /* set font */
|
||||
if (PS_fontascent == 0)
|
||||
if (PS_fontascent == 0)
|
||||
ascent = eptr->font->ascent;
|
||||
else
|
||||
ascent = PS_fontascent;
|
||||
@@ -963,7 +963,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
every character stored as an octal escape (worst case scenario). */
|
||||
|
||||
s2 = (String) malloc(strlen(s) * 4 + 1);
|
||||
if (s2 == NULL)
|
||||
if (s2 == NULL)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -984,14 +984,14 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
*stmp++ = B_SLASH;
|
||||
*stmp++ = ch;
|
||||
}
|
||||
else if (ch > (unsigned char) MAX_ASCII)
|
||||
else if (ch > (unsigned char) MAX_ASCII)
|
||||
{
|
||||
/* convert to octal */
|
||||
*stmp++ = B_SLASH;
|
||||
*stmp++ = ((ch >> 6) & 007) + '0';
|
||||
*stmp++ = ((ch >> 3) & 007) + '0';
|
||||
*stmp++ = (ch & 007) + '0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*stmp++ = ch;
|
||||
@@ -999,7 +999,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
}
|
||||
*(stmp) = '\0';
|
||||
PSprintf("(%s)%c\n", s2, (underline)?'U':'S');
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
{
|
||||
PSfootnote(eptr->anchorHRef, 0.7 * ascent);
|
||||
}
|
||||
@@ -1014,10 +1014,10 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
|
||||
* of two. The size of the higher level bullets is just somewhat smaller
|
||||
*
|
||||
*/
|
||||
static void
|
||||
static void
|
||||
PSbullet(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
{
|
||||
int width = ( eptr->font->max_bounds.lbearing
|
||||
int width = ( eptr->font->max_bounds.lbearing
|
||||
+ eptr->font->max_bounds.rbearing);
|
||||
int offset = eptr->y_offset + eptr->font->ascent;
|
||||
int level = eptr->indent_level;
|
||||
@@ -1125,7 +1125,7 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
* does the run-length encoding. This is done to reduce the file size and
|
||||
* therefore the time to send the file to the printer. You get longer
|
||||
* processing time instead.
|
||||
*
|
||||
*
|
||||
* rle is encoded as such:
|
||||
* <count> <value> # 'run' of count+1 equal pixels
|
||||
* <count | 0x80> <count+1 data bytes> # count+1 non-equal pixels
|
||||
@@ -1133,18 +1133,18 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
*
|
||||
* returns length of the rleline vector
|
||||
*
|
||||
*/
|
||||
*/
|
||||
static int
|
||||
PSrle_encode(unsigned char *scanline,
|
||||
PSrle_encode(unsigned char *scanline,
|
||||
unsigned char *rleline,
|
||||
int wide)
|
||||
int wide)
|
||||
{
|
||||
int i, j, blocklen, isrun, rlen;
|
||||
unsigned char block[256], pix;
|
||||
|
||||
blocklen = isrun = rlen = 0;
|
||||
|
||||
for (i = 0; i < wide; i++)
|
||||
for (i = 0; i < wide; i++)
|
||||
{
|
||||
/* there are 5 possible states:
|
||||
* 0: block empty.
|
||||
@@ -1156,23 +1156,23 @@ PSrle_encode(unsigned char *scanline,
|
||||
|
||||
pix = scanline[i];
|
||||
|
||||
if (!blocklen)
|
||||
if (!blocklen)
|
||||
{
|
||||
/* case 0: empty */
|
||||
block[blocklen++] = pix;
|
||||
isrun = 1;
|
||||
}
|
||||
else if (isrun)
|
||||
else if (isrun)
|
||||
{
|
||||
if (pix == block[blocklen-1])
|
||||
{
|
||||
{
|
||||
/* case 1: isrun, prev==cur */
|
||||
block[blocklen++] = pix;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* case 2: isrun, prev!=cur */
|
||||
if (blocklen>1)
|
||||
if (blocklen>1)
|
||||
{
|
||||
/* we have a run block to flush */
|
||||
rleline[rlen++] = blocklen-1;
|
||||
@@ -1190,12 +1190,12 @@ PSrle_encode(unsigned char *scanline,
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
/* not a run */
|
||||
if (pix == block[blocklen-1])
|
||||
if (pix == block[blocklen-1])
|
||||
{
|
||||
/* case 3: non-run, prev==cur */
|
||||
if (blocklen>1)
|
||||
if (blocklen>1)
|
||||
{
|
||||
/* have a non-run block to flush */
|
||||
rleline[rlen++] = (blocklen-1) | 0x80;
|
||||
@@ -1204,7 +1204,7 @@ PSrle_encode(unsigned char *scanline,
|
||||
/* start new run block with pix */
|
||||
block[0] = pix;
|
||||
blocklen = isrun = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* blocklen<=1 turn into a run */
|
||||
@@ -1212,17 +1212,17 @@ PSrle_encode(unsigned char *scanline,
|
||||
block[blocklen++] = pix;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* case 4: non-run, prev!=cur */
|
||||
block[blocklen++] = pix;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* max block length. flush */
|
||||
if (blocklen == 128)
|
||||
{
|
||||
if (isrun)
|
||||
if (isrun)
|
||||
{
|
||||
rleline[rlen++] = blocklen-1;
|
||||
rleline[rlen++] = block[0];
|
||||
@@ -1258,7 +1258,7 @@ PSrle_encode(unsigned char *scanline,
|
||||
|
||||
|
||||
/*
|
||||
* PScolor_image - created postscript colorimage operator
|
||||
* PScolor_image - created postscript colorimage operator
|
||||
*
|
||||
* spits out code that checks if the PostScript device in question
|
||||
* knows about the 'colorimage' operator. If it doesn't, it defines
|
||||
@@ -1267,8 +1267,8 @@ PSrle_encode(unsigned char *scanline,
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
PScolor_image(void)
|
||||
static void
|
||||
PScolor_image(void)
|
||||
{
|
||||
static char *txt[] = {
|
||||
|
||||
@@ -1318,21 +1318,21 @@ PScolor_image(void)
|
||||
|
||||
PSconst_out(txt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* PScolormap - write colormap
|
||||
*
|
||||
* spits out code for the colormap of the following image
|
||||
* if !color, it spits out a mono-ized graymap
|
||||
*
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PScolormap(int color,
|
||||
int nc,
|
||||
int *rmap,
|
||||
int *gmap,
|
||||
int *bmap)
|
||||
PScolormap(int color,
|
||||
int nc,
|
||||
int *rmap,
|
||||
int *gmap,
|
||||
int *bmap)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1342,12 +1342,12 @@ PScolormap(int color,
|
||||
/* load up the colormap */
|
||||
PSprintf("currentfile cmap readhexstring\n");
|
||||
|
||||
for (i=0; i<nc; i++)
|
||||
for (i=0; i<nc; i++)
|
||||
{
|
||||
if (color)
|
||||
if (color)
|
||||
PSprintf("%02x%02x%02x ", rmap[i]>>8,
|
||||
gmap[i]>>8, bmap[i]>>8);
|
||||
else
|
||||
else
|
||||
PSprintf("%02x ", MONO(rmap[i], gmap[i], bmap[i]));
|
||||
if ((i%10) == 9)
|
||||
PSprintf("\n");
|
||||
@@ -1359,10 +1359,10 @@ PScolormap(int color,
|
||||
|
||||
/*
|
||||
* PSrle_cmapimage - define rlecmapimage operator
|
||||
*
|
||||
*
|
||||
*/
|
||||
static void
|
||||
PSrle_cmapimage(int color)
|
||||
PSrle_cmapimage(int color)
|
||||
{
|
||||
|
||||
static char *txt[] = {
|
||||
@@ -1415,11 +1415,11 @@ PSrle_cmapimage(int color)
|
||||
};
|
||||
|
||||
PSconst_out(txt);
|
||||
if (color)
|
||||
if (color)
|
||||
{
|
||||
PSconst_out(txt_color);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
PSconst_out(txt_gray);
|
||||
}
|
||||
@@ -1441,14 +1441,14 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
|
||||
int i, j;
|
||||
int err=0;
|
||||
unsigned char outbyte, bitnum, bit;
|
||||
|
||||
|
||||
outbyte = bitnum = 0;
|
||||
for (i=0; i<h && err != EOF; i++) {
|
||||
for (j=0; j<w && err != EOF; j++) {
|
||||
bit = *(pic++);
|
||||
outbyte = (outbyte<<1) | ((bit)&0x01);
|
||||
bitnum++;
|
||||
|
||||
|
||||
if (bitnum==8) {
|
||||
if (flipbw)
|
||||
outbyte = ~outbyte & 0xff;
|
||||
@@ -1465,7 +1465,7 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
|
||||
}
|
||||
}
|
||||
err=PShex('\0', True); /* Flush the hex buffer if needed */
|
||||
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1477,15 +1477,15 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
|
||||
* rectangle is shown.
|
||||
* If anchor is set, a black border is shown around the image.
|
||||
* Positioning is not exactly that of Xmosaic's screen, but close enough.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
{
|
||||
ImageInfo *img = eptr->pic_data;
|
||||
unsigned char *imgp = img->image_data;
|
||||
int anchor = (eptr->anchorHRef != NULL);
|
||||
int anchor = (eptr->anchorHRef != NULL);
|
||||
int ncolors = img->num_colors;
|
||||
int i, j;
|
||||
int w = img->width;
|
||||
@@ -1506,7 +1506,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
|
||||
|
||||
PSmove_offset(eptr->y_offset);
|
||||
if (anchor)
|
||||
if (anchor)
|
||||
{
|
||||
/* draw an outline by drawing a slightly larger black square
|
||||
* below the actual image
|
||||
@@ -1517,8 +1517,8 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
PSprintf("grestore\n");
|
||||
extra = 4;
|
||||
}
|
||||
|
||||
if (imgp == NULL)
|
||||
|
||||
if (imgp == NULL)
|
||||
{
|
||||
/* image was not available... do something instead
|
||||
* draw an empty square for example
|
||||
@@ -1536,20 +1536,20 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
return;
|
||||
}
|
||||
|
||||
/* this is a hack to see if the image is Black & White,
|
||||
/* this is a hack to see if the image is Black & White,
|
||||
* Greyscale or 8 bit color
|
||||
* assume it's bw if it has only one or two colors, both some grey's
|
||||
* assume it's greyscale if all the colors (>2) are grey
|
||||
* Images with only one color do occur too.
|
||||
*/
|
||||
|
||||
if ( ( (ncolors == 2)
|
||||
|
||||
if ( ( (ncolors == 2)
|
||||
&& ( (Isgray(img,0) && Isgray(img,1))
|
||||
|| (Is_bg(img,0) && Is_fg(img,1))
|
||||
|| (Is_bg(img,0) && Is_fg(img,1))
|
||||
|| (Is_fg(img,0) && Is_bg(img,1)) ))
|
||||
|| ( (ncolors == 1)
|
||||
&& (Isgray(img,0)
|
||||
|| Is_bg(img,0)
|
||||
|| Is_bg(img,0)
|
||||
|| Is_fg(img,0))))
|
||||
{
|
||||
colortype = F_BWDITHER;
|
||||
@@ -1571,13 +1571,13 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* build a temporary dictionary */
|
||||
PSprintf("20 dict begin\n\n");
|
||||
|
||||
/* define string to hold a scanline's worth of data */
|
||||
PSprintf("/pix %d string def\n\n", slen);
|
||||
|
||||
|
||||
/* position and scaling */
|
||||
PSprintf("gsave currentpoint %d sub translate", h);
|
||||
if (anchor)
|
||||
@@ -1585,45 +1585,45 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
else
|
||||
PSprintf(" 0 2 translate");
|
||||
PSprintf(" %d %d scale\n", w, h);
|
||||
|
||||
if (colortype == F_BWDITHER)
|
||||
|
||||
if (colortype == F_BWDITHER)
|
||||
{
|
||||
/* 1-bit dither code uses 'image' */
|
||||
int flipbw = 0;
|
||||
|
||||
|
||||
/* set if color#0 is 'white' */
|
||||
if ((ncolors == 2 &&
|
||||
MONO(img->reds[0], img->greens[0],img->blues[0]) >
|
||||
MONO(img->reds[1], img->greens[1], img->blues[1])) ||
|
||||
(ncolors == 1 &&
|
||||
(ncolors == 1 &&
|
||||
MONO(img->reds[0], img->greens[0],img->blues[0]) >
|
||||
MONO(127, 127, 127) ))
|
||||
{
|
||||
flipbw=1;
|
||||
flipbw=1;
|
||||
}
|
||||
|
||||
|
||||
/* dimensions of data */
|
||||
PSprintf("%d %d %d\n", w, h, bits);
|
||||
|
||||
|
||||
/* mapping matrix */
|
||||
PSprintf("[%d 0 0 %d 0 %d]\n\n", w, -h, h);
|
||||
|
||||
|
||||
PSprintf("{currentfile pix readhexstring pop}\n");
|
||||
PSprintf("image\n");
|
||||
|
||||
/* write the actual image data */
|
||||
err = PSwrite_bw(imgp, w, h, flipbw);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* all other formats */
|
||||
unsigned char *rleline = (unsigned char *) NULL;
|
||||
int rlen;
|
||||
|
||||
|
||||
/* if we're using color, make sure 'colorimage' is defined */
|
||||
if (colorps)
|
||||
PScolor_image();
|
||||
|
||||
|
||||
PScolormap(colorps, ncolors, img->reds, img->greens, img->blues);
|
||||
PSrle_cmapimage(colorps);
|
||||
|
||||
@@ -1632,9 +1632,9 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
/* mapping matrix */
|
||||
PSprintf("[%d 0 0 %d 0 %d]\n", w, -h, h);
|
||||
PSprintf("rlecmapimage\n");
|
||||
|
||||
|
||||
rleline = (unsigned char *) malloc(w * 2);
|
||||
if (!rleline)
|
||||
if (!rleline)
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
@@ -1645,7 +1645,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
return;
|
||||
}
|
||||
|
||||
for (i=0; i<h && err != EOF; i++)
|
||||
for (i=0; i<h && err != EOF; i++)
|
||||
{
|
||||
rlen = PSrle_encode(imgp, rleline, w);
|
||||
imgp += w;
|
||||
@@ -1655,14 +1655,14 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
}
|
||||
free(rleline);
|
||||
}
|
||||
|
||||
|
||||
/* stop using temporary dictionary */
|
||||
PSprintf("end\n");
|
||||
PSprintf("grestore\n");
|
||||
|
||||
|
||||
/* move currentpoint just right of image */
|
||||
PSprintf("%d 0 R\n", w + extra);
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
PSprintf("%d 0 R\n", w + extra);
|
||||
if (HTML_Print_Footers && has_footnote(eptr))
|
||||
{
|
||||
PSmove_offset(0);
|
||||
PSfootnote(eptr->anchorHRef, 2.0);
|
||||
@@ -1701,11 +1701,11 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
|
||||
* 2: new century schoolbook
|
||||
* 3: lucida
|
||||
*/
|
||||
String ParseTextToPSString(HTMLWidget hw,
|
||||
String ParseTextToPSString(HTMLWidget hw,
|
||||
struct ele_rec *elist,
|
||||
struct ele_rec *startp,
|
||||
struct ele_rec *endp,
|
||||
int start_pos,
|
||||
int start_pos,
|
||||
int end_pos,
|
||||
int space_width,
|
||||
int lmargin,
|
||||
@@ -1722,11 +1722,11 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
struct ele_rec *end;
|
||||
struct ele_rec *last;
|
||||
struct ele_rec *tmpptr;
|
||||
unsigned long fg_pixel, bg_pixel;
|
||||
unsigned long fg_pixel, bg_pixel;
|
||||
int footnotes_this_page = 0;
|
||||
int footnotes_this_line;
|
||||
int reserved_space;
|
||||
|
||||
|
||||
if (startp == NULL)
|
||||
return(NULL);
|
||||
|
||||
@@ -1735,17 +1735,17 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
* Get the foreground and background colors so we can check later
|
||||
* for black&white documents
|
||||
*/
|
||||
XtVaGetValues (hw->html.view,
|
||||
XtVaGetValues (hw->html.view,
|
||||
#ifdef MOTIF
|
||||
XtNforeground, &fg_pixel,
|
||||
#endif
|
||||
XtNbackground, &bg_pixel,
|
||||
XtNbackground, &bg_pixel,
|
||||
NULL);
|
||||
#ifndef MOTIF
|
||||
XtVaGetValues ((Widget)hw,
|
||||
XtVaGetValues ((Widget)hw,
|
||||
XtNforeground, &fg_pixel,
|
||||
NULL);
|
||||
#endif
|
||||
#endif
|
||||
fg_color.pixel = fg_pixel;
|
||||
bg_color.pixel = bg_pixel;
|
||||
XQueryColor(XtDisplay(hw->html.view),
|
||||
@@ -1760,12 +1760,12 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
DefaultColormap(XtDisplay(hw->html.view),
|
||||
DefaultScreen(XtDisplay(hw->html.view)))),
|
||||
&bg_color);
|
||||
|
||||
|
||||
/* this piece of code is needed if the user selects a portion
|
||||
* of the document with the mouse.
|
||||
* I think it will never be used, but I left it in anyway. F.
|
||||
*/
|
||||
if (SwapElements(startp, endp, start_pos, end_pos))
|
||||
if (SwapElements(startp, endp, start_pos, end_pos))
|
||||
{
|
||||
start = endp;
|
||||
end = startp;
|
||||
@@ -1778,7 +1778,7 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
start = startp;
|
||||
end = endp;
|
||||
}
|
||||
|
||||
|
||||
/* Setup page size according to user preference. */
|
||||
|
||||
if (HTML_Print_Paper_Size_A4)
|
||||
@@ -1787,10 +1787,10 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
page_dimens = us_letter_page_dimens;
|
||||
|
||||
page_dimens.text_height = ( page_dimens.page_height
|
||||
- page_dimens.top_margin
|
||||
- page_dimens.top_margin
|
||||
- page_dimens.bot_margin);
|
||||
page_dimens.text_width = ( page_dimens.page_width
|
||||
- page_dimens.left_margin
|
||||
- page_dimens.left_margin
|
||||
- page_dimens.right_margin);
|
||||
|
||||
/* Calculate the number of Postscript points per pixel of current
|
||||
@@ -1810,10 +1810,10 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
* wide), but I guess that the hw->html.doc_width includes some
|
||||
* left and right margins, so it seems to work in practice.
|
||||
*/
|
||||
if (pagewidth > page_dimens.text_width)
|
||||
if (pagewidth > page_dimens.text_width)
|
||||
Points_Pixel = Points_Pixel * page_dimens.text_width / pagewidth;
|
||||
Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
|
||||
|
||||
Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
|
||||
|
||||
PSinit();
|
||||
PSheader(hw->html.title, fontfamily, url, time_str);
|
||||
PSnewpage();
|
||||
@@ -1821,14 +1821,14 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
last = start;
|
||||
eptr = start;
|
||||
|
||||
while ((eptr != NULL) && (eptr != end))
|
||||
while ((eptr != NULL) && (eptr != end))
|
||||
{
|
||||
/* Skip the special internal text added for multi-page
|
||||
* documents.
|
||||
*/
|
||||
if (eptr->internal == True)
|
||||
if (eptr->internal == True)
|
||||
{
|
||||
if (eptr->type == E_LINEFEED)
|
||||
if (eptr->type == E_LINEFEED)
|
||||
{
|
||||
PS_page_offset += eptr->line_height;
|
||||
}
|
||||
@@ -1837,14 +1837,14 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
}
|
||||
|
||||
/* check if this is a newline */
|
||||
if (line != eptr->line_number)
|
||||
if (line != eptr->line_number)
|
||||
{
|
||||
/* calculate max height */
|
||||
height = 0;
|
||||
footnotes_this_line = 0;
|
||||
line = eptr->line_number;
|
||||
tmpptr = eptr;
|
||||
while (tmpptr != NULL && tmpptr->line_number == line)
|
||||
while (tmpptr != NULL && tmpptr->line_number == line)
|
||||
{
|
||||
if (tmpptr->line_height > height)
|
||||
height = tmpptr->line_height;
|
||||
@@ -1858,18 +1858,18 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
xpos = 0;
|
||||
|
||||
/* check if line fits completly on page */
|
||||
|
||||
|
||||
reserved_space = 0;
|
||||
if (footnotes_this_page || footnotes_this_line)
|
||||
if (footnotes_this_page || footnotes_this_line)
|
||||
{
|
||||
reserved_space = ( ( footnote_space
|
||||
+ ( footnote_ptsize
|
||||
* ( footnotes_this_page
|
||||
* ( footnotes_this_page
|
||||
+ footnotes_this_line)))
|
||||
/ Points_Pixel);
|
||||
}
|
||||
|
||||
if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
|
||||
if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
|
||||
{
|
||||
PS_start_y = ypos;
|
||||
PSshowpage();
|
||||
@@ -1879,24 +1879,24 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
footnotes_this_page += footnotes_this_line;
|
||||
PSmoveto( xpos, ypos);
|
||||
}
|
||||
|
||||
|
||||
switch (eptr->type)
|
||||
|
||||
switch (eptr->type)
|
||||
{
|
||||
case E_TEXT:
|
||||
PStext(hw, eptr, fontfamily,
|
||||
(String)((eptr == start) ? (eptr->edata + start_pos) : eptr->edata));
|
||||
break;
|
||||
|
||||
case E_BULLET:
|
||||
case E_BULLET:
|
||||
PSbullet(hw, eptr, fontfamily);
|
||||
break;
|
||||
|
||||
case E_IMAGE:
|
||||
case E_IMAGE:
|
||||
PSimage(hw, eptr, fontfamily);
|
||||
break;
|
||||
|
||||
case E_LINEFEED:
|
||||
case E_LINEFEED:
|
||||
break;
|
||||
|
||||
case E_HRULE:
|
||||
@@ -1915,7 +1915,7 @@ String ParseTextToPSString(HTMLWidget hw,
|
||||
last = eptr;
|
||||
eptr = eptr->next;
|
||||
}
|
||||
|
||||
|
||||
PSshowpage();
|
||||
PStrailer();
|
||||
|
||||
|
212
libhtmlw/HTML.c
212
libhtmlw/HTML.c
@@ -337,7 +337,7 @@ static XtResource resources[] =
|
||||
{ WbNtitleText,
|
||||
WbCTitleText, XtRString, sizeof (char *),
|
||||
XtOffset (HTMLWidget, html.title),
|
||||
XtRString, (char *) NULL
|
||||
XtRString, (char *) NULL
|
||||
},
|
||||
|
||||
/*
|
||||
@@ -593,21 +593,21 @@ static XtResource resources[] =
|
||||
},
|
||||
/* end amb */
|
||||
{ WbNpreviouslyVisitedTestFunction,
|
||||
WbCPreviouslyVisitedTestFunction, XtRPointer,
|
||||
WbCPreviouslyVisitedTestFunction, XtRPointer,
|
||||
sizeof (XtPointer),
|
||||
XtOffset (HTMLWidget, html.previously_visited_test),
|
||||
XtRImmediate, (caddr_t) NULL
|
||||
},
|
||||
|
||||
|
||||
{ WbNresolveImageFunction,
|
||||
WbCResolveImageFunction, XtRPointer,
|
||||
WbCResolveImageFunction, XtRPointer,
|
||||
sizeof (XtPointer),
|
||||
XtOffset (HTMLWidget, html.resolveImage),
|
||||
XtRImmediate, (caddr_t) NULL
|
||||
},
|
||||
|
||||
|
||||
{ WbNresolveDelayedImage,
|
||||
WbCResolveDelayedImage, XtRPointer,
|
||||
WbCResolveDelayedImage, XtRPointer,
|
||||
sizeof (XtPointer),
|
||||
XtOffset (HTMLWidget, html.resolveDelayedImage),
|
||||
XtRImmediate, (caddr_t) NULL
|
||||
@@ -615,12 +615,12 @@ static XtResource resources[] =
|
||||
|
||||
{
|
||||
WbNpointerMotionCallback,
|
||||
WbCPointerMotionCallback, XtRPointer,
|
||||
WbCPointerMotionCallback, XtRPointer,
|
||||
sizeof (XtPointer),
|
||||
XtOffset (HTMLWidget, html.pointer_motion_callback),
|
||||
XtRImmediate, (caddr_t) NULL
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -674,12 +674,12 @@ HTMLClassRec htmlClassRec = {
|
||||
},
|
||||
|
||||
{ /* constraint_class fields */
|
||||
NULL, /* resource list */
|
||||
0, /* num resources */
|
||||
0, /* constraint size */
|
||||
NULL, /* init proc */
|
||||
NULL, /* destroy proc */
|
||||
NULL, /* set values proc */
|
||||
NULL, /* resource list */
|
||||
0, /* num resources */
|
||||
0, /* constraint size */
|
||||
NULL, /* init proc */
|
||||
NULL, /* destroy proc */
|
||||
NULL, /* set values proc */
|
||||
NULL, /* extension */
|
||||
},
|
||||
|
||||
@@ -691,13 +691,13 @@ HTMLClassRec htmlClassRec = {
|
||||
NULL, /* syn_cont_resources */
|
||||
0, /* num_syn_cont_resources */
|
||||
XmInheritParentProcess, /* parent_process */
|
||||
NULL, /* extension */
|
||||
NULL, /* extension */
|
||||
},
|
||||
#endif /* MOTIF */
|
||||
|
||||
{ /* html_class fields */
|
||||
{ /* html_class fields */
|
||||
0 /* none */
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -710,7 +710,7 @@ extern int hacked_y;
|
||||
WidgetClass htmlWidgetClass = (WidgetClass)&htmlClassRec;
|
||||
|
||||
static Cursor in_anchor_cursor = (Cursor)NULL;
|
||||
static char *mailToKludgeSubject = NULL;
|
||||
static char *mailToKludgeSubject = NULL;
|
||||
static char *mailToKludgeURL = NULL;
|
||||
|
||||
char *cattrs[]={"text","bgcolor","alink","vlink","link",NULL};
|
||||
@@ -836,7 +836,7 @@ hw_do_color(Widget w, char *att, char *cname)
|
||||
}
|
||||
|
||||
cmap = hw->core.colormap;
|
||||
|
||||
|
||||
val=cname;
|
||||
if (*val!='#') {
|
||||
if (XAllocNamedColor(XtDisplay(w),cmap,cname,&col,&ecol)) {
|
||||
@@ -868,22 +868,22 @@ hw_do_color(Widget w, char *att, char *cname)
|
||||
t[0]=val[4];
|
||||
t[1]=val[5];
|
||||
sscanf(t,"%x",&b);
|
||||
|
||||
|
||||
col.red = ((unsigned) r) << 8;
|
||||
col.green = ((unsigned) g) << 8;
|
||||
col.blue = ((unsigned) b) << 8;
|
||||
col.flags = DoRed | DoGreen | DoBlue;
|
||||
|
||||
|
||||
if (!XAllocColor(XtDisplay(w),cmap,&col)) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!my_strcasecmp(att,"text")) {
|
||||
hw->manager.foreground = col.pixel;
|
||||
}
|
||||
@@ -891,11 +891,11 @@ hw_do_color(Widget w, char *att, char *cname)
|
||||
/* calculate shadow colors */
|
||||
calc = XmGetColorCalculation();
|
||||
calc(&col, &fg, &sel, &ts, &bs);
|
||||
if (XAllocColor(XtDisplay(w),cmap,&ts))
|
||||
if (XAllocColor(XtDisplay(w),cmap,&ts))
|
||||
hw->manager.top_shadow_color = ts.pixel;
|
||||
if (XAllocColor(XtDisplay(w),cmap,&bs))
|
||||
if (XAllocColor(XtDisplay(w),cmap,&bs))
|
||||
hw->manager.bottom_shadow_color = bs.pixel;
|
||||
|
||||
|
||||
hw->core.background_pixel = col.pixel;
|
||||
hw->html.view->core.background_pixel = col.pixel ;
|
||||
hw->html.activeAnchor_bg = col.pixel;
|
||||
@@ -909,7 +909,7 @@ hw_do_color(Widget w, char *att, char *cname)
|
||||
if (!my_strcasecmp(att,"alink")) {
|
||||
hw->html.activeAnchor_fg = col.pixel;
|
||||
}
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ XGCValues values;
|
||||
#define MAX_Y_EXP_DIFF 10 /*pixels between exposes to make one expose area*/
|
||||
|
||||
/*
|
||||
* Process an expose event in the View (or drawing area). This
|
||||
* Process an expose event in the View (or drawing area). This
|
||||
* Can be a regular expose event, or perhaps a GraphicsExpose Event.
|
||||
*/
|
||||
static void
|
||||
@@ -1100,7 +1100,7 @@ goto single_expose;
|
||||
x1 = nx + nwidth;
|
||||
changed=1;
|
||||
}
|
||||
|
||||
|
||||
if (y1 < (ny + nheight)) {
|
||||
y1 = ny + nheight;
|
||||
changed=1;
|
||||
@@ -1190,7 +1190,7 @@ ScrollWidgets(hw)
|
||||
((y+wptr->height)>0 &&
|
||||
(y+wptr->height)<=hw->html.view_height)) &&
|
||||
((x>0 &&
|
||||
x<=hw->html.view_width) ||
|
||||
x<=hw->html.view_width) ||
|
||||
((x+wptr->width)>0 &&
|
||||
(x+wptr->width)<=hw->html.view_width))) {
|
||||
wptr->seeable=1;
|
||||
@@ -1271,7 +1271,7 @@ ScrollToPos(w, hw, value)
|
||||
if (value > hw->html.scroll_y)
|
||||
{
|
||||
int dy;
|
||||
|
||||
|
||||
dy = value - hw->html.scroll_y;
|
||||
if (dy > hw->html.view_height)
|
||||
{
|
||||
@@ -1314,7 +1314,7 @@ ScrollToPos(w, hw, value)
|
||||
else if (value < hw->html.scroll_y)
|
||||
{
|
||||
int dy;
|
||||
|
||||
|
||||
dy = hw->html.scroll_y - value;
|
||||
if (dy > hw->html.view_height)
|
||||
{
|
||||
@@ -1347,7 +1347,7 @@ ScrollToPos(w, hw, value)
|
||||
ViewRedisplay(hw,
|
||||
0, 0,
|
||||
hw->html.view_width, dy);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1364,7 +1364,7 @@ ScrollToPos(w, hw, value)
|
||||
if (value > hw->html.scroll_x)
|
||||
{
|
||||
int dx;
|
||||
|
||||
|
||||
dx = value - hw->html.scroll_x;
|
||||
if (dx > hw->html.view_width)
|
||||
{
|
||||
@@ -1407,7 +1407,7 @@ ScrollToPos(w, hw, value)
|
||||
else if (value < hw->html.scroll_x)
|
||||
{
|
||||
int dx;
|
||||
|
||||
|
||||
dx = hw->html.scroll_x - value;
|
||||
if (dx > hw->html.view_width)
|
||||
{
|
||||
@@ -1484,7 +1484,7 @@ ScrollMove(w, client_data, call_data)
|
||||
currentLength = hw->html.view_height;
|
||||
value = hw->html.scroll_y + scrollDir * currentLength;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
totalLength = hw->html.doc_width;
|
||||
currentLength = hw->html.view_width;
|
||||
@@ -1493,7 +1493,7 @@ ScrollMove(w, client_data, call_data)
|
||||
|
||||
if (value > (int)totalLength) value = totalLength;
|
||||
if (value < 0) value = 0;
|
||||
|
||||
|
||||
setScrollBar(w, value, totalLength, currentLength);
|
||||
ScrollToPos(w, hw, value);
|
||||
#endif
|
||||
@@ -1508,14 +1508,14 @@ JumpMove(w, client_data, call_data)
|
||||
caddr_t call_data;
|
||||
{
|
||||
HTMLWidget hw = (HTMLWidget)client_data;
|
||||
int value = (int)(*(float *)call_data *
|
||||
(w == hw->html.vbar ?
|
||||
hw->html.doc_height :
|
||||
int value = (int)(*(float *)call_data *
|
||||
(w == hw->html.vbar ?
|
||||
hw->html.doc_height :
|
||||
hw->html.doc_width));
|
||||
ScrollToPos(w, hw, value);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Create the horizontal and vertical scroll bars.
|
||||
@@ -1544,10 +1544,10 @@ CreateScrollbars(
|
||||
XtSetArg(arg[argcnt], XxNwidth, 10); argcnt++;
|
||||
XtSetArg(arg[argcnt], XxNheight, 10); argcnt++;
|
||||
hw->html.view = XtCreateWidget("View",
|
||||
#ifdef MOTIF
|
||||
#ifdef MOTIF
|
||||
xmDrawingAreaWidgetClass,
|
||||
#else
|
||||
drawingAreaWidgetClass,
|
||||
drawingAreaWidgetClass,
|
||||
#endif
|
||||
(Widget)hw, arg, argcnt);
|
||||
XtManageChild(hw->html.view);
|
||||
@@ -1728,7 +1728,7 @@ ConfigScrollBars(
|
||||
*/
|
||||
#ifdef MOTIF
|
||||
vx = hw->manager.shadow_thickness;
|
||||
vy = hw->manager.shadow_thickness;
|
||||
vy = hw->manager.shadow_thickness;
|
||||
#else
|
||||
vx = vy = 0;
|
||||
#endif
|
||||
@@ -1741,7 +1741,7 @@ ConfigScrollBars(
|
||||
vy += HbarHeight(hw);
|
||||
}
|
||||
XtMoveWidget(hw->html.view, vx, vy);
|
||||
XtResizeWidget(hw->html.view, hw->html.view_width,
|
||||
XtResizeWidget(hw->html.view, hw->html.view_width,
|
||||
hw->html.view_height,
|
||||
hw->html.view->core.border_width);
|
||||
/*
|
||||
@@ -1757,7 +1757,7 @@ ConfigScrollBars(
|
||||
* the viewing area
|
||||
*/
|
||||
XtResizeWidget(hw->html.vbar, hw->html.vbar->core.width,
|
||||
hw->html.view_height + (2 *
|
||||
hw->html.view_height + (2 *
|
||||
#ifdef MOTIF
|
||||
hw->manager.shadow_thickness
|
||||
#else
|
||||
@@ -1779,16 +1779,16 @@ ConfigScrollBars(
|
||||
{
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
fprintf (stderr, "view_height %d, doc_height %d\n",
|
||||
fprintf (stderr, "view_height %d, doc_height %d\n",
|
||||
hw->html.view_height, hw->html.doc_height);
|
||||
}
|
||||
#endif
|
||||
#ifdef NOT_RIGHT
|
||||
/* Eric -- your previous equation wasn't doing it.
|
||||
This isn't either... */
|
||||
ss =
|
||||
ss =
|
||||
(int)((float)hw->html.view_height *
|
||||
((float)hw->html.view_height /
|
||||
((float)hw->html.view_height /
|
||||
(float)(hw->html.doc_height - (int)hw->html.view_height)));
|
||||
if (ss > hw->html.view_height)
|
||||
{
|
||||
@@ -1855,14 +1855,14 @@ ConfigScrollBars(
|
||||
XtSetArg(arg[argcnt], XmNvalue, hw->html.scroll_y); argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNsliderSize, ss); argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNincrement, DEFAULT_INCREMENT); argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNpageIncrement,
|
||||
hw->html.view_height > DEFAULT_INCREMENT ?
|
||||
XtSetArg(arg[argcnt], XmNpageIncrement,
|
||||
hw->html.view_height > DEFAULT_INCREMENT ?
|
||||
hw->html.view_height - DEFAULT_INCREMENT : 1); argcnt++;
|
||||
XtSetValues(hw->html.vbar, arg, argcnt);
|
||||
#else
|
||||
setScrollBar(hw->html.vbar,
|
||||
setScrollBar(hw->html.vbar,
|
||||
hw->html.scroll_y,
|
||||
hw->html.doc_height,
|
||||
hw->html.doc_height,
|
||||
hw->html.view_height);
|
||||
#endif /* MOTIF */
|
||||
|
||||
@@ -1970,14 +1970,14 @@ ConfigScrollBars(
|
||||
XtSetArg(arg[argcnt], XmNvalue, hw->html.scroll_x); argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNsliderSize, ss); argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNincrement, DEFAULT_INCREMENT); argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNpageIncrement,
|
||||
hw->html.view_width > DEFAULT_INCREMENT ?
|
||||
XtSetArg(arg[argcnt], XmNpageIncrement,
|
||||
hw->html.view_width > DEFAULT_INCREMENT ?
|
||||
hw->html.view_width - DEFAULT_INCREMENT : 1); argcnt++;
|
||||
XtSetValues(hw->html.hbar, arg, argcnt);
|
||||
#else
|
||||
setScrollBar(hw->html.hbar,
|
||||
setScrollBar(hw->html.hbar,
|
||||
hw->html.scroll_x,
|
||||
hw->html.doc_width,
|
||||
hw->html.doc_width,
|
||||
hw->html.view_width);
|
||||
#endif /* MOTIF */
|
||||
}
|
||||
@@ -2026,7 +2026,7 @@ ReformatWindow(
|
||||
if (hw->core.width <= swidth)
|
||||
{
|
||||
hw->core.width = swidth + 10;
|
||||
}
|
||||
}
|
||||
new_width = hw->core.width - swidth - (2 * st);
|
||||
temp = FormatAll(hw, &new_width);
|
||||
|
||||
@@ -2216,19 +2216,19 @@ Initialize(
|
||||
if (new->core.width == 0)
|
||||
{
|
||||
new->core.width = new->html.margin_width << 1 ;
|
||||
}
|
||||
}
|
||||
if (new->core.width == 0)
|
||||
{
|
||||
new->core.width = 10 ;
|
||||
}
|
||||
}
|
||||
if (new->core.height == 0)
|
||||
{
|
||||
new->core.height = new->html.margin_height << 1 ;
|
||||
}
|
||||
}
|
||||
if (new->core.height == 0)
|
||||
{
|
||||
new->core.height = 10 ;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure the underline numbers are within bounds.
|
||||
@@ -2236,22 +2236,22 @@ Initialize(
|
||||
if (new->html.num_anchor_underlines < 0)
|
||||
{
|
||||
new->html.num_anchor_underlines = 0;
|
||||
}
|
||||
}
|
||||
if (new->html.num_anchor_underlines > MAX_UNDERLINES)
|
||||
{
|
||||
new->html.num_anchor_underlines = MAX_UNDERLINES;
|
||||
}
|
||||
}
|
||||
if (new->html.num_visitedAnchor_underlines < 0)
|
||||
{
|
||||
new->html.num_visitedAnchor_underlines = 0;
|
||||
}
|
||||
}
|
||||
if (new->html.num_visitedAnchor_underlines > MAX_UNDERLINES)
|
||||
{
|
||||
new->html.num_visitedAnchor_underlines = MAX_UNDERLINES;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse the raw text with the HTML parser. And set the formatted
|
||||
* Parse the raw text with the HTML parser. And set the formatted
|
||||
* element list to NULL.
|
||||
*/
|
||||
new->html.html_objects = HTMLParse(NULL, request->html.raw_text,new);
|
||||
@@ -2463,7 +2463,7 @@ ViewClearAndRefresh(
|
||||
#endif
|
||||
{
|
||||
int r,b;
|
||||
|
||||
|
||||
/*
|
||||
* Only refresh if we have a window already.
|
||||
* (if we have a GC we have a window)
|
||||
@@ -2482,7 +2482,7 @@ ViewClearAndRefresh(
|
||||
hw->manager.top_shadow_color ? 0 : 1;
|
||||
hw->manager.bottom_shadow_color =
|
||||
hw->manager.bottom_shadow_color ? 0 : 1;
|
||||
|
||||
|
||||
XtVaSetValues(hw->html.view,
|
||||
XmNbackground, hw->core.background_pixel,
|
||||
XmNtopShadowColor, r,
|
||||
@@ -2494,7 +2494,7 @@ ViewClearAndRefresh(
|
||||
XmNtopShadowColor, r,
|
||||
XmNbottomShadowColor, b,
|
||||
NULL);
|
||||
|
||||
|
||||
XClearArea(XtDisplay(hw), XtWindow(hw->html.view),
|
||||
0, 0, 0, 0, False);
|
||||
ViewRedisplay(hw, 0, 0,
|
||||
@@ -2612,7 +2612,7 @@ Resize(
|
||||
if (hw->core.width <= swidth)
|
||||
{
|
||||
hw->core.width = swidth + 10 ;
|
||||
}
|
||||
}
|
||||
|
||||
if (hw->html.use_vbar == True)
|
||||
{
|
||||
@@ -3989,7 +3989,7 @@ TrackMotion(w, event, params, num_params)
|
||||
}
|
||||
|
||||
eptr = LocateElement(hw, x, y, &epos);
|
||||
|
||||
|
||||
/* We're hitting a new anchor if eptr exists and
|
||||
eptr != cached tracked element and anchorHRef != NULL. */
|
||||
if (eptr != NULL && eptr != hw->html.cached_tracked_ele &&
|
||||
@@ -4002,7 +4002,7 @@ TrackMotion(w, event, params, num_params)
|
||||
}
|
||||
/* We're leaving an anchor if eptr exists and
|
||||
a cached ele exists and we're not entering a new anchor. */
|
||||
else if (eptr != NULL && hw->html.cached_tracked_ele != NULL &&
|
||||
else if (eptr != NULL && hw->html.cached_tracked_ele != NULL &&
|
||||
eptr->anchorHRef == NULL)
|
||||
{
|
||||
LEAVING_ANCHOR (hw);
|
||||
@@ -4014,13 +4014,13 @@ TrackMotion(w, event, params, num_params)
|
||||
|
||||
|
||||
|
||||
/* We're adding a subject attribute to the anchor tag
|
||||
/* We're adding a subject attribute to the anchor tag
|
||||
of course this subject attribute is dependent on that the HREF attribute
|
||||
is set to a mailto URL. I think this is a kludge. libwww is not set up
|
||||
for this, so to minimize modifications, this routine exists for
|
||||
for this, so to minimize modifications, this routine exists for
|
||||
libwww:HTSendMaitlTo() to call to get the subject for the mailto URL.
|
||||
The static globals mailToKludgeSubject, etc are set in HTMLInput when
|
||||
an anchor is clicked.
|
||||
an anchor is clicked.
|
||||
*/
|
||||
GetMailtoKludgeInfo(url,subject)
|
||||
char **url;
|
||||
@@ -4051,7 +4051,7 @@ _HTMLInput(
|
||||
String *params, /* unused */
|
||||
Cardinal *num_params) /* unused */
|
||||
#endif
|
||||
{
|
||||
{
|
||||
HTMLWidget hw = (HTMLWidget)XtParent(w);
|
||||
struct ele_rec *eptr;
|
||||
WbAnchorCallbackData cbdata;
|
||||
@@ -4353,16 +4353,16 @@ _HTMLpwdInput(
|
||||
char *keySymString;
|
||||
char *star = "*";
|
||||
int length, passwdLength, i, insertPos, maxLength;
|
||||
Boolean stringInPlace;
|
||||
|
||||
Boolean stringInPlace;
|
||||
|
||||
if (event->type == KeyPress)
|
||||
{
|
||||
HTMLWidget hw = (HTMLWidget)XtParent(w);
|
||||
WidgetInfo *wptr;
|
||||
|
||||
if (XtClass((Widget)hw) != htmlWidgetClass)
|
||||
if (XtClass((Widget)hw) != htmlWidgetClass)
|
||||
return; /* it was not for us */
|
||||
|
||||
|
||||
/*
|
||||
* find the structure for this widget
|
||||
*/
|
||||
@@ -4378,7 +4378,7 @@ _HTMLpwdInput(
|
||||
|
||||
passwdLength = wptr->password ? strlen(wptr->password) : 0;
|
||||
|
||||
length = XLookupString((XKeyEvent *)event,
|
||||
length = XLookupString((XKeyEvent *)event,
|
||||
buffer, 50, &ks, NULL);
|
||||
keySymString = XKeysymToString(ks);
|
||||
XtVaGetValues(w,
|
||||
@@ -4404,7 +4404,7 @@ _HTMLpwdInput(
|
||||
|
||||
if ((!strcmp("BackSpace",keySymString))
|
||||
|| (!strcmp("Backspace",keySymString))
|
||||
|| (!strcmp("Delete",keySymString)) )
|
||||
|| (!strcmp("Delete",keySymString)) )
|
||||
{
|
||||
insertPos --;
|
||||
|
||||
@@ -4421,7 +4421,7 @@ _HTMLpwdInput(
|
||||
}
|
||||
#endif
|
||||
|
||||
XtCallActionProc(w,
|
||||
XtCallActionProc(w,
|
||||
insertPos>-1 ? "delete-previous-character" :
|
||||
"delete-next-character",
|
||||
event, NULL,0);
|
||||
@@ -4440,15 +4440,15 @@ _HTMLpwdInput(
|
||||
if (passwdLength < maxLength)
|
||||
{
|
||||
char *pwd = wptr->password =
|
||||
(char *)realloc(wptr->password,
|
||||
(char *)realloc(wptr->password,
|
||||
sizeof(char)*(passwdLength+2));
|
||||
for (i=passwdLength+1; i>insertPos; i--)
|
||||
pwd[i] = pwd[i-1];
|
||||
|
||||
|
||||
pwd[insertPos] = buffer[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (wptr->password == NULL)
|
||||
wptr->password = (char *)malloc(sizeof(char)*2);
|
||||
@@ -4508,19 +4508,19 @@ SetValues(
|
||||
if (request->html.num_anchor_underlines < 0)
|
||||
{
|
||||
new->html.num_anchor_underlines = 0;
|
||||
}
|
||||
}
|
||||
if (request->html.num_anchor_underlines > MAX_UNDERLINES)
|
||||
{
|
||||
new->html.num_anchor_underlines = MAX_UNDERLINES;
|
||||
}
|
||||
}
|
||||
if (request->html.num_visitedAnchor_underlines < 0)
|
||||
{
|
||||
new->html.num_visitedAnchor_underlines = 0;
|
||||
}
|
||||
}
|
||||
if (request->html.num_visitedAnchor_underlines > MAX_UNDERLINES)
|
||||
{
|
||||
new->html.num_visitedAnchor_underlines = MAX_UNDERLINES;
|
||||
}
|
||||
}
|
||||
|
||||
/*reformatted = 0;*/
|
||||
if ((request->html.raw_text != current->html.raw_text)||
|
||||
@@ -4778,7 +4778,7 @@ ConvertSelection(w, selection, target, type, value, length, format)
|
||||
bcopy((char*)std_targets, (char*)targetP,
|
||||
sizeof(Atom)*std_length);
|
||||
*/
|
||||
memcpy((char*)targetP, (char*)std_targets,
|
||||
memcpy((char*)targetP, (char*)std_targets,
|
||||
sizeof(Atom)*std_length);
|
||||
XtFree((char*)std_targets);
|
||||
*type = XA_ATOM;
|
||||
@@ -5209,7 +5209,7 @@ HTMLGotoId(Widget w, int element_id, int correction)
|
||||
#else
|
||||
ScrollToPos(hw->html.vbar, hw, newy);
|
||||
ScrollToPos(hw->html.hbar, hw, 0);
|
||||
setScrollBar(hw->html.vbar, newy,
|
||||
setScrollBar(hw->html.vbar, newy,
|
||||
hw->html.doc_height,
|
||||
hw->html.view_height);
|
||||
#endif
|
||||
@@ -6104,7 +6104,7 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
|
||||
InitBody((Widget)hw);
|
||||
|
||||
/* restore default colors as required */
|
||||
|
||||
|
||||
if(hw->manager.foreground != hw->html.foreground_SAVE) {
|
||||
XFreeColors(XtDisplay(hw),hw->core.colormap,
|
||||
&hw->manager.foreground,1,0);
|
||||
@@ -6115,12 +6115,12 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
|
||||
&hw->html.anchor_fg,1,0);
|
||||
hw->html.anchor_fg = hw->html.anchor_fg_SAVE;
|
||||
}
|
||||
if(hw->html.visitedAnchor_fg != hw->html.visitedAnchor_fg_SAVE){
|
||||
if(hw->html.visitedAnchor_fg != hw->html.visitedAnchor_fg_SAVE){
|
||||
XFreeColors(XtDisplay(hw),hw->core.colormap,
|
||||
&hw->html.visitedAnchor_fg,1,0);
|
||||
hw->html.visitedAnchor_fg = hw->html.visitedAnchor_fg_SAVE;
|
||||
}
|
||||
if(hw->html.activeAnchor_fg != hw->html.activeAnchor_fg_SAVE){
|
||||
if(hw->html.activeAnchor_fg != hw->html.activeAnchor_fg_SAVE){
|
||||
XFreeColors(XtDisplay(hw),hw->core.colormap,
|
||||
&hw->html.activeAnchor_fg,1,0);
|
||||
hw->html.activeAnchor_fg = hw->html.activeAnchor_fg_SAVE;
|
||||
@@ -6129,13 +6129,13 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
|
||||
XFreeColors(XtDisplay(hw),hw->core.colormap,
|
||||
&hw->manager.top_shadow_color,1,0);
|
||||
hw->manager.top_shadow_color = hw->html.top_color_SAVE;
|
||||
}
|
||||
}
|
||||
if(hw->html.bottom_color_SAVE != hw->manager.bottom_shadow_color){
|
||||
XFreeColors(XtDisplay(hw),hw->core.colormap,
|
||||
&hw->manager.bottom_shadow_color,1,0);
|
||||
hw->manager.bottom_shadow_color = hw->html.bottom_color_SAVE;
|
||||
}
|
||||
if(hw->core.background_pixel != hw->html.background_SAVE){
|
||||
}
|
||||
if(hw->core.background_pixel != hw->html.background_SAVE){
|
||||
XFreeColors(XtDisplay(hw),hw->core.colormap,
|
||||
&hw->core.background_pixel,1,0);
|
||||
hw->html.activeAnchor_bg = hw->html.activeAnchor_bg_SAVE;
|
||||
@@ -6277,7 +6277,7 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
|
||||
/*
|
||||
* Display the new text
|
||||
*/
|
||||
ViewClearAndRefresh(hw);
|
||||
ViewClearAndRefresh(hw);
|
||||
|
||||
/*
|
||||
* Clear any previous selection
|
||||
@@ -6897,7 +6897,7 @@ HTMLSearchText (Widget w, char *pattern, ElementRef *m_start, ElementRef *m_end,
|
||||
}
|
||||
|
||||
/* the following is a hack to make the html widget not acknowledge
|
||||
any button events while it is busy so that the rbm will not grab the
|
||||
any button events while it is busy so that the rbm will not grab the
|
||||
server. Hopefully this will be removed when the application is re-written
|
||||
to pay more attention to the event loop - TPR 2/9/96 */
|
||||
|
||||
@@ -6913,8 +6913,8 @@ void HTMLSetAppInsensitive(Widget hw)
|
||||
height = hw->core.height;
|
||||
|
||||
/* ???? Should this be cast to a HTMLWidget and XtWindow changed to html.view*/
|
||||
sens_win = XCreateWindow(XtDisplay((Widget) hw), XtWindow(hw), x,
|
||||
y, width, height, 0,CopyFromParent, InputOnly,
|
||||
sens_win = XCreateWindow(XtDisplay((Widget) hw), XtWindow(hw), x,
|
||||
y, width, height, 0,CopyFromParent, InputOnly,
|
||||
CopyFromParent, 0, NULL);
|
||||
XMapRaised(XtDisplay((Widget) hw), sens_win);
|
||||
}
|
||||
@@ -6931,7 +6931,7 @@ void HTMLSetAppSensitive(Widget hw)
|
||||
*
|
||||
* Fixed up and rewritten by SWP...
|
||||
*/
|
||||
void HTMLDrawBackgroundImage(Widget wid, int x, int y, int width,
|
||||
void HTMLDrawBackgroundImage(Widget wid, int x, int y, int width,
|
||||
int height) {
|
||||
|
||||
int w_whole=0, h_whole=0,
|
||||
@@ -6966,7 +6966,7 @@ HTMLWidget hw = (HTMLWidget) wid;
|
||||
* Figure out the height of the area to draw.
|
||||
* If there is a height offset, index the number of height tiles.
|
||||
*/
|
||||
w_start_offset = (x+hw->html.scroll_x) % hw->html.bg_width;
|
||||
w_start_offset = (x+hw->html.scroll_x) % hw->html.bg_width;
|
||||
if (w_start_offset || (!w_start_offset && width<hw->html.bg_width)) {
|
||||
w_whole++;
|
||||
start_width=hw->html.bg_width-w_start_offset;
|
||||
@@ -7129,7 +7129,7 @@ void HTMLSetFocusPolicy(Widget w, int to)
|
||||
else
|
||||
{
|
||||
XtVaSetValues(shell, XmNkeyboardFocusPolicy, XmEXPLICIT, NULL);
|
||||
/* when we have preference dialog this will have to
|
||||
/* when we have preference dialog this will have to
|
||||
undo all the translations that are currently installed
|
||||
in the widgets and set the keyboardFocus policy of the
|
||||
toplevel shell to pointer */
|
||||
|
@@ -134,7 +134,7 @@ extern int HTMLSearchText (Widget w, char *pattern,
|
||||
extern void HTMLSetAppInsensitive(Widget hw);
|
||||
extern void HTMLSetAppSensitive(Widget hw);
|
||||
extern void HTMLTraverseTabGroups();
|
||||
extern void HTMLDrawBackgroundImage(Widget w, int x, int y, int width,
|
||||
extern void HTMLDrawBackgroundImage(Widget w, int x, int y, int width,
|
||||
int height);
|
||||
extern void HTMLSetFocusPolicy(Widget w, int to);
|
||||
#endif /* _NO_PROTO */
|
||||
@@ -259,7 +259,7 @@ typedef struct table_field {
|
||||
int colWidth; /* uniform width for all element in this col*/
|
||||
int rowHeight; /* uniform hieght for all element in the row*/
|
||||
Boolean header; /* is this field created with <TH> or <TD> */
|
||||
|
||||
|
||||
/* contents */
|
||||
FieldType type;
|
||||
char *text;
|
||||
@@ -429,9 +429,9 @@ struct delay_rec {
|
||||
#define M_TABLE_HEADER 47
|
||||
#define M_TABLE_ROW 48
|
||||
#define M_TABLE_DATA 49
|
||||
#define M_SUP 50
|
||||
#define M_SUB 51
|
||||
#define M_FIGURE 52
|
||||
#define M_SUP 50
|
||||
#define M_SUB 51
|
||||
#define M_FIGURE 52
|
||||
#define M_COMMENT 53
|
||||
#define M_DOC_HEAD 54 /* amb 2 */
|
||||
#define M_UNDERLINED 55 /* amb 2 */
|
||||
|
@@ -144,7 +144,7 @@ typedef struct _HTMLPart
|
||||
Pixmap bgmap_SAVE;
|
||||
Pixmap bgclip_SAVE;
|
||||
int bg_height;
|
||||
int bg_width;
|
||||
int bg_width;
|
||||
|
||||
Pixel foreground_SAVE;
|
||||
Pixel anchor_fg_SAVE;
|
||||
@@ -152,9 +152,9 @@ typedef struct _HTMLPart
|
||||
Pixel activeAnchor_fg_SAVE;
|
||||
Pixel activeAnchor_bg_SAVE;
|
||||
Pixel top_color_SAVE;
|
||||
Pixel bottom_color_SAVE;
|
||||
Pixel bottom_color_SAVE;
|
||||
Pixel background_SAVE;
|
||||
|
||||
|
||||
int num_anchor_underlines;
|
||||
int num_visitedAnchor_underlines;
|
||||
Boolean dashed_anchor_lines;
|
||||
@@ -191,7 +191,7 @@ typedef struct _HTMLPart
|
||||
XtPointer previously_visited_test;
|
||||
XtPointer resolveImage;
|
||||
XtPointer resolveDelayedImage;
|
||||
|
||||
|
||||
XtPointer pointer_motion_callback;
|
||||
|
||||
/* PRIVATE */
|
||||
|
@@ -564,7 +564,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->anchorSubject = ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -691,7 +691,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->underline_number = 0;
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
if (eptr->edata != NULL)
|
||||
{
|
||||
free((char *)eptr->edata);
|
||||
@@ -728,7 +728,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->anchorSubject= ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -773,7 +773,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->anchorSubject = ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -963,7 +963,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->anchorSubject= ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -1226,7 +1226,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -1307,7 +1307,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->anchorSubject = ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -1466,7 +1466,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->anchorSubject= ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -1527,7 +1527,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
eptr->anchorSubject= ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_SUBJECT);
|
||||
if (!eptr->anchorSubject) {
|
||||
eptr->anchorSubject =
|
||||
eptr->anchorSubject =
|
||||
ParseMarkTag(AnchorText,
|
||||
MT_ANCHOR, AT_TITLE);
|
||||
}
|
||||
@@ -1591,7 +1591,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
|
||||
|
||||
|
||||
/*
|
||||
* Change our drawing font
|
||||
* Change our drawing font
|
||||
*/
|
||||
void
|
||||
NewFont(fp)
|
||||
@@ -2206,7 +2206,7 @@ PreformatPlace(hw, mptr, x, y, width)
|
||||
SetElement(hw, E_TEXT, currentFont,
|
||||
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
/*
|
||||
* Save width here to avoid an
|
||||
* Save width here to avoid an
|
||||
* XTextExtents call later.
|
||||
*/
|
||||
Current->width = *x - line_x + 1;
|
||||
@@ -2270,7 +2270,7 @@ PreformatPlace(hw, mptr, x, y, width)
|
||||
SetElement(hw, E_TEXT, currentFont,
|
||||
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
/*
|
||||
* Save width here to avoid an
|
||||
* Save width here to avoid an
|
||||
* XTextExtents call later.
|
||||
*/
|
||||
Current->width = *x - line_x + 1;
|
||||
@@ -2498,7 +2498,7 @@ FormatPlace(hw, mptr, x, y, width)
|
||||
SetElement(hw, E_TEXT, currentFont,
|
||||
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
/*
|
||||
* Save width here to avoid an
|
||||
* Save width here to avoid an
|
||||
* XTextExtents call later.
|
||||
*/
|
||||
Current->width = *x - line_x + 1;
|
||||
@@ -2651,7 +2651,7 @@ FormatPlace(hw, mptr, x, y, width)
|
||||
SetElement(hw, E_TEXT, currentFont,
|
||||
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
/*
|
||||
* Save width here to avoid an
|
||||
* Save width here to avoid an
|
||||
* XTextExtents call later.
|
||||
*/
|
||||
Current->width = *x - line_x + 1;
|
||||
@@ -2679,7 +2679,7 @@ FormatPlace(hw, mptr, x, y, width)
|
||||
SetElement(hw, E_TEXT, currentFont,
|
||||
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
/*
|
||||
* Save width here to avoid an
|
||||
* Save width here to avoid an
|
||||
* XTextExtents call later.
|
||||
*/
|
||||
Current->width = *x - line_x + 1;
|
||||
@@ -2711,8 +2711,8 @@ int extra;
|
||||
|
||||
extra = 10;
|
||||
|
||||
LineFeed(hw, x, y);
|
||||
SetElement(hw, E_TABLE, currentFont, *x, *y, (char *) mptr, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
LineFeed(hw, x, y);
|
||||
SetElement(hw, E_TABLE, currentFont, *x, *y, (char *) mptr, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
if (!Current->table_data) {
|
||||
/* no table */
|
||||
return 0;
|
||||
@@ -2724,7 +2724,7 @@ int extra;
|
||||
BaseLine = Current->table_data->height;
|
||||
|
||||
*x += Current->width + 1;
|
||||
LineFeed(hw, x, y);
|
||||
LineFeed(hw, x, y);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2769,7 +2769,7 @@ ImagePlace(hw, mptr, x, y, width)
|
||||
SetElement(hw, E_TEXT, currentFont,
|
||||
*x, *y, tptr, NULL, NULL, IMAGE_DEFAULT_BORDER);
|
||||
/*
|
||||
* Save width here to avoid an
|
||||
* Save width here to avoid an
|
||||
* XTextExtents call later.
|
||||
*/
|
||||
Current->width = all.width;
|
||||
@@ -2877,7 +2877,7 @@ ImagePlace(hw, mptr, x, y, width)
|
||||
* Yank out the name field, and stick it in text.
|
||||
* We may use this for ALT to at some later date.
|
||||
*/
|
||||
if (Current->pic_data != NULL)
|
||||
if (Current->pic_data != NULL)
|
||||
{
|
||||
tptr = ParseMarkTag(mptr->start, MT_IMAGE, "NAME");
|
||||
/*temp******/
|
||||
@@ -2895,7 +2895,7 @@ ImagePlace(hw, mptr, x, y, width)
|
||||
* change the size, or anchor status of the image, thus we MUST
|
||||
* doit before we muck with the Baseline and stuff.
|
||||
*/
|
||||
if (Current->pic_data != NULL)
|
||||
if (Current->pic_data != NULL)
|
||||
{
|
||||
/*
|
||||
* Handle the USEMAP attribute of IMG tags. This is used for
|
||||
@@ -2949,7 +2949,7 @@ ImagePlace(hw, mptr, x, y, width)
|
||||
*/
|
||||
tptr = ParseMarkTag(mptr->start, MT_IMAGE, "ALIGN");
|
||||
/*temp******/
|
||||
if (!tptr)
|
||||
if (!tptr)
|
||||
{
|
||||
tptr = ParseMarkTag(mptr->start, MT_FIGURE, "ALIGN");
|
||||
}
|
||||
@@ -4865,7 +4865,7 @@ FormatChunk(hw, x, y)
|
||||
* Format all objects
|
||||
*/
|
||||
mptr = hw->html.html_objects;
|
||||
Last = NULL;
|
||||
Last = NULL;
|
||||
while (mptr != NULL)
|
||||
{
|
||||
TriggerMarkChanges(hw, &mptr, x, y);
|
||||
@@ -5781,7 +5781,7 @@ XGCValues values;
|
||||
eptr->pic_data, 0);
|
||||
if (eptr->pic_data->transparent &&
|
||||
eptr->pic_data->clip==None) {
|
||||
eptr->pic_data->clip =
|
||||
eptr->pic_data->clip =
|
||||
XCreatePixmapFromBitmapData
|
||||
(XtDisplay(hw),
|
||||
XtWindow(hw->html.view),
|
||||
@@ -5881,7 +5881,7 @@ XGCValues values;
|
||||
values.clip_x_origin=x+extra;
|
||||
values.clip_y_origin=y+extra;
|
||||
valuemask=GCClipMask|GCClipXOrigin|GCClipYOrigin;
|
||||
XChangeGC(XtDisplay(hw),
|
||||
XChangeGC(XtDisplay(hw),
|
||||
hw->html.drawGC,
|
||||
valuemask, &values);
|
||||
|
||||
@@ -6004,7 +6004,7 @@ PlaceLine(hw, line)
|
||||
break;
|
||||
case E_LINEFEED:
|
||||
if(!hw->html.bg_image)
|
||||
LinefeedRefresh(hw, eptr);
|
||||
LinefeedRefresh(hw, eptr);
|
||||
break;
|
||||
case E_IMAGE:
|
||||
ImageRefresh(hw, eptr);
|
||||
|
@@ -465,20 +465,20 @@ MakeImage(dsp, data, width, height, depth, img_info, clip)
|
||||
bit_data = (unsigned char *)malloc(width * height * 2);
|
||||
bitp = bit_data;
|
||||
datap = data;
|
||||
|
||||
|
||||
theVisual = DefaultVisual(dsp, DefaultScreen(dsp));
|
||||
rshift = 15 - highbit(theVisual->red_mask);
|
||||
gshift = 15 - highbit(theVisual->green_mask);
|
||||
bshift = 15 - highbit(theVisual->blue_mask);
|
||||
bmap_order = BitmapBitOrder(dsp);
|
||||
|
||||
|
||||
for (w = (width * height); w > 0; w--)
|
||||
{
|
||||
temp = (((img_info->reds[(int)*datap] >> rshift) &
|
||||
temp = (((img_info->reds[(int)*datap] >> rshift) &
|
||||
theVisual->red_mask) |
|
||||
((img_info->greens[(int)*datap] >> gshift) &
|
||||
((img_info->greens[(int)*datap] >> gshift) &
|
||||
theVisual->green_mask) |
|
||||
((img_info->blues[(int)*datap] >> bshift) &
|
||||
((img_info->blues[(int)*datap] >> bshift) &
|
||||
theVisual->blue_mask));
|
||||
if (bmap_order == MSBFirst)
|
||||
{
|
||||
|
@@ -241,7 +241,7 @@ ClearJot(hw, w, width, height)
|
||||
|
||||
jptr = GetJot(w);
|
||||
if (jptr == NULL)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ ClearJot(hw, w, width, height)
|
||||
hw->html.drawGC,
|
||||
0, 0, jptr->width, jptr->height);
|
||||
}
|
||||
|
||||
|
||||
FreeStrokes(jptr->strokes);
|
||||
jptr->strokes = NULL;
|
||||
jptr->last_stroke = NULL;
|
||||
@@ -319,7 +319,7 @@ EVJotExpose(w, data, event)
|
||||
|
||||
jptr = GetJot(w);
|
||||
if (jptr == NULL)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ EVJotPress(w, data, event)
|
||||
|
||||
jptr = GetJot(w);
|
||||
if (jptr == NULL)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -409,12 +409,12 @@ EVJotMove(w, data, event)
|
||||
|
||||
jptr = GetJot(w);
|
||||
if (jptr == NULL)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (jptr->drawing == False)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -463,12 +463,12 @@ EVJotRelease(w, data, event)
|
||||
|
||||
jptr = GetJot(w);
|
||||
if (jptr == NULL)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (jptr->drawing == False)
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ EJB_JOTfromJot(w)
|
||||
|
||||
jptr = GetJot(w);
|
||||
if (jptr == NULL)
|
||||
{
|
||||
{
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@@ -648,12 +648,12 @@ JOTfromJot(w, buffer_len)
|
||||
|
||||
jptr = GetJot(w);
|
||||
if (jptr == NULL)
|
||||
{
|
||||
{
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
dlen = sizeof(MY_INK_POINT) * jptr->stroke_cnt;
|
||||
|
||||
|
||||
dataArray = (MY_INK_POINT *)malloc(dlen);
|
||||
cnt = 0;
|
||||
sptr = jptr->strokes;
|
||||
@@ -692,7 +692,7 @@ JOTfromJot(w, buffer_len)
|
||||
pptr = (INK_PENDATA_RECORD *)malloc(inkRecordPenDataSize(dlen));
|
||||
pptr->header.recordType = inkRecordPenData;
|
||||
pptr->header.recordLength = inkRecordPenDataSize(dlen);
|
||||
pptr->bounds.origin.x = jptr->min_x;
|
||||
pptr->bounds.origin.x = jptr->min_x;
|
||||
pptr->bounds.origin.y = jptr->min_y;
|
||||
pptr->bounds.size.w = jptr->max_x - jptr->min_x + 1;
|
||||
pptr->bounds.size.h = jptr->max_y - jptr->min_y + 1;
|
||||
@@ -719,7 +719,7 @@ JOTfromJot(w, buffer_len)
|
||||
bcopy((char *)pptr, (char *)(buffer + inkRecordBundleSize),
|
||||
inkRecordPenDataSize(dlen));
|
||||
*/
|
||||
memcpy((char *)(buffer + inkRecordBundleSize), (char *)pptr,
|
||||
memcpy((char *)(buffer + inkRecordBundleSize), (char *)pptr,
|
||||
inkRecordPenDataSize(dlen));
|
||||
/*
|
||||
bcopy((char *)eptr, (char *)(buffer + inkRecordBundleSize +
|
||||
|
@@ -245,7 +245,7 @@ clean_white_space(txt)
|
||||
}
|
||||
|
||||
/*
|
||||
* If there are more words, insert a space and if space was
|
||||
* If there are more words, insert a space and if space was
|
||||
* removed move up remaining text.
|
||||
*/
|
||||
*start++ = ' ';
|
||||
@@ -323,7 +323,7 @@ ExpandEscapes(esc, endp, termination)
|
||||
{
|
||||
int escLen, ampLen;
|
||||
cnt = 0;
|
||||
escLen = strlen(esc);
|
||||
escLen = strlen(esc);
|
||||
while (AmpEscapes[cnt].tag != NULL)
|
||||
{
|
||||
ampLen = strlen(AmpEscapes[cnt].tag);
|
||||
@@ -657,7 +657,7 @@ get_mark(start, endp)
|
||||
ptr += 2;
|
||||
while ((*ptr != '\0') && ((*ptr == ' ') || (*ptr == '\n')
|
||||
|| (*ptr == '-') ))
|
||||
ptr++; /* skip spaces and newlines */
|
||||
ptr++; /* skip spaces and newlines */
|
||||
if (*ptr == '>') /* completed end comment */
|
||||
{
|
||||
*endp = ptr;
|
||||
@@ -1048,13 +1048,13 @@ HTMLParse(old_list, str, hw)
|
||||
tmp_bgname=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mark->next = NULL;
|
||||
current = AddObj(&list, current, mark, preformat);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
start = (char *)(end + 1);
|
||||
|
||||
@@ -1483,7 +1483,7 @@ AnchorTag(ptrp, startp, endp)
|
||||
ptr++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* For a tag with no value, this is a boolean flag.
|
||||
* Return the string "1" so we know the tag is there.
|
||||
|
@@ -22,8 +22,8 @@ extern char *ParseMarkTag();
|
||||
extern int htmlwTrace;
|
||||
#endif
|
||||
|
||||
/* Allocate a TableField and initialize to default values
|
||||
* return 0 on failure
|
||||
/* Allocate a TableField and initialize to default values
|
||||
* return 0 on failure
|
||||
*/
|
||||
static TableField *NewTableField()
|
||||
{
|
||||
@@ -39,7 +39,7 @@ TableField *tf;
|
||||
tf->contHoriz = False;
|
||||
tf->maxWidth = DEFAULT_FIELD_WIDTH;
|
||||
tf->minWidth = DEFAULT_FIELD_WIDTH;
|
||||
tf->maxHeight = DEFAULT_FIELD_HEIGHT;
|
||||
tf->maxHeight = DEFAULT_FIELD_HEIGHT;
|
||||
tf->minHeight = DEFAULT_FIELD_HEIGHT;
|
||||
tf->header = False;
|
||||
|
||||
@@ -87,11 +87,11 @@ char *end;
|
||||
|
||||
|
||||
|
||||
/* PourText() this routine pours a text string of a particular font into a
|
||||
rectangular area of specified dimensions. The return value is a list of
|
||||
/* PourText() this routine pours a text string of a particular font into a
|
||||
rectangular area of specified dimensions. The return value is a list of
|
||||
text lines that will fit within the given width.
|
||||
If a height is specified, then text will be truncated if necessary to fit.
|
||||
If height is 0, then all of the text is in the list.
|
||||
If height is 0, then all of the text is in the list.
|
||||
The actual pixel height of the text is returned in variable height.
|
||||
*/
|
||||
int PourText(text,font,width,height,percentVertSpace,formattedText,numberOfLines)
|
||||
@@ -131,7 +131,7 @@ int y;
|
||||
*numberOfLines = 0;
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
textList = ListCreate();
|
||||
stringWidth = XTextWidth(font,text,strlen(text));
|
||||
if (stringWidth < width) {
|
||||
@@ -154,7 +154,7 @@ int y;
|
||||
GetWord(textPtr,&wordStart,&wordEnd);
|
||||
wordLength = (int) (wordEnd - wordStart);
|
||||
wordWidth = XTextWidth(font,wordStart, wordLength);
|
||||
if ((builtWidth + spaceWidth + wordWidth) < width) {
|
||||
if ((builtWidth + spaceWidth + wordWidth) < width) {
|
||||
/* then add to line */
|
||||
if (builtWidth) {
|
||||
/* only add space if something on line already*/
|
||||
@@ -164,7 +164,7 @@ int y;
|
||||
strncat(tmpBuff, wordStart, wordLength);
|
||||
builtWidth += wordWidth;
|
||||
}
|
||||
else if (wordWidth < width) {
|
||||
else if (wordWidth < width) {
|
||||
/* start new line */
|
||||
ListAddEntry(textList, strdup(tmpBuff));
|
||||
*tmpBuff = '\0';
|
||||
@@ -174,10 +174,10 @@ int y;
|
||||
strncat(tmpBuff, wordStart, wordLength);
|
||||
builtWidth += wordWidth;
|
||||
}
|
||||
else {
|
||||
else {
|
||||
/* word is too big to fit on a line */
|
||||
/* so break up word */
|
||||
|
||||
|
||||
/* start new line */
|
||||
ListAddEntry(textList, strdup(tmpBuff));
|
||||
*tmpBuff = '\0';
|
||||
@@ -190,10 +190,10 @@ int y;
|
||||
while ((*wordEnd) && (width > wordWidth)) {
|
||||
wordEnd++;
|
||||
wordLength = (int) (wordEnd - wordStart);
|
||||
wordWidth = XTextWidth(font,wordStart,
|
||||
wordWidth = XTextWidth(font,wordStart,
|
||||
wordLength);
|
||||
}
|
||||
|
||||
|
||||
strncat(tmpBuff, wordStart, wordLength);
|
||||
builtWidth += wordWidth;
|
||||
|
||||
@@ -244,7 +244,7 @@ int y;
|
||||
*numberOfLines = numLines;
|
||||
|
||||
return(numLines);
|
||||
|
||||
|
||||
} /* PourText() */
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ int x,y;
|
||||
|
||||
|
||||
/* move 2D link list table to an array for speed */
|
||||
if (!(t->table = (TableField *) malloc(sizeof(TableField)
|
||||
if (!(t->table = (TableField *) malloc(sizeof(TableField)
|
||||
* t->numColumns * t->numRows))) {
|
||||
return(0); /* out of memory */
|
||||
}
|
||||
@@ -341,7 +341,7 @@ int x,y;
|
||||
x = 0;
|
||||
field = (TableField *) ListHead(rowList);
|
||||
while (field) {
|
||||
memcpy(&(t->table[y * t->numColumns + x]), field,
|
||||
memcpy(&(t->table[y * t->numColumns + x]), field,
|
||||
sizeof(TableField));
|
||||
x++;
|
||||
field = (TableField *) ListNext(rowList);
|
||||
@@ -349,10 +349,10 @@ int x,y;
|
||||
y++;
|
||||
rowList = (List) ListNext(tableList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return(1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* return the number of connected fields */
|
||||
@@ -422,7 +422,7 @@ int maxWidthOfColumn;
|
||||
int maxHeightOfRow;
|
||||
int sumMinWidth; /* summation of max widths */
|
||||
int maxWidthOfRow;
|
||||
int minWidthOfRow;
|
||||
int minWidthOfRow;
|
||||
int numAdjacent;
|
||||
float percentToShrink;
|
||||
int accumulateColWidth;
|
||||
@@ -455,9 +455,9 @@ int accumulateColWidth;
|
||||
minWidthOfRow += field->minWidth;
|
||||
}
|
||||
/* save the length of the longest and shortest row */
|
||||
sumMaxWidth = (sumMaxWidth > maxWidthOfRow) ?
|
||||
sumMaxWidth = (sumMaxWidth > maxWidthOfRow) ?
|
||||
sumMaxWidth : maxWidthOfRow;
|
||||
sumMinWidth = (sumMinWidth > minWidthOfRow) ?
|
||||
sumMinWidth = (sumMinWidth > minWidthOfRow) ?
|
||||
sumMinWidth : minWidthOfRow;
|
||||
}
|
||||
|
||||
@@ -508,15 +508,15 @@ int accumulateColWidth;
|
||||
/* find widest field in column */
|
||||
maxWidthOfColumn = 0;
|
||||
for (y = 0; y < t->numRows; y++ ) {
|
||||
maxWidthOfColumn =
|
||||
(maxWidthOfColumn >
|
||||
maxWidthOfColumn =
|
||||
(maxWidthOfColumn >
|
||||
t->table[y * t->numColumns + x].maxWidth)?
|
||||
maxWidthOfColumn :
|
||||
maxWidthOfColumn :
|
||||
t->table[y * t->numColumns+x].maxWidth;
|
||||
}
|
||||
/* assign uniform width to column */
|
||||
for (y = 0; y < t->numRows; y++) {
|
||||
t->table[y*t->numColumns + x].colWidth
|
||||
t->table[y*t->numColumns + x].colWidth
|
||||
= maxWidthOfColumn
|
||||
+ 2 * FIELD_BORDER_SPACE;
|
||||
}
|
||||
@@ -525,10 +525,10 @@ int accumulateColWidth;
|
||||
/* find highest of minimum heights */
|
||||
maxHeightOfRow = 0;
|
||||
for (x=0; x < t->numColumns; x++) {
|
||||
maxHeightOfRow =
|
||||
(maxHeightOfRow >
|
||||
maxHeightOfRow =
|
||||
(maxHeightOfRow >
|
||||
t->table[y * t->numColumns + x].minHeight)?
|
||||
maxHeightOfRow:
|
||||
maxHeightOfRow:
|
||||
t->table[y * t->numColumns+x].minHeight;
|
||||
}
|
||||
/* assign uniform height to row */
|
||||
@@ -575,7 +575,7 @@ int accumulateColWidth;
|
||||
/* format it */
|
||||
for (y = 0; y < t->numRows; y++) {
|
||||
field = &(t->table[y*t->numColumns+x]);
|
||||
field->colWidth = (int) (percentToShrink *
|
||||
field->colWidth = (int) (percentToShrink *
|
||||
((float) CalculateMaxWidthOfColumn(t,x)));
|
||||
field->rowHeight = 0;
|
||||
numAdjacent = TableHowManyConnectedHorizFields
|
||||
@@ -587,7 +587,7 @@ int accumulateColWidth;
|
||||
(percentToShrink *
|
||||
((float) CalculateMaxWidthOfColumn(t,xx))));
|
||||
}
|
||||
|
||||
|
||||
#ifndef DISABLE_TRACE
|
||||
if (htmlwTrace) {
|
||||
fprintf(stderr,"About to call PourText\n");
|
||||
@@ -653,17 +653,17 @@ int accumulateColWidth;
|
||||
}
|
||||
/* assign height */
|
||||
for (x = 0; x < t->numColumns; x++) {
|
||||
t->table[y * t->numColumns + x].rowHeight =
|
||||
t->table[y * t->numColumns + x].rowHeight =
|
||||
maxHeightOfRow;
|
||||
}
|
||||
}
|
||||
|
||||
/* make sure all widths in a column are the same size */
|
||||
for (x = 0; x < t->numColumns; x++) {
|
||||
maxWidthOfColumn = 0;
|
||||
maxWidthOfColumn = 0;
|
||||
/* find biggest Width for this column */
|
||||
for (y = 0; y < t->numRows; y++) {
|
||||
maxWidthOfColumn = (maxWidthOfColumn >
|
||||
maxWidthOfColumn = (maxWidthOfColumn >
|
||||
t->table[y*t->numColumns+x].colWidth)?
|
||||
maxWidthOfColumn:
|
||||
t->table[y*t->numColumns+x].colWidth;
|
||||
@@ -673,7 +673,7 @@ int accumulateColWidth;
|
||||
t->table[y*t->numColumns+x].colWidth = maxWidthOfColumn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -740,7 +740,7 @@ Boolean expandedSomething;
|
||||
/* check for and take care of previous rowspans */
|
||||
if (rowCount > 1) {
|
||||
/* get field above this one */
|
||||
previousRow = (List) ListGetIndexedEntry(tableList,
|
||||
previousRow = (List) ListGetIndexedEntry(tableList,
|
||||
rowCount - 2);/*zero indexed*/
|
||||
aboveField =(TableField *)ListGetIndexedEntry(previousRow,
|
||||
*columnCount);
|
||||
@@ -837,7 +837,7 @@ Boolean fixed;
|
||||
}
|
||||
m = m->next;
|
||||
}
|
||||
|
||||
|
||||
if (field->header) {
|
||||
field->font = hw->html.plainbold_font;
|
||||
}
|
||||
@@ -904,7 +904,7 @@ char *tptr;
|
||||
while(TableExpandFields(tableList, rowList,
|
||||
rowCount, &columnCount));
|
||||
|
||||
/* if: is this the first container <tr> or the
|
||||
/* if: is this the first container <tr> or the
|
||||
separator */
|
||||
if (ListHead(ListHead(tableList))) {
|
||||
rowList = ListCreate();
|
||||
@@ -1111,8 +1111,8 @@ int yy;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
placeY = y + height/2 +
|
||||
(field->font->max_bounds.ascent
|
||||
placeY = y + height/2 +
|
||||
(field->font->max_bounds.ascent
|
||||
- field->font->max_bounds.descent)/2;
|
||||
*/
|
||||
|
||||
@@ -1158,7 +1158,7 @@ int x,y;
|
||||
x++;
|
||||
if (x < t->numColumns) {
|
||||
/* do width */
|
||||
while ((x < t->numColumns) &&
|
||||
while ((x < t->numColumns) &&
|
||||
t->table[y * t->numColumns + x].contHoriz) {
|
||||
(*expandWidth) += t->table[y * t->numColumns + x].colWidth;
|
||||
x++;
|
||||
@@ -1169,14 +1169,14 @@ int x,y;
|
||||
y++;
|
||||
if (y < t->numRows) {
|
||||
/* do height */
|
||||
while ((y < t->numRows) &&
|
||||
while ((y < t->numRows) &&
|
||||
t->table[y * t->numColumns + x].contVert) {
|
||||
(*expandHeight) += t->table[y * t->numColumns+x].rowHeight;
|
||||
y++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1216,7 +1216,7 @@ int expandedWidth,expandedHeight;
|
||||
if (eptr->table_data->borders){
|
||||
/*
|
||||
XDrawRectangle(XtDisplay(hw), XtWindow(hw->html.view),
|
||||
hw->html.drawGC,
|
||||
hw->html.drawGC,
|
||||
x+(eptr->table_data->borders/2),y+eptr->table_data->borders,
|
||||
eptr->table_data->bwidth,
|
||||
eptr->table_data->bheight);
|
||||
@@ -1237,14 +1237,14 @@ int expandedWidth,expandedHeight;
|
||||
/* draw field borders */
|
||||
if (eptr->table_data->borders){
|
||||
if (!field->contVert) { /* draw above line */
|
||||
XDrawLine(XtDisplay(hw),
|
||||
XDrawLine(XtDisplay(hw),
|
||||
XtWindow(hw->html.view),
|
||||
hw->html.drawGC,
|
||||
/*hw->manager.bottom_shadow_GC,*/
|
||||
vertMarker, horizMarker,
|
||||
vertMarker + colWidth, horizMarker);
|
||||
/*
|
||||
XDrawLine(XtDisplay(hw),
|
||||
XDrawLine(XtDisplay(hw),
|
||||
XtWindow(hw->html.view),
|
||||
hw->manager.top_shadow_GC,
|
||||
vertMarker, horizMarker+1,
|
||||
@@ -1252,7 +1252,7 @@ int expandedWidth,expandedHeight;
|
||||
*/
|
||||
}
|
||||
if (!field->contHoriz) { /* draw left side*/
|
||||
XDrawLine(XtDisplay(hw),
|
||||
XDrawLine(XtDisplay(hw),
|
||||
XtWindow(hw->html.view),
|
||||
hw->html.drawGC,
|
||||
vertMarker, horizMarker,
|
||||
@@ -1272,10 +1272,10 @@ int expandedWidth,expandedHeight;
|
||||
|
||||
vertMarker += colWidth;
|
||||
field++;
|
||||
}
|
||||
}
|
||||
|
||||
horizMarker += rowHeight;
|
||||
}
|
||||
}
|
||||
|
||||
XSetLineAttributes(XtDisplay(hw),
|
||||
hw->html.drawGC,
|
||||
|
@@ -118,7 +118,7 @@ char **ParseCommaList();
|
||||
void FreeCommaList();
|
||||
char *MapOptionReturn();
|
||||
|
||||
static char traversal_table[] =
|
||||
static char traversal_table[] =
|
||||
"\
|
||||
~Shift ~Meta ~Ctrl <Key> Tab: traversal_forward()\n\
|
||||
Shift ~Meta ~Ctrl <Key> Tab: traversal_back()\n\
|
||||
@@ -524,7 +524,7 @@ CollectSubmitInfo(fptr, name_list, value_list)
|
||||
cbdata.attribute_count--;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
/*** cvarela@ncsa.uiuc.edu: August 17, 1994
|
||||
Adding multiple submit buttons support ***/
|
||||
/* mods 3/11/95 -- amb */
|
||||
@@ -1478,7 +1478,7 @@ PrepareFormEnd(hw, w, fptr)
|
||||
FormInfo *fptr;
|
||||
{
|
||||
#ifdef MOTIF
|
||||
XtAddCallback(w, XmNactivateCallback,
|
||||
XtAddCallback(w, XmNactivateCallback,
|
||||
(XtCallbackProc)CBSubmitForm, (caddr_t)fptr);
|
||||
#else
|
||||
XtAddCallback(w, XtNcallback,
|
||||
@@ -1494,7 +1494,7 @@ PrepareFormReset(hw, w, fptr)
|
||||
FormInfo *fptr;
|
||||
{
|
||||
#ifdef MOTIF
|
||||
XtAddCallback(w, XmNactivateCallback,
|
||||
XtAddCallback(w, XmNactivateCallback,
|
||||
(XtCallbackProc)CBResetForm, (caddr_t)fptr);
|
||||
#else
|
||||
XtAddCallback(w, XtNcallback,
|
||||
@@ -2256,9 +2256,9 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
{
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable("<Btn1Down>: Arm() traversal_current()"));
|
||||
}
|
||||
|
||||
@@ -2324,7 +2324,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
w = XmCreateToggleButton(hw->html.view, widget_name,
|
||||
arg, argcnt);
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
|
||||
XtSetMappedWhenManaged(w, False);
|
||||
@@ -2362,7 +2362,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
w = XmCreatePushButton(hw->html.view, widget_name,
|
||||
arg, argcnt);
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
XtSetMappedWhenManaged(w, False);
|
||||
XtManageChild(w);
|
||||
@@ -2400,7 +2400,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
w = XmCreatePushButton(hw->html.view, widget_name,
|
||||
arg, argcnt);
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
XtSetMappedWhenManaged(w, False);
|
||||
XtManageChild(w);
|
||||
@@ -2432,7 +2432,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
w = XmCreatePushButton(hw->html.view, widget_name,
|
||||
arg, argcnt);
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
XtSetMappedWhenManaged(w, False);
|
||||
XtManageChild(w);
|
||||
@@ -2655,7 +2655,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
XtManageChild(button);
|
||||
XmStringFree(label);
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(button,
|
||||
XtOverrideTranslations(button,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
if ((vlist_cnt > 0)&&
|
||||
(vlist[0] != NULL)&&
|
||||
@@ -2688,9 +2688,9 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
XtSetArg(arg[argcnt], XmNx, x); argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNy, y); argcnt++;
|
||||
/* kill margins */
|
||||
XtSetArg(arg[argcnt], XmNmarginWidth, 0);
|
||||
XtSetArg(arg[argcnt], XmNmarginWidth, 0);
|
||||
argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNmarginHeight, 0);
|
||||
XtSetArg(arg[argcnt], XmNmarginHeight, 0);
|
||||
argcnt++;
|
||||
XtSetArg(arg[argcnt], XmNsubMenuId, pulldown);
|
||||
argcnt++;
|
||||
@@ -2714,12 +2714,12 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
widget_name, arg, argcnt);
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
{
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
XtOverrideTranslations(pulldown,
|
||||
XtOverrideTranslations(pulldown,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
}
|
||||
|
||||
|
||||
argcnt = 0;
|
||||
|
||||
xmstr = XmStringCreateSimple ("");
|
||||
@@ -2822,10 +2822,10 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
w = XmCreateList(scroll, widget_name,
|
||||
arg, argcnt);
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
XtManageChild(w);
|
||||
|
||||
|
||||
w = scroll;
|
||||
|
||||
for (i=0; i<list_cnt; i++)
|
||||
@@ -2903,10 +2903,10 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
w = XmCreateTextField(hw->html.view, widget_name,
|
||||
arg, argcnt);
|
||||
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
|
||||
|
||||
|
||||
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
/*
|
||||
* The proper order here is XtSetMappedWhenManaged, XtManageChild. But a bug
|
||||
@@ -3012,9 +3012,9 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
|
||||
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
|
||||
|
||||
|
||||
w = scroll;
|
||||
|
||||
@@ -3061,7 +3061,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
type = W_TEXTAREA;
|
||||
cols = atoi(list[0]);
|
||||
rows = atoi(list[1]);
|
||||
|
||||
|
||||
/* be a textfield if only one row */
|
||||
if(rows==1)
|
||||
type=W_TEXTFIELD;
|
||||
@@ -3117,7 +3117,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
widget_name, arg, argcnt);
|
||||
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
}
|
||||
/*
|
||||
@@ -3158,7 +3158,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
XtManageChild(w);
|
||||
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
|
||||
if(!hw->html.focus_follows_mouse)
|
||||
XtOverrideTranslations(w,
|
||||
XtOverrideTranslations(w,
|
||||
XtParseTranslationTable(traversal_table));
|
||||
|
||||
|
||||
@@ -3216,7 +3216,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
height = 0;
|
||||
}
|
||||
|
||||
wptr = AddNewWidget(hw, fptr, w, type, id, x, y, width,
|
||||
wptr = AddNewWidget(hw, fptr, w, type, id, x, y, width,
|
||||
height, name, value, mapping, checked);
|
||||
}
|
||||
else
|
||||
@@ -3280,7 +3280,7 @@ MakeWidget(hw, text, x, y, id, fptr)
|
||||
WidgetInfo *wptr;
|
||||
Dimension width, height;
|
||||
|
||||
|
||||
|
||||
wlist = hw->html.widget_list;
|
||||
while (wlist != NULL)
|
||||
{
|
||||
@@ -4148,13 +4148,13 @@ unsigned long bp=BlackPixel(XtDisplay(hw),DefaultScreen(XtDisplay(hw)));
|
||||
|
||||
void traversal_forward(Widget w, XEvent *event,
|
||||
String *params, Cardinal *num_params)
|
||||
{
|
||||
{
|
||||
HTMLTraverseTabGroups(w, XmTRAVERSE_NEXT_TAB_GROUP);
|
||||
}
|
||||
|
||||
void traversal_back(Widget w, XEvent *event,
|
||||
String *params, Cardinal *num_params)
|
||||
{
|
||||
{
|
||||
HTMLTraverseTabGroups(w, XmTRAVERSE_PREV_TAB_GROUP);
|
||||
}
|
||||
|
||||
@@ -4227,7 +4227,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
|
||||
top = (Widget) hw;
|
||||
while(!XtIsTopLevelShell(top))
|
||||
top = XtParent(top);
|
||||
|
||||
|
||||
switch(how)
|
||||
{
|
||||
case XmTRAVERSE_NEXT_TAB_GROUP:
|
||||
@@ -4251,7 +4251,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
|
||||
}
|
||||
|
||||
/* automagickly scroll */
|
||||
if(XtIsManaged(hw->html.vbar) &&
|
||||
if(XtIsManaged(hw->html.vbar) &&
|
||||
(lptr->y > (hw->html.view_height+hw->html.scroll_y-10)))
|
||||
{
|
||||
int val, ss, in, pg_in, amount;
|
||||
@@ -4273,7 +4273,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
|
||||
Widget text;
|
||||
XtVaGetValues(lptr->w, XmNworkWindow, &text, NULL);
|
||||
XtSetKeyboardFocus(top, text);
|
||||
}
|
||||
}
|
||||
else
|
||||
XtSetKeyboardFocus(top, lptr->w);
|
||||
break;
|
||||
@@ -4298,7 +4298,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
|
||||
}
|
||||
|
||||
/* automagickly scroll */
|
||||
if(XtIsManaged(hw->html.vbar) &&
|
||||
if(XtIsManaged(hw->html.vbar) &&
|
||||
(lptr->y < hw->html.scroll_y+10))
|
||||
{
|
||||
int val, ss, in, pg_in, amount;
|
||||
@@ -4329,9 +4329,9 @@ void HTMLTraverseTabGroups(Widget w, int how)
|
||||
break;
|
||||
case XmTRAVERSE_CURRENT:
|
||||
lptr = hw->html.widget_list;
|
||||
|
||||
|
||||
/* check parent to allow for text areas (lptr->w would be scroll) */
|
||||
while(lptr!=NULL)
|
||||
while(lptr!=NULL)
|
||||
{
|
||||
if((lptr->w == w) || (lptr->w == XtParent(w)))
|
||||
break;
|
||||
|
@@ -2,7 +2,7 @@ LIBTARGET = libhtmlw.a
|
||||
|
||||
all: $(LIBTARGET)
|
||||
|
||||
CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
|
||||
CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
|
||||
|
||||
OBJS = $(CFILES:.c=.o)
|
||||
$(OBJS): HTML.h HTMLP.h
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# @configure_output@
|
||||
# This file is used by Autoconf to make the real Makefile.
|
||||
# DO NOT EDIT THIS FILE!
|
||||
# If you want to change something do it to the Makefile autoconf
|
||||
# If you want to change something do it to the Makefile autoconf
|
||||
# creates. You should never have to edit this file.
|
||||
|
||||
CC= @CC@
|
||||
@@ -14,7 +14,7 @@ LIBTARGET = libhtmlw.a
|
||||
|
||||
all: $(LIBTARGET)
|
||||
|
||||
CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
|
||||
CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
|
||||
|
||||
OBJS = $(CFILES:.c=.o)
|
||||
$(OBJS): HTML.h HTMLP.h
|
||||
|
@@ -2,7 +2,7 @@ LIBTARGET = libhtmlw.a
|
||||
|
||||
all: $(LIBTARGET)
|
||||
|
||||
CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
|
||||
CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
|
||||
|
||||
OBJS = $(CFILES:.c=.o)
|
||||
$(OBJS): HTML.h HTMLP.h
|
||||
|
@@ -8,18 +8,18 @@
|
||||
** of representatives of Slate Corporation, Lotus Development Corporation,
|
||||
** GO, Microsoft, Apple, General Magic, and others.
|
||||
**
|
||||
** This document and the accompanying code samples on disk comprise Version
|
||||
** 1.0 of the Jot specification for the storage and interchange of electronic
|
||||
** ink data. Permission is granted to incorporate and otherwise use any
|
||||
** portion of the specification. You may make copies of the specification
|
||||
** for distribution to others, provided you include the notice "Copyright
|
||||
** This document and the accompanying code samples on disk comprise Version
|
||||
** 1.0 of the Jot specification for the storage and interchange of electronic
|
||||
** ink data. Permission is granted to incorporate and otherwise use any
|
||||
** portion of the specification. You may make copies of the specification
|
||||
** for distribution to others, provided you include the notice "Copyright
|
||||
** 1993, Slate Corporation. All Rights Reserved" on both the document and
|
||||
** the disk label. You may not modify this specification without written
|
||||
** the disk label. You may not modify this specification without written
|
||||
** permission from Slate Corporation.
|
||||
**
|
||||
** The specification is provided "as is" without warranty of any kind. Slate
|
||||
** further disclaims all implied warranties of merchantability or of fitness
|
||||
** for a particular purpose. The entire risk arising out of the use or
|
||||
** The specification is provided "as is" without warranty of any kind. Slate
|
||||
** further disclaims all implied warranties of merchantability or of fitness
|
||||
** for a particular purpose. The entire risk arising out of the use or
|
||||
** performance of the specification remains with you.
|
||||
**
|
||||
**--------------------------------------------------------------------------
|
||||
@@ -54,10 +54,10 @@
|
||||
** electronic ink data interchange, and neither assumes nor dictates the
|
||||
** nature of how the application deals with ink data internally. The format
|
||||
** is not intended to be the "internal" ink format of an application, though
|
||||
** there is no reason why it could not serve such a purpose.
|
||||
** there is no reason why it could not serve such a purpose.
|
||||
**
|
||||
** The scope and goals of this format design are limited to the represent-
|
||||
** ation of electronic ink data embedded in some other electronic document,
|
||||
** ation of electronic ink data embedded in some other electronic document,
|
||||
** not to the larger document itself (such as an e-mail or enhanced word-
|
||||
** processing data file).
|
||||
**
|
||||
@@ -70,28 +70,28 @@
|
||||
** or sub-strokes, and then storing a list of encodings of these sub-strokes.
|
||||
** In other words, Jot preserves all information about the original input as
|
||||
** opposed attempting any sort of abstract characterization of the input.
|
||||
**
|
||||
**
|
||||
** The storage format has a number of properties:
|
||||
**
|
||||
**
|
||||
** * Simple. Typical operations on the ink data are easy. If you only wish
|
||||
** to read stroke coordinates and bounding information from the data,
|
||||
** complex information that might be present will not hinder the process.
|
||||
** Likewise, it is easy to write out just simple information. The
|
||||
** complex information is all optional.
|
||||
**
|
||||
** * Compact. The storage format is intended to be as compact as possible
|
||||
**
|
||||
** * Compact. The storage format is intended to be as compact as possible
|
||||
** without sacrificing simplicity or fidelity. Optional information such
|
||||
** as time stamps or color specifications occupy space only when they are
|
||||
** present. Specifications that apply to many strokes (such as line width
|
||||
** or color) are represented just once.
|
||||
**
|
||||
**
|
||||
** * Compression. The stroke information that describes the ink can
|
||||
** optionally be represented in a compressed format. Compression
|
||||
** techniques include both compression and reduction of the ink data.
|
||||
**
|
||||
**
|
||||
** * Inclusive. The format is capable of storing every property of ink
|
||||
** conceivable as of today.
|
||||
**
|
||||
** conceivable as of today.
|
||||
**
|
||||
** * Expandable and Compatible. The format is expandable, so as developers
|
||||
** discover new information that should be recorded in an ink storage
|
||||
** format, these new features can be added without changing the behavior of
|
||||
@@ -100,21 +100,21 @@
|
||||
** applications reading older versions of the format. Likewise, new
|
||||
** application programs can handle previous versions of the format without
|
||||
** special work.
|
||||
**
|
||||
**
|
||||
** The format is not designed to easily support lots of in-memory
|
||||
** manipulation of the ink data, such as deleting strokes, changing line
|
||||
** widths, and so on. A format supporting these types of manipulations would
|
||||
** be at odds with the above goals. All the information needed to perform
|
||||
** these manipulations is present in this data format, so an application
|
||||
** might augment this format to facilitate manipulation of the ink data.
|
||||
**
|
||||
**
|
||||
** Applications are likely to use some other format internally for real-time
|
||||
** ink manipulation. Many operating environments provide some internal means
|
||||
** for storing and manipulating ink data, the details of which may be hidden
|
||||
** to some extent from the application designer. Many such real-time data
|
||||
** structures store fewer types of and/or less information (such as not
|
||||
** preserving information about the tablet point data rate) than are covered
|
||||
** in this definition.
|
||||
** in this definition.
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
|
||||
@@ -141,15 +141,15 @@
|
||||
** April 12, 1993 - Release of version 0.99 of the specification. Moved
|
||||
** reference sections 28 and 29 to a separate file called
|
||||
** sample.h
|
||||
** May 01, 1993 - Release of version 1.00 of the specification.
|
||||
** Changed INK_OFFSET_RECORD units from twips to pen
|
||||
** May 01, 1993 - Release of version 1.00 of the specification.
|
||||
** Changed INK_OFFSET_RECORD units from twips to pen
|
||||
** units for consistency and ease of implementation.
|
||||
** Fixed a typo in reference section 26.0 in the diagram.
|
||||
** The text accompanying the diagram was correct.
|
||||
** Fixed a typo in reference section 27.0. The old text
|
||||
** "delta-X == 0 or 1" was replaced with the correct text
|
||||
** "delta-X == 2". The accompanying diagram was correct.
|
||||
** Removed all sizeof() constructs and replaced with
|
||||
** Removed all sizeof() constructs and replaced with
|
||||
** appropriate #defines to reduce compiler dependencies.
|
||||
** Tagged all struct definitions with tag_ prefix.
|
||||
** Added comments and reordered some existing comments.
|
||||
@@ -171,12 +171,12 @@
|
||||
** storage of point data in "standard compression" format. Sign bits are
|
||||
** used to indicate item types, so the bytes are stored high-order to low-
|
||||
** order (exactly opposite). See the sample code and reference section 23.0
|
||||
** for more information on the compressed format. Uncompressed data is
|
||||
** for more information on the compressed format. Uncompressed data is
|
||||
** written in Intel order.
|
||||
**
|
||||
** All structures are packed for the purposes of writing to a stream.
|
||||
**
|
||||
** Signed integer values are two's-complement. Rectangles are stored
|
||||
**
|
||||
** Signed integer values are two's-complement. Rectangles are stored
|
||||
** x,y,w,h.
|
||||
**
|
||||
** These definitions are intended to insulate the sample ink compaction and
|
||||
@@ -193,13 +193,13 @@
|
||||
** Record Sequence
|
||||
** ---------------
|
||||
**
|
||||
** In this document, one piece of ink data is called an ink bundle.
|
||||
** In this document, one piece of ink data is called an ink bundle.
|
||||
** Typically this might correspond to the strokes that make up the ink from
|
||||
** the time when the pen touches down until the user finishes writing
|
||||
** (usually determined by a timeout or the pen leaving proximity). Thus an
|
||||
** ink bundle usually contains many ink strokes, and the strokes do not have
|
||||
** to describe a continuous line of ink.
|
||||
**
|
||||
**
|
||||
** As stated in reference section 5.0, all data conforming to this
|
||||
** specification appears as a stream of ink bundles each of which must begin
|
||||
** with an INK_BUNDLE_RECORD and end with an INK_END_RECORD. There may be
|
||||
@@ -215,7 +215,7 @@
|
||||
** INK_GROUP_RECORD optional // tags the following PENDATA
|
||||
** INK_PENDATA_RECORD recommended // actual points
|
||||
** INK_GROUP_RECORD optional // tags the following PENDATA
|
||||
** INK_PENDATA_RECORD recommended // actual points
|
||||
** INK_PENDATA_RECORD recommended // actual points
|
||||
** INK_PENDATA_RECORD recommended // more points in same group
|
||||
** INK_SCALE_RESET_RECORD optional // resets to default scaling/offset
|
||||
** INK_PENDATA_RECORD recommended // actual points
|
||||
@@ -223,32 +223,32 @@
|
||||
** INK_END_RECORD required // end of bundle number one
|
||||
**
|
||||
** It is perfectly reasonable to write out only the following (though doing
|
||||
** so will cause the ink to be rendered in a completely default manner --
|
||||
** so will cause the ink to be rendered in a completely default manner --
|
||||
** black hairline width at 1:1 scaling with offset 0):
|
||||
**
|
||||
** INK_BUNDLE_RECORD
|
||||
** INK_PENDATA_RECORD
|
||||
** INK_END_RECORD
|
||||
**
|
||||
**
|
||||
**
|
||||
** Specification Revisions
|
||||
** -----------------------
|
||||
**
|
||||
** Future enhancements to this specification may modify certain record types.
|
||||
** It is guaranteed that any record modified in a subsequent revision of the
|
||||
** specification will be a strict superset of that record's definition in any
|
||||
** previous revision of the specification. That is, modified record types
|
||||
** will only be lengthened, not shortened. If a particular record type must
|
||||
** be extended such that it would not be a superset of the original, a new
|
||||
** record type would be added to cover that particular extension.
|
||||
**
|
||||
** This extension strategy has two important ramifications:
|
||||
**
|
||||
** 1) A reading application should *ALWAYS* use the size of a record as
|
||||
** Future enhancements to this specification may modify certain record types.
|
||||
** It is guaranteed that any record modified in a subsequent revision of the
|
||||
** specification will be a strict superset of that record's definition in any
|
||||
** previous revision of the specification. That is, modified record types
|
||||
** will only be lengthened, not shortened. If a particular record type must
|
||||
** be extended such that it would not be a superset of the original, a new
|
||||
** record type would be added to cover that particular extension.
|
||||
**
|
||||
** This extension strategy has two important ramifications:
|
||||
**
|
||||
** 1) A reading application should *ALWAYS* use the size of a record as
|
||||
** recorded in the record structure itself (i.e., the recordLength field
|
||||
** of the INK_RECORD_HEADERx structure) rather than the sizeof() or any
|
||||
** other size determined at compile time to determine how may bytes to
|
||||
** read as the data structures are parsed. This is due to the fact that
|
||||
** other size determined at compile time to determine how may bytes to
|
||||
** read as the data structures are parsed. This is due to the fact that
|
||||
** a record may grow in a future revision of the standard. The only
|
||||
** exception to this rule is the INK_BUNDLE_RECORD which contains a
|
||||
** version number that will be modified with each change to that record.
|
||||
@@ -256,17 +256,17 @@
|
||||
** version used at compile time, the size of the record should exactly
|
||||
** match the #define of inkRecordBundleSize.
|
||||
**
|
||||
** 2) Any particular record may be read into a target data structure up to
|
||||
** the size of the target data structure and the rest may be ignored.
|
||||
** This is due to the 'strict superset' rule which means that any
|
||||
** 2) Any particular record may be read into a target data structure up to
|
||||
** the size of the target data structure and the rest may be ignored.
|
||||
** This is due to the 'strict superset' rule which means that any
|
||||
** extension of any record type must leave the meaning, content, and size
|
||||
** of any existing fields as is. So, for example, if an INK_SCALE_RECORD
|
||||
** was modified by adding 2 bytes, the reading application can safely read
|
||||
** the data into the INK_SCALE_RECORD known at compile time and throw
|
||||
** away the extra two bytes: the header, x, and y will be in the same
|
||||
** away the extra two bytes: the header, x, and y will be in the same
|
||||
** place and will have the same meaning.
|
||||
**
|
||||
**
|
||||
**
|
||||
** Files of Ink
|
||||
** ------------
|
||||
**
|
||||
@@ -386,14 +386,14 @@ typedef struct tag_XY16 {
|
||||
} XY16, FAR *P_XY16;
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** Note:
|
||||
** Note:
|
||||
** Angles from vertical can exceed +-90 degrees: in this case, the "back" end
|
||||
** of the stylus is nearer the tablet surface than the "front" end.
|
||||
**-------------------------------------------------------------------------*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** Note:
|
||||
** Standard compaction will normally store angles in nibbles, or single
|
||||
** Note:
|
||||
** Standard compaction will normally store angles in nibbles, or single
|
||||
** bytes, rather than in four-byte records.
|
||||
**-------------------------------------------------------------------------*/
|
||||
|
||||
@@ -505,7 +505,7 @@ typedef U16 INK_RECORD_TYPE, FAR *P_INK_RECORD_TYPE;
|
||||
)
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** Note: most compilers will not generate code for the above macro but will
|
||||
** Note: most compilers will not generate code for the above macro but will
|
||||
** determine the proper value at compile time.
|
||||
**-------------------------------------------------------------------------*/
|
||||
|
||||
@@ -598,7 +598,7 @@ typedef struct tag_INK_RECORD_HEADER32 {
|
||||
** the following minimum requirements:
|
||||
**
|
||||
** 1) header.recordType == INK_RECORD_BUNDLE
|
||||
** 2) header.recordLength >= inkRecordBundleSize (See general notes in
|
||||
** 2) header.recordLength >= inkRecordBundleSize (See general notes in
|
||||
** reference section 1.0 for important information about record sizes.)
|
||||
** 3) compactionType is an expected and supported value
|
||||
** 4) penUnitsPerX and penUnitsPerY seem reasonable and expected:
|
||||
@@ -628,7 +628,7 @@ typedef struct tag_INK_END_RECORD {
|
||||
** data, while smaller, is still whole. That is, compression under Jot is
|
||||
** loss-less. Compaction refers to a process where certain pieces of less
|
||||
** important data are actually omitted from the stream and are possibly
|
||||
** reconstructed by the reader of the data.
|
||||
** reconstructed by the reader of the data.
|
||||
**
|
||||
** Using Jot, a writing application may choose to compress only, compact only
|
||||
** or use some combination. The standard compression mechanism defined here
|
||||
@@ -654,13 +654,13 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
|
||||
/*************************/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** The INK_BUNDLE_FLAGS contain some flags that apply to an entire bundle.
|
||||
** The INK_BUNDLE_FLAGS contain some flags that apply to an entire bundle.
|
||||
** If you wanted to store several pieces of ink that had different
|
||||
** INK_BUNDLE_FLAGS, you would do it by storing several different bundles.
|
||||
**
|
||||
** Advisory flags:
|
||||
**
|
||||
** inkPointsRemoved
|
||||
** inkPointsRemoved
|
||||
** Indicates whether all original points are still present or whether
|
||||
** some points were removed to save space. For applications that are
|
||||
** only interested in the visual aspects of ink, many points can be
|
||||
@@ -677,12 +677,12 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
|
||||
** replacing individual points with an "elided point" item does not
|
||||
** constitute removing points. ("Elided" means omitted or skipped).
|
||||
**
|
||||
** inkProxDataRemoved
|
||||
** inkProxDataRemoved
|
||||
** Indicates that the original points between strokes (proximity) were
|
||||
** removed to save space. An out-of-prox point should be stored between
|
||||
** strokes to delimit them. Some applications depend on knowing the
|
||||
** time between strokes or at the ends of strokes for certain
|
||||
** functions.
|
||||
** functions.
|
||||
**
|
||||
** Note:
|
||||
** "Proximity" is defined as the stylus being close enough to the tablet
|
||||
@@ -691,17 +691,17 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
|
||||
** recommended practice is to include "out of proximity" points in the
|
||||
** recorded ink data when they are used as part of determining the
|
||||
** amount of time a stylus was out of contact with the tablet, or for
|
||||
** triggering the completion of an action such as a "gesture".
|
||||
** triggering the completion of an action such as a "gesture".
|
||||
**
|
||||
** inkStrokeLimitsPresent
|
||||
** inkStrokeLimitsPresent
|
||||
** Indicates that INK_BUTTONS items are also present, and that they
|
||||
** indicate what the storing app decided the stroke start/end points
|
||||
** were. (Note: the reading application may otherwise use a different
|
||||
** algorithm for using tip force values to delimit strokes.)
|
||||
** algorithm for using tip force values to delimit strokes.)
|
||||
**
|
||||
** Note:
|
||||
** If inkStrokeLimitsPresent is set, then inkButtonDataPresent must also
|
||||
** be set.
|
||||
** be set.
|
||||
**
|
||||
** Data flags:
|
||||
**
|
||||
@@ -716,7 +716,7 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
|
||||
** the offset value is added ("pre-multiply")
|
||||
** rather than after ("post-multiply")
|
||||
**
|
||||
** Note:
|
||||
** Note:
|
||||
** A previous draft version included a provision for compacting data to an
|
||||
** approximation based on Bezier curves. Initial results did not show
|
||||
** promise in terms of efficiency and performance.
|
||||
@@ -728,7 +728,7 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
|
||||
** not be used directly to render the data. The definition of these anchor
|
||||
** and control points, and the example code for the approximation and
|
||||
** regeneration of the "true" coordinates could not be worked out at this
|
||||
** time.
|
||||
** time.
|
||||
**
|
||||
** Some standard values for pen units per meter follow:
|
||||
**
|
||||
@@ -742,7 +742,7 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
|
||||
**
|
||||
** The specific format for each of these types of data is described in the
|
||||
** INK_PENDATA_RECORD documentation (reference section 8.0).
|
||||
**
|
||||
**
|
||||
** Note:
|
||||
** The order in which these flags are defined has nothing to do with the
|
||||
** order in which the data appears in the INK_POINT structure when reading
|
||||
@@ -798,7 +798,7 @@ typedef struct tag_INK_BUNDLE_RECORD {
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** A penData record contains the actual pen data for one or more pen strokes.
|
||||
** The bounds applies to all the strokes contained within this record.
|
||||
** The bounds applies to all the strokes contained within this record.
|
||||
** Multiple strokes are typically grouped into one record to increase the
|
||||
** efficiency of the compression algorithm, though strokes may be stored
|
||||
** individually, if desired.
|
||||
@@ -823,7 +823,7 @@ typedef struct tag_INK_BUNDLE_RECORD {
|
||||
** written by other applications that might group multiple strokes
|
||||
** into a single INK_PENDATA_RECORD.
|
||||
**
|
||||
** Note:
|
||||
** Note:
|
||||
** In practice, our experience is that unpacking the data in order to compute
|
||||
** the bounds for each stroke to check for strokes that intrude into a given
|
||||
** region is not an excessive burden. The checks that would have been done
|
||||
@@ -860,31 +860,31 @@ typedef struct tag_INK_PENDATA_RECORD {
|
||||
** of one) is represented as 0x00010000, a scale of 0.5 as 0x00008000.
|
||||
**
|
||||
** Note:
|
||||
** All ink is located relative to the lower-left (0,0) corner of a logical
|
||||
** page or window. Scale and offset operations are cumulative, much in the
|
||||
** All ink is located relative to the lower-left (0,0) corner of a logical
|
||||
** page or window. Scale and offset operations are cumulative, much in the
|
||||
** same way as in PostScript. One begins with a normalized graphics state
|
||||
** and sequentially applies the scale and offset operations to that matrix.
|
||||
** and sequentially applies the scale and offset operations to that matrix.
|
||||
** The INK_SCALE_RESET record returns the graphics state to its default state
|
||||
** (i.e., the transformation matrix is set to an identity matrix and the
|
||||
** offset is reset to the default of 0). By default, scaling is applied
|
||||
** after adding in any offset specified in an INK_OFFSET_RECORD. If the ink
|
||||
** bundle has the inkPreMultiplyScale bit set, for all ink in that bundle
|
||||
** scaling is applied before adding in any offset.
|
||||
**
|
||||
**
|
||||
** As used in this format, ink scale and offset values are set by the storing
|
||||
** application, to be applied by the rendering application. If the storing
|
||||
** application collected the ink at scales of (2.0,2.0), the storing
|
||||
** application should insert an INK_SCALE_RECORD with a scale of (0.5,0.5)
|
||||
** for the rendering application to multiply all ink X and Y coordinates by.
|
||||
**
|
||||
** It is the responsibility of the storing application to deal with any
|
||||
** It is the responsibility of the storing application to deal with any
|
||||
** effects from round-off or truncation error due to the limits of precision
|
||||
** in the FIXED_FRACTION values used in INK_SCALE_RECORDs.
|
||||
**
|
||||
** An ink scale record indicates a scale change that stays in effect until
|
||||
** another ink scale record is encountered. Ink scale values compound: if
|
||||
** the current scale is (2.0,2.0) and an INK_SCALE_RECORD is encountered with
|
||||
** scale of (2.0,3.0), the scale to be applied to ink then becomes(4.0,6.0).
|
||||
** scale of (2.0,3.0), the scale to be applied to ink then becomes(4.0,6.0).
|
||||
** In absence of any ink scale record, the default ink scale is unity. In
|
||||
** general, a typical usage pattern for an application that supports drawing
|
||||
** ink while zoomed at scale is to record a number of strokes at a given
|
||||
@@ -940,10 +940,10 @@ typedef struct tag_INK_SCALE_RECORD {
|
||||
** would have an offset position, markup ink over an entire form would not
|
||||
** have a offset position (or would have an offset position of (0,0) and a
|
||||
** scale of (1,1)) because it is relative to the entire form coordinate
|
||||
** system, not relative to some piece in the form.
|
||||
** system, not relative to some piece in the form.
|
||||
**
|
||||
** Note:
|
||||
** This approach allows a reader to "blindly" apply the scale and offset
|
||||
** This approach allows a reader to "blindly" apply the scale and offset
|
||||
** values specified to ink data, and puts the burden for computing
|
||||
** compounding of multiple zoom levels, etc., on the writing application.
|
||||
**
|
||||
@@ -993,10 +993,10 @@ typedef struct tag_INK_SCALE_RESET_RECORD {
|
||||
** "erase" function, such as the ability to erase annotation ink on an
|
||||
** "original" document (perhaps a FAX image) the "erase" color restores the
|
||||
** background image where painted. The "background image" is defined by the
|
||||
** rendering application.
|
||||
** rendering application.
|
||||
**
|
||||
** Applications which do not support a true "erase" function may interpret
|
||||
** this as some other drawing function, such as drawing the "background"
|
||||
** this as some other drawing function, such as drawing the "background"
|
||||
** color.
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
@@ -1022,8 +1022,8 @@ typedef struct tag_INK_COLOR_RECORD {
|
||||
/*-------------------------------------------------------------------------
|
||||
** Standardized opacity values:
|
||||
** A recommended practice is that an opacity value of 128 (midway between
|
||||
** 0 and 255) be used for "highlighter" colors. A recommended practice is
|
||||
** that grey values as defined below be used for "standard grey"
|
||||
** 0 and 255) be used for "highlighter" colors. A recommended practice is
|
||||
** that grey values as defined below be used for "standard grey"
|
||||
** highlighters.
|
||||
**-------------------------------------------------------------------------*/
|
||||
|
||||
@@ -1055,7 +1055,7 @@ typedef struct tag_INK_COLOR_RECORD {
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** Time is measured in milliseconds.
|
||||
**
|
||||
**
|
||||
** Note:
|
||||
** Because of the difficulty synchronizing clocks on different machines
|
||||
** at the time granularity of digitizing tablets, and because the "editing"
|
||||
@@ -1069,12 +1069,12 @@ typedef struct tag_INK_COLOR_RECORD {
|
||||
** End time records are not required. The interpretation of an end time
|
||||
** which is in conflict with the end time inferred from the assumed data rate
|
||||
** of points and the number of points (including elided points) is not
|
||||
** defined.
|
||||
** defined.
|
||||
**
|
||||
** Start time is the time for the first point in the following penData record
|
||||
** and end time is the time of the last point in the following penData
|
||||
** record, because if you are recording tip force, the exact definition of
|
||||
** pen up and pen down may be fuzzy and/or application dependent.
|
||||
** pen up and pen down may be fuzzy and/or application dependent.
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
|
||||
@@ -1107,7 +1107,7 @@ typedef struct tag_INK_END_TIME_RECORD {
|
||||
/*-------------------------------------------------------------------------
|
||||
** INK_PENDATA_RECORDs can be grouped. If they are grouped, each
|
||||
** INK_PENDATA_RECORD can be assigned a group number. All
|
||||
** INK_PENDATA_RECORDs with the same group number belong to the same group.
|
||||
** INK_PENDATA_RECORDs with the same group number belong to the same group.
|
||||
**
|
||||
** The exact interpretation of grouping is up the applications involved.
|
||||
** Writing applications may group ink data, but not all reading applications
|
||||
@@ -1156,7 +1156,7 @@ typedef struct tag_INK_GROUP_RECORD {
|
||||
/**************************/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** Some applications may support the idea of rendering ink as if it were
|
||||
** Some applications may support the idea of rendering ink as if it were
|
||||
** drawn by a certain shaped pen tip. The most common pen tips would be
|
||||
** round or rectangular. The exact details of how to render a given pen
|
||||
** tip will be application specific, but this record states what pen tip
|
||||
@@ -1169,15 +1169,15 @@ typedef struct tag_INK_GROUP_RECORD {
|
||||
** at the end of the structure.
|
||||
**
|
||||
** The writing application should be aware that the reading application will
|
||||
** only do "the best possible" job of rendering and that fully compliant
|
||||
** only do "the best possible" job of rendering and that fully compliant
|
||||
** reading applications may not be able to render certain nib types and/or
|
||||
** colors. Both reading and writing applications should pay particular
|
||||
** attention to the following notes regarding defaults and ink drawn at a
|
||||
** width of zero.
|
||||
**
|
||||
**
|
||||
** A pen tip which is drawing ink in zero width renders at the minimum
|
||||
** visible width the reading application will support.
|
||||
**
|
||||
**
|
||||
** A recommended practice is that ink which should not render (should this
|
||||
** be called for) be drawn with a color value of (0,0,0, 0), i.e., black,
|
||||
** completely transparent.
|
||||
@@ -1185,14 +1185,14 @@ typedef struct tag_INK_GROUP_RECORD {
|
||||
** Pen tip size should scale when an INK_SCALE_RECORD is encountered. The
|
||||
** writing application should write a new INK_PENTIP_RECORD after an
|
||||
** INK_SCALE_RECORD if the writing application does not want the pen tip
|
||||
** size to scale along with the ink. If the pen tip scales to zero width,
|
||||
** size to scale along with the ink. If the pen tip scales to zero width,
|
||||
** it should be rendered by the reading application according to the comment
|
||||
** above.
|
||||
**
|
||||
** The default pen tip if no pentip record exists is INK_PENTIP_ROUND, with a
|
||||
** width of one twip. The dimensions of a round nib specify diameter, not
|
||||
** radius: the X/Y coordinate is the center of this diameter. Similarly, for
|
||||
** for rectangular nibs, the X/Y coordinate is the center of the rectangle.
|
||||
** for rectangular nibs, the X/Y coordinate is the center of the rectangle.
|
||||
**
|
||||
** Note:
|
||||
** This specification does not specify information for an algorithmic
|
||||
@@ -1201,7 +1201,7 @@ typedef struct tag_INK_GROUP_RECORD {
|
||||
** application to draw wider ink as the user presses down harder with the
|
||||
** stylus. Applications wishing to implement such features may do so using
|
||||
** application-specific record types for this revision of the specification.
|
||||
**
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
|
||||
typedef S16 INK_PENTIP, FAR *P_INK_PENTIP;
|
||||
@@ -1248,7 +1248,7 @@ typedef struct tag_INK_PENTIP_RECORD {
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** For some applications, it will be important to know the sampling rate of
|
||||
** the pen digitizer.
|
||||
** the pen digitizer.
|
||||
**
|
||||
** This record would likely be present once in a bundle and would typically
|
||||
** be after the INK_BUNDLE_RECORD, but before the first pen data.
|
||||
@@ -1259,7 +1259,7 @@ typedef struct tag_INK_PENTIP_RECORD {
|
||||
** ink at the specified rate. It is likely that most types of rendering
|
||||
** applications will render ink as rapidly as possible to construct a display
|
||||
** in minimum time, and that some types of animation applications will
|
||||
** intentionally set an arbitrary sampling rate to vary the display rate.
|
||||
** intentionally set an arbitrary sampling rate to vary the display rate.
|
||||
**
|
||||
** Note:
|
||||
** For hardware which supports a highly variable sampling rate, the writing
|
||||
@@ -1328,15 +1328,15 @@ typedef struct tag_INK_UNITS_PER_Z_RECORD {
|
||||
** start and end are likely to differ, a recommended practice for writing
|
||||
** applications that use the tip force value to determine the "touch" points
|
||||
** in a stroke is to mark those points using the touch bit in the INK_BUTTONS
|
||||
** structure.
|
||||
** structure.
|
||||
**
|
||||
** It is also recommended that vendors supporting tip force sensing in their
|
||||
** hardware linearize their transducers to the greatest extent possible.
|
||||
** hardware linearize their transducers to the greatest extent possible.
|
||||
**
|
||||
** Because of the likelihood that tip force transducers may not be accurately
|
||||
** linearized, negative tip force values, while perhaps somewhat absurd
|
||||
** are possible and are permitted in this specification.
|
||||
**
|
||||
** are possible and are permitted in this specification.
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct tag_INK_UNITS_PER_FORCE_RECORD {
|
||||
@@ -1366,8 +1366,8 @@ typedef struct tag_INK_UNITS_PER_FORCE_RECORD {
|
||||
** subRecordTypes that they wish to use. Then, using these subRecordTypes
|
||||
** they can put a wide variety of information into the file. By examining
|
||||
** the appData signature and comparing it to theirs, an application can
|
||||
** decide whether it knows how to interpret the various subRecordtypes.
|
||||
**
|
||||
** decide whether it knows how to interpret the various subRecordtypes.
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct tag_INK_APP_RECORD {
|
||||
@@ -1393,16 +1393,16 @@ typedef struct tag_INK_APP_RECORD {
|
||||
** Uncompacted point format:
|
||||
** -------------------------
|
||||
**
|
||||
** This structure immediately follows the rest of the INK_PENDATA_RECORD.
|
||||
** This structure immediately follows the rest of the INK_PENDATA_RECORD.
|
||||
** The structure has several optional components, present or not present as
|
||||
** indicated by the INK_BUNDLE_FLAGS in the INK_BUNDLE_RECORD. The format is
|
||||
** a sequence of "point values", each containing all the scalar data for each
|
||||
** sampled tablet point.
|
||||
**
|
||||
** sampled tablet point.
|
||||
**
|
||||
** In the uncompacted format, there is a single structure that contains all
|
||||
** of the state information for each point from the tablet. Components not
|
||||
** present (as indicated by the INK_BUNDLE_FLAGS) are just that: not present,
|
||||
** do not exist, do not occupy space.
|
||||
** do not exist, do not occupy space.
|
||||
**
|
||||
** Compacted point format:
|
||||
** -----------------------
|
||||
@@ -1416,7 +1416,7 @@ typedef struct tag_INK_APP_RECORD {
|
||||
** force data, and explicit starts and ends of strokes: the starts and ends
|
||||
** of the strokes are then points that were considered to be such by the
|
||||
** original application storing the data. The INK_BUTTONS record reflects
|
||||
** the state of the next X/Y point following.
|
||||
** the state of the next X/Y point following.
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
|
||||
@@ -1493,12 +1493,12 @@ typedef U32 INK_BUTTONS, FAR * P_INK_BUTTONS;
|
||||
/**************************/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** INK_POINT data. The INK_POINT structure varies in size depending on
|
||||
** INK_POINT data. The INK_POINT structure varies in size depending on
|
||||
** flags set in the bundle header. The XY32 position is always present, but
|
||||
** the force, rho, height, angle, and buttons members are only present when
|
||||
** indicated by the corresponding flag in the bundle header. When optional
|
||||
** data is present, it is present in the order defined by this structure;
|
||||
** that is, position, force, height, rho, angle, and finally buttons.
|
||||
** that is, position, force, height, rho, angle, and finally buttons.
|
||||
**
|
||||
** The INK_POINT structure has the following elements:
|
||||
**
|
||||
@@ -1511,20 +1511,20 @@ typedef U32 INK_BUTTONS, FAR * P_INK_BUTTONS;
|
||||
** height - optional, present if inkHeightDataPresent is asserted
|
||||
** Units are in pen unitsPerZ as specified by inkPointDefaultUnitsPerZ or
|
||||
** by an INK_UNITS_PER_Z_RECORD, whichever is appropriate. Units increase
|
||||
** as the stylus is taken away from the tablet. Zero means "just in
|
||||
** as the stylus is taken away from the tablet. Zero means "just in
|
||||
** contact". Negative values could possibly result from spring action if
|
||||
** the stylus is pressed hard, or if the tablet is not perfectly accurate.
|
||||
** rho - optional, present if inkRotationDataPresent is asserted
|
||||
** Angles are measured in degrees from some nominal orientation of
|
||||
** "stylus button on top" (somewhat arbitrary). Angles increase with
|
||||
** Angles are measured in degrees from some nominal orientation of
|
||||
** "stylus button on top" (somewhat arbitrary). Angles increase with
|
||||
** clockwise rotation as seen from the rear end of the stylus.
|
||||
** angle - optional, present if inkAngleDataPresent is asserted
|
||||
** Angles are measured in pen angle units from the vertical. Theta
|
||||
** Angles are measured in pen angle units from the vertical. Theta
|
||||
** increases in the positive-X direction, phi in the positive-Y.
|
||||
** buttons - optional, present if inkButtonDataPresent is asserted
|
||||
**
|
||||
**
|
||||
** When the INK_BUNDLE_RECORD member compactionType is inkStdCompression,
|
||||
** all data in this structure is compressed according to the methods
|
||||
** all data in this structure is compressed according to the methods
|
||||
** described in reference section 23.0. For more details on how to interpret
|
||||
** the compressed data stream, see the sample code. The bundle flags which
|
||||
** indicate whether a particular piece of data is present are used regardless
|
||||
@@ -1532,12 +1532,12 @@ typedef U32 INK_BUTTONS, FAR * P_INK_BUTTONS;
|
||||
** in compressed format, it is NOT written in Intel order but rather most
|
||||
** significant byte first. In compressed form, some of the eight bit delta
|
||||
** values are reserved for button data and elided (skipped) point counts.
|
||||
** This has two important ramifications. 1) When expecting a point,
|
||||
** This has two important ramifications. 1) When expecting a point,
|
||||
** compacted button data or elided point data may be encountered instead, and
|
||||
** 2) when the inkButtonDataPresent flag is asserted in the bundle header,
|
||||
** button data will appear in the place of a point and not in addition to a
|
||||
** point. If inkButtonDataPresent is not asserted, the reader need not check
|
||||
** the point data for the special case of button data; however, the point
|
||||
** the point data for the special case of button data; however, the point
|
||||
** data must still be checked to see if it is a count of elided points rather
|
||||
** than an actual point.
|
||||
**
|
||||
@@ -1561,7 +1561,7 @@ typedef struct tag_INK_POINT {
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
** The following default values are assumed before the start of any
|
||||
** The following default values are assumed before the start of any
|
||||
** INK_BUNDLE:
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
@@ -1587,7 +1587,7 @@ typedef struct tag_INK_POINT {
|
||||
**
|
||||
** A recommended practice is always to use the compacted point format, not
|
||||
** the uncompacted point format. Sample code for reading and writing the
|
||||
** compacted format is included in an appendix.
|
||||
** compacted format is included in an appendix.
|
||||
**
|
||||
** This structure also immediately follows the rest of the
|
||||
** INK_PENDATA_RECORD.
|
||||
@@ -1601,10 +1601,10 @@ typedef struct tag_INK_POINT {
|
||||
** The storing application, as an alternative to eliminating points, can
|
||||
** specify a "skip" record for elided points. The skipRecord indicates that
|
||||
** a number of points were skipped, and the reading application is free to
|
||||
** insert values for the elided points (interpolating where appropriate).
|
||||
** insert values for the elided points (interpolating where appropriate).
|
||||
** The intent is to allow for accurate time information to be maintained
|
||||
** between time stamps for synchronization with recorded voice, press-hold
|
||||
** gesture recognition, etc.
|
||||
** gesture recognition, etc.
|
||||
**
|
||||
** Compacted data is written most significant byte first so that reading
|
||||
** applications can read the first byte and determine (from the top two bits)
|
||||
@@ -1618,9 +1618,9 @@ typedef struct tag_INK_POINT {
|
||||
** and MAX_S7. Similarly, the reserved encoding for 8 bit deltas are all 8
|
||||
** bit delta pairs where both X and Y are within the inclusive range MIN_S3
|
||||
** and MAX_S3. In revision 1.0 of Jot, three of the reserved encodings for 8
|
||||
** bit deltas are used for special cases: skip counts (reference section
|
||||
** bit deltas are used for special cases: skip counts (reference section
|
||||
** 27.0) and button changes (reference section 26.0).
|
||||
**
|
||||
**
|
||||
** x/y position:
|
||||
** ------------
|
||||
**
|
||||
@@ -1744,7 +1744,7 @@ typedef struct tag_INK_POINT {
|
||||
** |1|0|(S3 delta-theta)|(S3 delta-phi)|
|
||||
** -------------------------------------
|
||||
**
|
||||
** Note:
|
||||
** Note:
|
||||
** Leading bit values of |1|1| are reserved
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
@@ -1760,16 +1760,16 @@ typedef struct tag_INK_POINT {
|
||||
** Since the X/Y data is always present, we use some of the reserved delta
|
||||
** encodings to encode button states and elided (skipped) points. We use the
|
||||
** 8-bit delta encodings that are unused: the values that can fit into the
|
||||
** smaller 4-bit delta encodings.
|
||||
** smaller 4-bit delta encodings.
|
||||
**
|
||||
** Button/tip records:
|
||||
** ------------------
|
||||
**
|
||||
** It is assumed that the state of barrel buttons and the touching sensor on
|
||||
** the stylus change infrequently. A compacted button/tip record is only
|
||||
** included when the state changes in one of the switches. The button state
|
||||
** value applies to the X/Y point immediately following the button state
|
||||
** record.
|
||||
** included when the state changes in one of the switches. The button state
|
||||
** value applies to the X/Y point immediately following the button state
|
||||
** record.
|
||||
**
|
||||
**
|
||||
** (Taken from 8-bit byte delta X/Y: two bytes total)
|
||||
@@ -1779,7 +1779,7 @@ typedef struct tag_INK_POINT {
|
||||
** (delta-X) (delta-Y)
|
||||
**
|
||||
** An eight-bit delta with delta-X == 0 or 1, and delta-Y in the range
|
||||
** (-4..3) indicates a button state encoding.
|
||||
** (-4..3) indicates a button state encoding.
|
||||
**
|
||||
** It is likely to be the case that many hardware platforms have only one
|
||||
** barrel button.
|
||||
@@ -1794,10 +1794,10 @@ typedef struct tag_INK_POINT {
|
||||
**
|
||||
** The lowest order bit of the delta-X bits is used to indicate that
|
||||
** additional bytes follow: "1" indicates that the next byte is used for the
|
||||
** next 7 barrel buttons with state. The high order bit of each sequential
|
||||
** next 7 barrel buttons with state. The high order bit of each sequential
|
||||
** byte in the series is "1" if an additional byte must be fetched, "0"
|
||||
** otherwise. In these additional bytes, the additional buttons are
|
||||
** associated in order starting with the low-order bit.
|
||||
** otherwise. In these additional bytes, the additional buttons are
|
||||
** associated in order starting with the low-order bit.
|
||||
**
|
||||
**------------------------------------------------------------------------*/
|
||||
|
||||
@@ -1825,10 +1825,10 @@ typedef struct tag_INK_POINT {
|
||||
** skip count value.
|
||||
**
|
||||
** The elided points are points removed between the point immediately prior
|
||||
** to the skipped-point record and the point immediately afterward. This
|
||||
** implies that at least one point must follow every skip record (though
|
||||
** to the skipped-point record and the point immediately afterward. This
|
||||
** implies that at least one point must follow every skip record (though
|
||||
** the point may not appear next in the stream if there are intervening
|
||||
** button state transitions). Reading applications that are interested in
|
||||
** button state transitions). Reading applications that are interested in
|
||||
** recovering elided points will typically interpolate. Skip counts of zero
|
||||
** are meaningless and not permitted.
|
||||
**
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* Permission is granted to copy and distribute source with out fee.
|
||||
* Commercialization of this product requires prior licensing
|
||||
* from the National Center for Supercomputing Applications of the
|
||||
* University of Illinois. Commercialization includes the integration of this
|
||||
* code in part or whole into a product for resale. Free distribution of
|
||||
* unmodified source and use of NCSA software is not considered
|
||||
* University of Illinois. Commercialization includes the integration of this
|
||||
* code in part or whole into a product for resale. Free distribution of
|
||||
* unmodified source and use of NCSA software is not considered
|
||||
* commercialization.
|
||||
*
|
||||
*/
|
||||
@@ -18,7 +18,7 @@
|
||||
* list contains pointers to the head, tail, and current list position.
|
||||
* the list itsself is doubly linked with both next and previous pointers.
|
||||
*
|
||||
* ddt
|
||||
* ddt
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "listP.h"
|
||||
@@ -166,7 +166,7 @@ struct LISTINSTANCE *m;
|
||||
FREE(m);
|
||||
}
|
||||
FREE(theList);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ struct LISTINSTANCE *l;
|
||||
theList->current = l;
|
||||
|
||||
theList->listCount++;
|
||||
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ struct LISTINSTANCE *l;
|
||||
theList->current = l;
|
||||
|
||||
return(NIL);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -297,7 +297,7 @@ List theList;
|
||||
char *entry;
|
||||
int count;
|
||||
struct LISTINSTANCE *saveCurrent;
|
||||
*/
|
||||
*/
|
||||
if (theList) {
|
||||
return(theList->listCount);
|
||||
}
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* Permission is granted to copy and distribute source with out fee.
|
||||
* Commercialization of this product requires prior licensing
|
||||
* from the National Center for Supercomputing Applications of the
|
||||
* University of Illinois. Commercialization includes the integration of this
|
||||
* code in part or whole into a product for resale. Free distribution of
|
||||
* unmodified source and use of NCSA software is not considered
|
||||
* University of Illinois. Commercialization includes the integration of this
|
||||
* code in part or whole into a product for resale. Free distribution of
|
||||
* unmodified source and use of NCSA software is not considered
|
||||
* commercialization.
|
||||
*
|
||||
*/
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* Permission is granted to copy and distribute source with out fee.
|
||||
* Commercialization of this product requires prior licensing
|
||||
* from the National Center for Supercomputing Applications of the
|
||||
* University of Illinois. Commercialization includes the integration of this
|
||||
* code in part or whole into a product for resale. Free distribution of
|
||||
* unmodified source and use of NCSA software is not considered
|
||||
* University of Illinois. Commercialization includes the integration of this
|
||||
* code in part or whole into a product for resale. Free distribution of
|
||||
* unmodified source and use of NCSA software is not considered
|
||||
* commercialization.
|
||||
*
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ struct LISTINSTANCE {
|
||||
struct LISTSTRUCT {
|
||||
struct LISTINSTANCE *head;
|
||||
struct LISTINSTANCE *tail;
|
||||
struct LISTINSTANCE *current;
|
||||
struct LISTINSTANCE *current;
|
||||
int listCount;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user