Compare commits

...

10 Commits

Author SHA1 Message Date
8532c44862 bruh don't push the object files lol 2023-10-25 10:13:28 -05:00
7ed05ee32f *internal screaming* 2023-10-25 10:12:49 -05:00
NishiOwO
2e9a6053fa
add NetBSD Makefiles (#22) 2023-01-30 03:24:54 +01:00
Edmond Orignac
af1c9aaaa2
Allow Mosaic to display UTF-8 encoded characters (#18)
* replace XDrawString with XmStringDraw
HTMLformat.c, HTMLtable.c: The Motif 2.x XmStringDraw can display UTF-8 characters.
gui.c, gui-dialog.c: replace XmStringCreateSimple with XmStringCreateLocalized
xresources.h: use ISO 10646-1 fonts

* Support for HTML entities with UTF-8 encoding
HTMLamp.h: more complete list of HTML 4 entities
HTMLparse.c: replace an HTML entity &#nnn; or &name; by the appropriate UTF-8 sequence.
2022-04-17 16:05:37 +02:00
TimP
6b855b30e8 Ignore <script> and <style> tags. 2021-10-21 00:26:51 +02:00
Robert Clausecker
22da6c5d7d add support to build on freebsd 2021-10-15 02:17:03 +02:00
Ian Jones
83da6a028d Fixed one instance of warning re. the use of tmpnam in gui-dialogs.c and removed small duplication of free() in readPNG.c 2021-10-15 02:12:57 +02:00
Ian Jones
2989d8e6ea More fixes and tidying after reading through libpng example.c 2021-10-15 02:12:57 +02:00
Ian Jones
3566a6a42b Fixes to work with libpng > 1.5.0. 2021-10-15 02:12:57 +02:00
Andras Tantos
294f1a2ccb Ops, missed a file: config file to support UNICOS. 2020-09-10 12:32:06 +02:00
78 changed files with 3373 additions and 462 deletions

159
Makefile
View File

@ -13,23 +13,16 @@ help: dev_
dev_:: dev_::
@echo "You must specify one of the following or set the environment variable" @echo "You must specify one of the following or set the environment variable"
@echo "[DEV_ARCH] to one of the following:" @echo "[DEV_ARCH] to one of the following:"
@echo " alpha -- DEC Alpha AXP running OSF/1" @echo " freebsd -- x86 running freebsd DYNAMIC"
@echo " bsdi -- x86 running BSDI BSD/OS 2.1" @echo " freebsd-static -- x86 running freebsd ALL STATIC"
@echo " dec -- DEC 2100 running Ultrix 4.3" @echo " freebsd-static-motif -- x86 running freebsd STATIC MOTIF"
@echo " hp -- HP 9000/735 running HP-UX A.09.01" @echo " netbsd -- x86 running netbsd DYNAMIC"
@echo " ibm -- IBM RS6000 running AIX 4.4 BSD" @echo " netbsd-static -- x86 running netbsd ALL STATIC"
@echo " indy -- SGI Indy running IRIX 5.3" @echo " netbsd-static-motif -- x86 running netbsd STATIC MOTIF"
@echo " linux -- x86 running Linux 1.2.13 DYNAMIC" @echo " linux -- x86 running Linux 1.2.13 DYNAMIC"
@echo " linux-static -- x86 running Linux 1.2.13 ALL STATIC" @echo " linux-static -- x86 running Linux 1.2.13 ALL STATIC"
@echo " linux-static-motif -- x86 running Linux 1.2.13 STATIC MOTIF" @echo " linux-static-motif -- x86 running Linux 1.2.13 STATIC MOTIF"
@echo " unicos -- Cray PVP running UNICOS (tested with 10.0 and MOTIF)" @echo " unicos -- Cray PVP running UNICOS (tested with 10.0 and MOTIF)"
@echo " sco -- x86 running SCO System V 3.2"
@echo " sgi -- SGI Iris running IRIS 4.0.2"
@echo " solaris-23 -- SPARCstation 20 running Solaris 2.3"
@echo " solaris-24 -- SPARCstation 20 running Solaris 2.4"
@echo " solaris-24-x86 -- x86 running Solaris 2.4 for x86"
@echo " sun -- SPARCserver 690MP running SunOS 4.1.3"
@echo " sun-lresolv -- SPARCserver 690MP running SunOS 4.1.3"
@echo " " @echo " "
@echo "To make a Purify or Quantify version of Mosaic, put a 'p_' or" @echo "To make a Purify or Quantify version of Mosaic, put a 'p_' or"
@echo " 'q_' in front of the platform." @echo " 'q_' in front of the platform."
@ -48,53 +41,53 @@ rm_and_touch:
@rm -f config.h @rm -f config.h
@touch config.h @touch config.h
dev_alpha: rm_and_touch alpha dev_freebsd: rm_and_touch freebsd
alpha: rm_and_touch freebsd: rm_and_touch
$(MAKE) -f makefiles/Makefile.alpha DEV_ARCH=alpha $(MAKE) -f makefiles/Makefile.freebsd DEV_ARCH=freebsd
p_alpha: rm_and_touch p_freebsd: rm_and_touch
$(MAKE) -f makefiles/Makefile.alpha purifyd DEV_ARCH=alpha $(MAKE) -f makefiles/Makefile.freebsd purifyd DEV_ARCH=freebsd
q_alpha: rm_and_touch q_freebsd: rm_and_touch
$(MAKE) -f makefiles/Makefile.alpha quantifyd DEV_ARCH=alpha $(MAKE) -f makefiles/Makefile.freebsd quantifyd DEV_ARCH=freebsd
dev_bsdi: rm_and_touch bsdi dev_freebsd_static: rm_and_touch freebsd_static
bsdi: rm_and_touch freebsd_static: rm_and_touch
$(MAKE) -f makefiles/Makefile.bsdi DEV_ARCH=bsdi $(MAKE) -f makefiles/Makefile.freebsd staticd DEV_ARCH=freebsd
p_bsdi: rm_and_touch p_freebsd_static: rm_and_touch
$(MAKE) -f makefiles/Makefile.bsdi purifyd DEV_ARCH=bsdi $(MAKE) -f makefiles/Makefile.freebsd p_staticd DEV_ARCH=freebsd
q_bsdi: rm_and_touch q_freebsd_static: rm_and_touch
$(MAKE) -f makefiles/Makefile.bsdi quantifyd DEV_ARCH=bsdi $(MAKE) -f makefiles/Makefile.freebsd q_staticd DEV_ARCH=freebsd
dev_dec: rm_and_touch dec dev_freebsd_static_motif: rm_and_touch freebsd_static_motif
dec: rm_and_touch freebsd_static_motif: rm_and_touch
$(MAKE) -f makefiles/Makefile.dec DEV_ARCH=dec $(MAKE) -f makefiles/Makefile.freebsd static_motifd DEV_ARCH=freebsd
p_dec: rm_and_touch p_freebsd_static_motif: rm_and_touch
$(MAKE) -f makefiles/Makefile.dec purifyd DEV_ARCH=dec $(MAKE) -f makefiles/Makefile.freebsd p_static_motifd DEV_ARCH=freebsd
q_dec: rm_and_touch q_freebsd_static_motif: rm_and_touch
$(MAKE) -f makefiles/Makefile.dec quantifyd DEV_ARCH=dec $(MAKE) -f makefiles/Makefile.freebsd q_static_motifd DEV_ARCH=freebsd
dev_hp: rm_and_touch hp dev_netbsd: rm_and_touch netbsd
hp: rm_and_touch netbsd: rm_and_touch
$(MAKE) -f makefiles/Makefile.hp DEV_ARCH=hp $(MAKE) -f makefiles/Makefile.netbsd DEV_ARCH=netbsd
p_hp: rm_and_touch p_netbsd: rm_and_touch
$(MAKE) -f makefiles/Makefile.hp purifyd DEV_ARCH=hp $(MAKE) -f makefiles/Makefile.netbsd purifyd DEV_ARCH=netbsd
q_hp: rm_and_touch q_netbsd: rm_and_touch
$(MAKE) -f makefiles/Makefile.hp quantifyd DEV_ARCH=hp $(MAKE) -f makefiles/Makefile.netbsd quantifyd DEV_ARCH=netbsd
dev_ibm: rm_and_touch ibm dev_netbsd_static: rm_and_touch netbsd_static
ibm: rm_and_touch netbsd_static: rm_and_touch
$(MAKE) -f makefiles/Makefile.ibm DEV_ARCH=ibm $(MAKE) -f makefiles/Makefile.netbsd staticd DEV_ARCH=netbsd
p_ibm: rm_and_touch p_netbsd_static: rm_and_touch
$(MAKE) -f makefiles/Makefile.ibm purifyd DEV_ARCH=ibm $(MAKE) -f makefiles/Makefile.netbsd p_staticd DEV_ARCH=netbsd
q_ibm: rm_and_touch q_netbsd_static: rm_and_touch
$(MAKE) -f makefiles/Makefile.ibm quantifyd DEV_ARCH=ibm $(MAKE) -f makefiles/Makefile.netbsd q_staticd DEV_ARCH=netbsd
dev_indy: rm_and_touch indy dev_netbsd_static_motif: rm_and_touch netbsd_static_motif
indy: rm_and_touch netbsd_static_motif: rm_and_touch
$(MAKE) -f makefiles/Makefile.indy DEV_ARCH=indy $(MAKE) -f makefiles/Makefile.netbsd static_motifd DEV_ARCH=netbsd
p_indy: rm_and_touch p_netbsd_static_motif: rm_and_touch
$(MAKE) -f makefiles/Makefile.indy purifyd DEV_ARCH=indy $(MAKE) -f makefiles/Makefile.netbsd p_static_motifd DEV_ARCH=netbsd
q_indy: rm_and_touch q_netbsd_static_motif: rm_and_touch
$(MAKE) -f makefiles/Makefile.indy quantifyd DEV_ARCH=indy $(MAKE) -f makefiles/Makefile.netbsd q_static_motifd DEV_ARCH=netbsd
dev_linux: rm_and_touch linux dev_linux: rm_and_touch linux
linux: rm_and_touch linux: rm_and_touch
@ -128,62 +121,6 @@ p_unicos: rm_and_touch
q_unicos: rm_and_touch q_unicos: rm_and_touch
$(MAKE) -f makefiles/Makefile.unicos q_static_motifd DEV_ARCH=unicos $(MAKE) -f makefiles/Makefile.unicos q_static_motifd DEV_ARCH=unicos
dev_sco: rm_and_touch sco
sco: rm_and_touch
$(MAKE) -f makefiles/Makefile.sco DEV_ARCH=sco
p_sco: rm_and_touch
$(MAKE) -f makefiles/Makefile.sco purifyd DEV_ARCH=sco
q_sco: rm_and_touch
$(MAKE) -f makefiles/Makefile.sco quantifyd DEV_ARCH=sco
dev_sgi: rm_and_touch sgi
sgi: rm_and_touch
$(MAKE) -f makefiles/Makefile.sgi DEV_ARCH=sgi
p_sgi: rm_and_touch
$(MAKE) -f makefiles/Makefile.sgi purifyd DEV_ARCH=sgi
q_sgi: rm_and_touch
$(MAKE) -f makefiles/Makefile.sgi quantifyd DEV_ARCH=sgi
dev_solaris-23: rm_and_touch solaris-23
solaris-23: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-23 DEV_ARCH=solaris-23
p_solaris-23: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-23 purifyd DEV_ARCH=solaris-23
q_solaris-23: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-23 quantifyd DEV_ARCH=solaris-23
dev_solaris-24: rm_and_touch solaris-24
solaris-24: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-24 DEV_ARCH=solaris-24
p_solaris-24: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-24 purifyd DEV_ARCH=solaris-24
q_solaris-24: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-24 quantifyd DEV_ARCH=solaris-24
dev_solaris-24-x86: rm_and_touch solaris-24-x86
solaris-24-x86: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-24-x86 DEV_ARCH=solaris-24-x86
p_solaris-24-x86: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-24-x86 purifyd DEV_ARCH=solaris-24-x86
q_solaris-24-x86: rm_and_touch
$(MAKE) -f makefiles/Makefile.solaris-24-x86 quantifyd DEV_ARCH=solaris-24-x86
dev_sun: rm_and_touch sun
sun: rm_and_touch
$(MAKE) -f makefiles/Makefile.sun DEV_ARCH=sun
p_sun: rm_and_touch
$(MAKE) -f makefiles/Makefile.sun purifyd DEV_ARCH=sun
q_sun: rm_and_touch
$(MAKE) -f makefiles/Makefile.sun quantifyd DEV_ARCH=sun
dev_sun-lresolv: rm_and_touch sun-lresolv
sun-lresolv: rm_and_touch
$(MAKE) -f makefiles/Makefile.sun-lresolv DEV_ARCH=sun-lresolv
p_sun-lresolv: rm_and_touch
$(MAKE) -f makefiles/Makefile.sun-lresolv purifyd DEV_ARCH=sun-lresolv
q_sun-lresolv: rm_and_touch
$(MAKE) -f makefiles/Makefile.sun-lresolv quantifyd DEV_ARCH=sun-lresolv
clean: clean:
cd libXmx; $(MAKE) clean cd libXmx; $(MAKE) clean
cd libdtm; $(MAKE) clean cd libdtm; $(MAKE) clean

10
Mosaic.ad Normal file
View File

@ -0,0 +1,10 @@
!Mosaic*rendertable.fontType: FONT_IS_FONT
!Mosaic*rendertable.fontName: AS_IS
!Mosaic*rendertable.underlineType: NO_LINE
! Two very readable fonts with accented characters
!Mosaic*Font: -bitstream-bitstream charter-medium-r-normal--0-0-0-0-p-0-iso10646-1
! Mosaic*Font: -b&h-lucidatypewriter-medium-r-normal-sans-17-120-100-100-m-100-iso10646-1
! Better font to display Greek or Cyrillic but small (12 points)
!Mosaic*Font: -schumacher-clean-medium-r-normal--12-120-75-75-c-60-iso10646-1
!
Mosaic*Font: -mutt-clearlyu-medium-r-normal--17-120-100-100-p-123-iso10646-1

BIN
libXmx/Xmx.o Normal file

Binary file not shown.

BIN
libXmx/Xmx2.o Normal file

Binary file not shown.

BIN
libXmx/libXmx.a Normal file

Binary file not shown.

BIN
libhtmlw/DrawingArea.o Normal file

Binary file not shown.

BIN
libhtmlw/HTML-PSformat.o Normal file

Binary file not shown.

View File

@ -499,7 +499,7 @@ static XtResource resources[] =
{ WbNtoolbarFont, { WbNtoolbarFont,
WbCToolbarFont, XtRFontStruct, sizeof (XFontStruct *), WbCToolbarFont, XtRFontStruct, sizeof (XFontStruct *),
XtOffset (HTMLWidget, html.toolbar_font), XtOffset (HTMLWidget, html.toolbar_font),
XtRString, "-adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1" XtRString, "-adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso10646-1"
}, },
{ WbNfixedFont, { WbNfixedFont,

View File

@ -440,6 +440,8 @@ struct delay_rec {
#define M_MAP 58 /* swp - client side ismap */ #define M_MAP 58 /* swp - client side ismap */
#define M_AREA 59 /* swp - client side ismap */ #define M_AREA 59 /* swp - client side ismap */
#define M_CENTER 60 #define M_CENTER 60
#define M_SCRIPT 61
#define M_STYLE 62
/* syntax of Mark types */ /* syntax of Mark types */
#define MT_TITLE "title" #define MT_TITLE "title"
@ -502,6 +504,10 @@ struct delay_rec {
#define MT_AREA "area" /* swp - client side ismap */ #define MT_AREA "area" /* swp - client side ismap */
#define MT_CENTER "center" #define MT_CENTER "center"
/* tags from THE FUTURE! we will ignore their contents. */
#define MT_SCRIPT "script"
#define MT_STYLE "style"
/* anchor tags */ /* anchor tags */
#define AT_NAME "name" #define AT_NAME "name"
#define AT_HREF "href" #define AT_HREF "href"

BIN
libhtmlw/HTML.o Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -3504,7 +3504,7 @@ int *x, *y;
* Let OPTION through so we can hit the OPTIONs. * Let OPTION through so we can hit the OPTIONs.
* Let TEXTAREA through so we can hit the TEXTAREAs. * Let TEXTAREA through so we can hit the TEXTAREAs.
*/ */
if ((Ignore)&&(!InDocHead)&&(type != M_TITLE)&&(type != M_NONE)&& if ((Ignore)&&(!InDocHead)&&(type != M_TITLE)&&(type != M_NONE)&&(type != M_COMMENT)&&
(type != M_SELECT)&&(type != M_OPTION)&& (type != M_SELECT)&&(type != M_OPTION)&&
(type != M_TEXTAREA)&&(type != M_DOC_HEAD)) (type != M_TEXTAREA)&&(type != M_DOC_HEAD))
{ {
@ -4831,6 +4831,9 @@ int *x, *y;
TablePlace(hw, mptr, x, y, Width); TablePlace(hw, mptr, x, y, Width);
} }
break; break;
case M_COMMENT:
Ignore = !mark->is_end;
break;
default: default:
break; break;
} }
@ -5250,7 +5253,9 @@ PartialRefresh(hw, eptr, start_pos, end_pos, fg, bg)
int partial, descent; int partial, descent;
unsigned long valuemask; unsigned long valuemask;
XGCValues values; XGCValues values;
XmString ttd;
XmFontList tftd;
XSetFont(XtDisplay(hw), hw->html.drawGC, eptr->font->fid); XSetFont(XtDisplay(hw), hw->html.drawGC, eptr->font->fid);
ascent = eptr->font->max_bounds.ascent; ascent = eptr->font->max_bounds.ascent;
width = -1; width = -1;
@ -5373,13 +5378,24 @@ PartialRefresh(hw, eptr, start_pos, end_pos, fg, bg)
XSetForeground(XtDisplay(hw), hw->html.drawGC, fg); XSetForeground(XtDisplay(hw), hw->html.drawGC, fg);
XSetBackground(XtDisplay(hw), hw->html.drawGC, bg); XSetBackground(XtDisplay(hw), hw->html.drawGC, bg);
XDrawString(XtDisplay(hw), tftd=XmFontListCreate(eptr->font,XmSTRING_DEFAULT_CHARSET);
XtWindow(hw->html.view), ttd=XmStringCreateLocalized(tdata);
hw->html.drawGC,
x,
y + ascent, XmStringDraw(XtDisplay(hw),
(char *)tdata, XtWindow(hw->html.view),
tlen); tftd,
ttd,
hw->html.drawGC,
x,
y,
XmStringWidth(tftd,ttd),
XmALIGNMENT_BEGINNING,
XmSTRING_DIRECTION_L_TO_R,
NULL);
XmStringFree(ttd);
XmFontListFree(tftd);
} }
else { else {
XSetForeground(XtDisplay(hw), hw->html.drawGC, bg); XSetForeground(XtDisplay(hw), hw->html.drawGC, bg);
@ -5409,14 +5425,24 @@ PartialRefresh(hw, eptr, start_pos, end_pos, fg, bg)
(y<0 ? (y<0 ?
(ascent+eptr->font->descent+y) : (ascent+eptr->font->descent+y) :
(ascent+eptr->font->descent))); (ascent+eptr->font->descent)));
tftd=XmFontListCreate(eptr->font,XmSTRING_DEFAULT_CHARSET);
ttd=XmStringCreateLocalized(tdata);
XmStringDraw(XtDisplay(hw),
XtWindow(hw->html.view),
tftd,
ttd,
hw->html.drawGC,
x,
y,
XmStringWidth(tftd,ttd),
XmALIGNMENT_BEGINNING,
XmSTRING_DIRECTION_L_TO_R,
NULL);
XmStringFree(ttd);
XmFontListFree(tftd);
XDrawString(XtDisplay(hw),
XtWindow(hw->html.view),
hw->html.drawGC,
x,
y + ascent,
(char *)tdata,
tlen);
} }

BIN
libhtmlw/HTMLformat.o Normal file

Binary file not shown.

BIN
libhtmlw/HTMLimages.o Normal file

Binary file not shown.

BIN
libhtmlw/HTMLjot.o Normal file

Binary file not shown.

BIN
libhtmlw/HTMLlists.o Normal file

Binary file not shown.

View File

@ -111,7 +111,45 @@ unsigned char map_table[256]={
#define TOLOWER(x) (map_table[x]) #define TOLOWER(x) (map_table[x])
#endif /* NOT_ASCII */ #endif /* NOT_ASCII */
/* Converts an UCS code < 65536 into a UTF-8 string. Returns the string length */
int ucs2utf8(unsigned int ucs,char code[4])
{
unsigned int x,y,z;
if (ucs<128)
{
code[0]=(char)ucs;
code[1]='\0';
return(1);
}
else if (ucs<2048)
{
x=ucs/64;
y=ucs-64*x;
code[0]=(char)(192+x);
code[1]=(char)(128+y);
code[2]='\0';
return(2);
}
else if (ucs<65536)
{
x=ucs/4096;
y=(ucs-4096*x)/64;
z=ucs-4096*x-64*y;
code[0]=(char)(224+x);
code[1]=(char)(128+y);
code[2]=(char)(128+z);
code[3]='\0';
return(3);
}
else
{
/* Not implemented yet */
code[0]='\0';
return(0);
}
}
/* /*
* Check if two strings are equal, ignoring case. * Check if two strings are equal, ignoring case.
* The strings must be of the same length to be equal. * The strings must be of the same length to be equal.
@ -271,8 +309,8 @@ clean_white_space(txt)
/* /*
* parse an amperstand escape, and return the appropriate character, or * parse an amperstand escape, and return the length of the UTF-8 sequence encoding the character, or
* '\0' on error. * 0 on error. val contains the UTF-8 sequence.
* we should really only use caseless_equal_prefix for unterminated, and use * we should really only use caseless_equal_prefix for unterminated, and use
* caseless_equal otherwise, but since there are so many escapes, and I * caseless_equal otherwise, but since there are so many escapes, and I
* don't want to type everything twice, I always use caseless_equal_prefix * don't want to type everything twice, I always use caseless_equal_prefix
@ -282,14 +320,16 @@ clean_white_space(txt)
* 1: unterminated * 1: unterminated
* 2: terminated with whitespace * 2: terminated with whitespace
*/ */
char int
ExpandEscapes(esc, endp, termination) ExpandEscapes(esc, endp, termination,val)
char *esc; char *esc;
char **endp; char **endp;
int termination; int termination;
char val[4];
{ {
int cnt; int cnt;
char val; unsigned int ucs,lng=0;
int jj;
int unterminated; int unterminated;
unterminated = (termination & 0x01); unterminated = (termination & 0x01);
@ -309,14 +349,26 @@ ExpandEscapes(esc, endp, termination)
} }
tchar = *tptr; tchar = *tptr;
*tptr = '\0'; *tptr = '\0';
val = (char)atoi((esc + 1)); ucs = atoi((esc + 1));
lng=ucs2utf8(ucs, val);
#ifndef DISABLE_TRACE
if (htmlwTrace) {
fprintf(stderr,"&#%ud character: %s\n",ucs,val);
}
#endif
*tptr = tchar; *tptr = tchar;
*endp = tptr; *endp = tptr;
} }
else else
{ {
val = (char)atoi((esc + 1)); ucs=atoi((esc + 1));
lng=ucs2utf8(ucs, val);
*endp = (char *)(esc + strlen(esc)); *endp = (char *)(esc + strlen(esc));
#ifndef DISABLE_TRACE
if (htmlwTrace) {
fprintf(stderr,"&#%ud character: %s\n",ucs,val);
}
#endif
} }
} }
else else
@ -329,7 +381,13 @@ ExpandEscapes(esc, endp, termination)
ampLen = strlen(AmpEscapes[cnt].tag); ampLen = strlen(AmpEscapes[cnt].tag);
if ((escLen == ampLen) && (strncmp(esc, AmpEscapes[cnt].tag, ampLen) == 0)) if ((escLen == ampLen) && (strncmp(esc, AmpEscapes[cnt].tag, ampLen) == 0))
{ {
val = AmpEscapes[cnt].value; ucs = AmpEscapes[cnt].value;
lng=ucs2utf8(ucs, val);
#ifndef DISABLE_TRACE
if (htmlwTrace) {
fprintf(stderr,"&%s; character:%s\n",esc,val);
}
#endif
*endp = (char *)(esc + *endp = (char *)(esc +
strlen(AmpEscapes[cnt].tag)); strlen(AmpEscapes[cnt].tag));
break; break;
@ -343,12 +401,13 @@ ExpandEscapes(esc, endp, termination)
fprintf(stderr, "Error bad & string\n"); fprintf(stderr, "Error bad & string\n");
} }
#endif #endif
val = '\0'; val[0] = '\0';
lng=0;
*endp = (char *)NULL; *endp = (char *)NULL;
} }
} }
return(val); return(lng);
} }
@ -375,7 +434,9 @@ clean_text(txt)
char *text; char *text;
char *tend; char *tend;
char tchar; char tchar;
char val; char val[4];
int lng;
int jj;
if (txt == NULL) if (txt == NULL)
{ {
@ -460,9 +521,9 @@ clean_text(txt)
/* /*
* Replace escape sequence with appropriate character * Replace escape sequence with appropriate character
*/ */
val = ExpandEscapes(text, &tend, lng = ExpandEscapes(text, &tend,
((space_terminated << 1) + unterminated)); ((space_terminated << 1) + unterminated), val);
if (val != '\0') if (lng>0)
{ {
if (unterminated) if (unterminated)
{ {
@ -475,7 +536,11 @@ clean_text(txt)
{ {
ptr--; ptr--;
} }
*ptr2 = val; for (jj=0; jj<=lng-1; jj++)
{
*ptr2 = val[jj];
ptr2++;
}
unterminated = 0; unterminated = 0;
space_terminated = 0; space_terminated = 0;
} }
@ -498,7 +563,7 @@ clean_text(txt)
* Copy forward remaining text until you find the next * Copy forward remaining text until you find the next
* escape sequence * escape sequence
*/ */
ptr2++;
ptr++; ptr++;
while (*ptr != '\0') while (*ptr != '\0')
{ {
@ -1407,6 +1472,14 @@ ParseMarkType(str)
{ {
type = M_CENTER; type = M_CENTER;
} }
else if (caseless_equal(str, MT_SCRIPT))
{
type = M_COMMENT;
}
else if (caseless_equal(str, MT_STYLE))
{
type = M_COMMENT;
}
else else
{ {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE

BIN
libhtmlw/HTMLparse.o Normal file

Binary file not shown.

View File

@ -1121,10 +1121,22 @@ int yy;
XSetBackground(XtDisplay(hw), hw->html.drawGC, eptr->bg); XSetBackground(XtDisplay(hw), hw->html.drawGC, eptr->bg);
XSetForeground(XtDisplay(hw), hw->html.drawGC, eptr->fg); XSetForeground(XtDisplay(hw), hw->html.drawGC, eptr->fg);
XSetFont(XtDisplay(hw), hw->html.drawGC, field->font->fid); XSetFont(XtDisplay(hw), hw->html.drawGC, field->font->fid);
XDrawString(XtDisplay(hw), XtWindow(hw->html.view), XmString ttd=XmStringCreateLocalized(field->formattedText[yy]);
hw->html.drawGC, placeX, placeY+baseLine, XmFontList tftd=XmFontListCreate(field->font,XmSTRING_DEFAULT_CHARSET);
field->formattedText[yy], XmStringDraw(XtDisplay(hw),
strlen(field->formattedText[yy])); XtWindow(hw->html.view),
tftd,
ttd,
hw->html.drawGC,
placeX,
placeY+baseLine,
XmStringWidth(tftd,ttd),
XmALIGNMENT_BEGINNING,
XmSTRING_DIRECTION_L_TO_R,
NULL);
XmStringFree(ttd);
XmFontListFree(tftd);
placeY += lineHeight; placeY += lineHeight;
} }

BIN
libhtmlw/HTMLtable.o Normal file

Binary file not shown.

View File

@ -450,7 +450,7 @@ CollectSubmitInfo(fptr, name_list, value_list)
= wptr->name; = wptr->name;
#ifdef MOTIF #ifdef MOTIF
XmStringGetLtoR(str_list[j], XmStringGetLtoR(str_list[j],
XmSTRING_DEFAULT_CHARSET, XmFONTLIST_DEFAULT_TAG,
&val); &val);
#else #else
val = str_list[j]; val = str_list[j];
@ -486,7 +486,7 @@ CollectSubmitInfo(fptr, name_list, value_list)
argcnt++; argcnt++;
XtGetValues(child, arg, argcnt); XtGetValues(child, arg, argcnt);
val = NULL; val = NULL;
XmStringGetLtoR(label, XmSTRING_DEFAULT_CHARSET, XmStringGetLtoR(label, XmFONTLIST_DEFAULT_TAG,
&val); &val);
#else #else
XtVaGetValues(wptr->w, XtNlabel, &val, NULL); XtVaGetValues(wptr->w, XtNlabel, &val, NULL);
@ -1337,7 +1337,7 @@ CBResetForm(w, client_data, call_data)
for (i=0; i<vlist_cnt; i++) for (i=0; i<vlist_cnt; i++)
{ {
val_list[i] = val_list[i] =
XmStringCreateSimple(vlist[i]); XmStringCreateLocalized(vlist[i]);
} }
#else #else
XawListUnhighlight(child); XawListUnhighlight(child);
@ -2237,7 +2237,7 @@ MakeWidget(hw, text, x, y, id, fptr)
tptr = ParseMarkTag(text, MT_INPUT, "CHECKED"); tptr = ParseMarkTag(text, MT_INPUT, "CHECKED");
/* We want no text on our toggles */ /* We want no text on our toggles */
label = XmStringCreateSimple(""); label = XmStringCreateLocalized("");
argcnt = 0; argcnt = 0;
XtSetArg(arg[argcnt], XmNlabelString, label); argcnt++; XtSetArg(arg[argcnt], XmNlabelString, label); argcnt++;
@ -2304,7 +2304,7 @@ MakeWidget(hw, text, x, y, id, fptr)
} }
/* We want no text on our toggles */ /* We want no text on our toggles */
label = XmStringCreateSimple(""); label = XmStringCreateLocalized("");
argcnt = 0; argcnt = 0;
XtSetArg(arg[argcnt], XmNlabelString, label); argcnt++; XtSetArg(arg[argcnt], XmNlabelString, label); argcnt++;
@ -2355,7 +2355,7 @@ MakeWidget(hw, text, x, y, id, fptr)
argcnt++;*/ argcnt++;*/
if (value != NULL) if (value != NULL)
{ {
label = XmStringCreateSimple(value); label = XmStringCreateLocalized(value);
XtSetArg(arg[argcnt], XmNlabelString, label); XtSetArg(arg[argcnt], XmNlabelString, label);
argcnt++; argcnt++;
} }
@ -2393,7 +2393,7 @@ MakeWidget(hw, text, x, y, id, fptr)
argcnt++;*/ argcnt++;*/
if (value != NULL) if (value != NULL)
{ {
label = XmStringCreateSimple(value); label = XmStringCreateLocalized(value);
XtSetArg(arg[argcnt], XmNlabelString, label); XtSetArg(arg[argcnt], XmNlabelString, label);
argcnt++; argcnt++;
} }
@ -2425,7 +2425,7 @@ MakeWidget(hw, text, x, y, id, fptr)
argcnt++; */ argcnt++; */
if (value != NULL) if (value != NULL)
{ {
label = XmStringCreateSimple(value); label = XmStringCreateLocalized(value);
XtSetArg(arg[argcnt], XmNlabelString, label); XtSetArg(arg[argcnt], XmNlabelString, label);
argcnt++; argcnt++;
} }
@ -2645,7 +2645,7 @@ MakeWidget(hw, text, x, y, id, fptr)
char bname[30]; char bname[30];
sprintf(bname, "Button%d", (i + 1)); sprintf(bname, "Button%d", (i + 1));
label = XmStringCreateSimple(list[i]); label = XmStringCreateLocalized(list[i]);
argcnt = 0; argcnt = 0;
XtSetArg(arg[argcnt], XmNlabelString, XtSetArg(arg[argcnt], XmNlabelString,
label); label);
@ -2722,7 +2722,7 @@ MakeWidget(hw, text, x, y, id, fptr)
argcnt = 0; argcnt = 0;
xmstr = XmStringCreateSimple (""); xmstr = XmStringCreateLocalized ("");
XtSetArg(arg[argcnt], XmNlabelString, XtSetArg(arg[argcnt], XmNlabelString,
(XtArgVal)xmstr); (XtArgVal)xmstr);
argcnt++; argcnt++;
@ -2763,12 +2763,12 @@ MakeWidget(hw, text, x, y, id, fptr)
for (i=0; i<list_cnt; i++) for (i=0; i<list_cnt; i++)
{ {
string_list[i] = string_list[i] =
XmStringCreateSimple(list[i]); XmStringCreateLocalized(list[i]);
} }
for (i=0; i<vlist_cnt; i++) for (i=0; i<vlist_cnt; i++)
{ {
val_list[i] = val_list[i] =
XmStringCreateSimple(vlist[i]); XmStringCreateLocalized(vlist[i]);
} }
FreeCommaList(list, list_cnt); FreeCommaList(list, list_cnt);

BIN
libhtmlw/HTMLwidgets.o Normal file

Binary file not shown.

BIN
libhtmlw/libhtmlw.a Normal file

Binary file not shown.

BIN
libhtmlw/list.o Normal file

Binary file not shown.

BIN
libnut/libnut.a Normal file

Binary file not shown.

BIN
libnut/objs/ellipsis.o Normal file

Binary file not shown.

BIN
libnut/objs/mm.o Normal file

Binary file not shown.

BIN
libnut/objs/str-tools.o Normal file

Binary file not shown.

BIN
libnut/objs/system.o Normal file

Binary file not shown.

BIN
libnut/objs/url-utils.o Normal file

Binary file not shown.

BIN
libwww2/CUkerb.o Normal file

Binary file not shown.

BIN
libwww2/HTAABrow.o Normal file

Binary file not shown.

BIN
libwww2/HTAAUtil.o Normal file

Binary file not shown.

BIN
libwww2/HTAccess.o Normal file

Binary file not shown.

BIN
libwww2/HTAlert.o Normal file

Binary file not shown.

BIN
libwww2/HTAnchor.o Normal file

Binary file not shown.

BIN
libwww2/HTAssoc.o Normal file

Binary file not shown.

BIN
libwww2/HTAtom.o Normal file

Binary file not shown.

BIN
libwww2/HTChunk.o Normal file

Binary file not shown.

BIN
libwww2/HTCompressed.o Normal file

Binary file not shown.

BIN
libwww2/HTFTP.o Normal file

Binary file not shown.

BIN
libwww2/HTFWriter.o Normal file

Binary file not shown.

BIN
libwww2/HTFile.o Normal file

Binary file not shown.

BIN
libwww2/HTFormat.o Normal file

Binary file not shown.

BIN
libwww2/HTGopher.o Normal file

Binary file not shown.

BIN
libwww2/HTIcon.o Normal file

Binary file not shown.

BIN
libwww2/HTInit.o Normal file

Binary file not shown.

BIN
libwww2/HTList.o Normal file

Binary file not shown.

BIN
libwww2/HTMIME.o Normal file

Binary file not shown.

BIN
libwww2/HTML.o Normal file

Binary file not shown.

BIN
libwww2/HTMLDTD.o Normal file

Binary file not shown.

BIN
libwww2/HTMLGen.o Normal file

Binary file not shown.

BIN
libwww2/HTMailto.o Normal file

Binary file not shown.

BIN
libwww2/HTMosaicHTML.o Normal file

Binary file not shown.

BIN
libwww2/HTNews.o Normal file

Binary file not shown.

BIN
libwww2/HTParse.o Normal file

Binary file not shown.

BIN
libwww2/HTPlain.o Normal file

Binary file not shown.

BIN
libwww2/HTSort.o Normal file

Binary file not shown.

BIN
libwww2/HTString.o Normal file

Binary file not shown.

BIN
libwww2/HTTCP.o Normal file

Binary file not shown.

BIN
libwww2/HTTP.o Normal file

Binary file not shown.

BIN
libwww2/HTTelnet.o Normal file

Binary file not shown.

BIN
libwww2/HTUU.o Normal file

Binary file not shown.

BIN
libwww2/HTWAIS.o Normal file

Binary file not shown.

BIN
libwww2/HTWSRC.o Normal file

Binary file not shown.

BIN
libwww2/HTWriter.o Normal file

Binary file not shown.

BIN
libwww2/SGML.o Normal file

Binary file not shown.

BIN
libwww2/libwww.a Normal file

Binary file not shown.

View File

@ -72,6 +72,10 @@ typedef struct sockaddr_in SockA; /* See netinet/in.h */
#define USE_DIRENT #define USE_DIRENT
#endif #endif
#ifdef __FreeBSD__
#define USE_DIRENT
#endif
#ifdef _IBMR2 #ifdef _IBMR2
#define USE_DIRENT /* sys V style directory open */ #define USE_DIRENT /* sys V style directory open */
#endif #endif

353
makefiles/Makefile.freebsd Executable file
View File

@ -0,0 +1,353 @@
# Toplevel Makefile for NCSA Mosaic.
# You shouldn't need to touch any of the Makefiles in the various
# subdirectories if you configure this Makefile correctly.
# If you need to make serious changes to get Mosaic to compile on your
# platform, send context diffs to mosaic-x@ncsa.uiuc.edu.
# -------------------------- CUSTOMIZABLE OPTIONS ----------------------------
#prereleaseflags = -DPRERELEASE
prereleaseflags = -DPRERELEASE
#RANLIB = /bin/true
#### On non-SGI's, this should be ranlib.
RANLIB = ranlib
#CC = cc
#### On Sun's, this should be gcc (ANSI required).
CC = cc
#### Linker Flags
ldflags =
#### For a few files in the source, some compilers may need to be kicked
#### in K&R mode. E.g., on SGI's, -cckr does this.
#knrflag = -cckr
#### On most systems, no flag is needed.
knrflag =
#### Random system configuration flags.
#### --> *** For Motif 1.2 ON ANY PLATFORM, do -DMOTIF1_2 *** <--
#### For IBM AIX 3.2, do -D_BSD
#### For NeXT, do -DNEXT
#### For HP/UX, do -Aa -D_HPUX_SOURCE
#### For Dell SVR4, do -DSVR4
#### For Solaris, do -DSVR4
#### For Esix 4.0.4 and Solaris x86 2.1, do -DSVR4
#### For Convex whatever, do -DCONVEX
#### For SCO ODT 3.0, do -DSCO -DSVR4 -DMOTIF1_2
#### For Motorola SVR4, do -DSVR4 -DMOTOROLA -DMOTIF1_2
sysconfigflags = -DMOTIF1_2 -DLINUX
#### System libraries.
# syslibs = -lPW -lsun -lmalloc
#### For AIX 3.2
# syslibs = -lPW -lbsd
#### For most other Motif platforms:
# syslibs = -lPW
#### For Sun's and Ultrix and HP and BSD/386:
# syslibs =
#### For Sun's with no DNS:
# syslibs = -lresolv
#### For SCO ODT:
# syslibs = -lPW -lsocket -lmalloc
#### For Dell SVR4:
# syslibs = -lnsl -lsocket -lc -lucb
#### For Solaris (?)
# syslibs = -lnsl -lsocket -lgen
#### For Motorola SVR4:
# syslibs = -lnsl -lsocket -lgen
syslibs = -lc
#### X include file locations -- if your platform puts the X include
#### files in a strange place, set this variable appropriately. Else
#### don't worry about it.
#### HP X11R4 version:
# xinc = -I/usr/include/Motif1.1 -I/usr/include/X11R4
#### HP X11R5 version:
# xinc = -I/usr/include/Motif1.2 -I/usr/local/X11R5/include
#### NeXT version:
# xinc = -I/usr/include/X11
#### BSD/386
# xinc = -I/usr/X11/include
#xinc = -I/usr/X11R6/include
xinc = -I/usr/local/include
#### X library locations.
# xlibs = -lXm_s -lXmu -lXt_s -lX11_s
#### For Sun's (at least running stock X/Motif as installed on our machines):
# xlibs = /usr/lib/libXm.a /usr/lib/libXmu.a /usr/lib/libXt.a /usr/lib/libXext.a /usr/lib/libX11.a -lm #### For HP-UX 8.00:
# xlibs = -L/usr/lib/Motif1.1 -lXm -L/usr/lib/X11R4 -lXmu -lXt -lX11
#### For HP-UX 9.01: The X11R5 libraries are here on our systems
# xlibs = -L/usr/lib/Motif1.2 -lXm -L/usr/lib/X11R5 -L/usr/lib/X11R4 -lXmu -lXt -lX11
#### For NeXT:
# xlibs = -L/usr/lib/X11 -lXm -lXmu -lXt -lX11
#### For Dell SVR4:
# xlibs = -L/usr/X5/lib -lXm -lXmu -lXt -lXext -lX11
#### For Solaris (?)
# xlibs = -lXm -lXmu -lXt -lXext -lX11 -lm
#### For SCO ODT 3.0 (I'm told that -lXtXm_s is *not* a typo :-):
# xlibs = -lXtXm_s -lXmu -lX11_s
#### For nearly everyone else:
# xlibs = -lXm -lXmu -lXt -lX11
#### For Linux -- You must set "LD_LIBRARY_PATH" to include the path to
#### your X libs, or some may not be found by the loader. Check the
#### loader with "ldd Mosaic" after you build.
#xlibs = -L/usr/X11R6/lib -lXext -lXpm -lXm -lXmu -lXt -lX11 -lICE -lSM
xlibs = -L/usr/local/lib -lXext -lXpm -lXm -lXmu -lXt -lX11 -lICE -lSM
static_motif_xlibs = -L/usr/X11R6/lib -lXext -lXpm /usr/X11R6/lib/libXm.a -lXmu -lXt -lX11 -lICE -lSM
static_xlibs = /usr/X11R6/lib/libXpm.a /usr/X11R6/lib/libXm.a /usr/X11R6/lib/libXmu.a /usr/X11R6/lib/libXt.a /usr/X11R6/lib/libXext.a /usr/X11R6/lib/libX11.a /usr/X11R6/lib/libSM.a /usr/X11R6/lib/libICE.a
#### For BSD/386:
# xlibs = -L/usr/X11/lib -lXm -lXmu -lXt -lX11
#### For Motorola SVR4:
# xlibs = -lXm -lXmu -lXt -lXext -lX11 -lm
#### DTM AND HDF SUPPORT; READ CAREFULLY
#### If you want to compile with DTM and HDF support, you should leave
#### the following lines uncommented and make sure you have a copy of
#### HDF 3.3 (r1 or later) installed and ready. You can find HDF on
#### ftp.ncsa.uiuc.edu in /HDF.
#### If you do not want to compile with DTM and HDF support, comment
#### the following lines out. (If you are compiling from source for
#### the first time, you should probably not bother with HDF and DTM
#### support.)
#### dtmmachtype needs to be set to one of the following:
#### sun, sgi, dec, ibm, next, cray, convex
#### If your platform is not one of the above, then either do not compile
#### with HDF/DTM support or try hacking libdtm/makefile.
#dtmmachtype = sun
#dtmdirs = libdtm libnet
#dtmlibs = ../libnet/libnet.a ../libdtm/libdtm.a
#dtmflags = -DHAVE_DTM -I.. -I../libnet
#hdfdir = /hdf2/install/linux
#hdflibs = $(hdfdir)/lib/libnetcdf.a $(hdfdir)/lib/libdf.a
#hdfflags = -DHAVE_HDF -I$(hdfdir)/include
#### PNG SUPPORT
#### For inline PNG support, the following should be defined:
#### The libraries currently used are PNGLIB 0.81 and ZLIB 0.95
# SAM pngdir = /xdev/mosaic/libpng/linux
# SAM pnglibdir = $(pngdir)/lib
# SAM pngincludedir = $(pngdir)/include
# SAM pnglibs = $(pnglibdir)/libpng.a $(pnglibdir)/libz.a /usr/lib/libm.a
# SAM pngflags = -I$(pngincludedir) -DHAVE_PNG
pnglibs = -lpng -lz -lm
pngflags = -DHAVE_PNG
#### JPEG SUPPORT
#### For inline JPEG support, the following should be defined:
#### The library used is Independent JPEG Group (IJG's) 5.0a.
# SAM jpegdir = /xdev/mosaic/libjpeg/linux
# SAM jpeglibs = $(jpegdir)/lib/libjpeg.a
#SAM jpegflags = -I$(jpegdir)/include -DHAVE_JPEG
jpeglibs = -ljpeg
jpegflags = -DHAVE_JPEG
#### KERBEROS SUPPORT
####
#### If you want Mosaic to support Kerberos authentication, set the
#### following flags appropriately. You can support Kerberos V4 and/or V5,
#### although it's most likely that your realm supports one or the other.
#### To enable DES-encryption of HTTP messages via Kerberos key exchange,
#### define the KRB-ENCRYPT flag.
##krb4dir = /usr/athena
#krb4dir = /xdev/mosaic/libkrb4/linux
#krb4libs = $(krb4dir)/lib/libkrb.a $(krb4dir)/lib/libdes.a
#krb4flags = -DKRB4 -I$(krb4dir)/include
##krb5dir = /krb5
#krb5dir = /xdev/mosaic/libkrb5/linux
#krb5libs = $(krb5dir)/lib/libkrb5.a $(krb5dir)/lib/libcrypto.a $(krb5dir)/util/et/libcom_err.a
#krb5flags = -DKRB5 -I$(krb5dir)/include -I$(krb5dir)/include/krb5
#Do not comment out.
krbflags = $(krb4flags) $(krb5flags)
krblibs = $(krb4libs) $(krb5libs)
#### DIRECT WAIS SUPPORT
#### If you want to have Mosaic be able to communicate directly with
#### WAIS servers, do set the following flags appropriately. We
#### recommend linking with CNIDR's freeWAIS 0.5 distribution; other
#### WAIS distributions may work but we have not tested them with
#### Mosaic. freeWAIS 0.5 can currently (Sept.1995) be found at
#### ftp://sunsite.unc.edu/pub/wais/servers/freeWAIS
#### If you do not wish to link to the WAIS libraries, then comment
#### the following lines out. Mosaic will then communicate with WAIS
#### servers via a HTTP gateway.
#### -lm is required for freeWAIS 0.5, as ceil() is used.
#waisroot = /xdev/mosaic/freeWAIS/linux
#waisflags = -DDIRECT_WAIS -I$(waisroot)/include
#waislibdir = $(waisroot)/bin
#waislibs = $(waislibdir)/inv.a $(waislibdir)/wais.a $(waislibdir)/libftw.a -lm
#### Customization flags:
#### . If you want Mosaic to come up with monochrome colors by default,
#### use -DMONO_DEFAULT
#### . If you want to define the default Mosaic home page, set
#### -DHOME_PAGE_DEFAULT=\\\"url\\\"
#### . If you want to define the default Mosaic documentation directory
#### (should be a URL), set -DDOCS_DIRECTORY_DEFAULT=\\\"url\\\"
#### . Other things you can define are spelled out in src/mosaic.h.
customflags =
########
########
#### NOTE! If you get errors because of the following line, it means
#### you are NOT using GNUs Make program. The following line is basically
#### for the developers at NCSA to customize the build process without
#### modifying the Makefiles, so you may comment it out without harm.
########
########
-include local-defines/$(DEV_ARCH)
# ---------------------- END OF CUSTOMIZABLE OPTIONS -------------------------
# Disable certain warnings as we don't care for them
CWARNINGS = -Wall \
-Wno-parentheses \
-Wno-switch -Wno-switch-enum \
-Wno-char-subscripts \
-Wno-unused-result
CFLAGS = -fcommon -g $(sysconfigflags) $(prereleaseflags) $(CWARNINGS) $(customflags)
# Don't worry about these -- for development purposes only.
PURIFY = purify
QUANTIFY = quantify
default: $(dtmdirs) libwww2 libXmx libhtmlw libnut src
@echo \*\*\* Welcome to NCSA Mosaic.
purifyd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-purifyd
@echo \*\*\* Welcome to Purify'd NCSA Mosaic.
quantifyd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-quantifyd
@echo \*\*\* Welcome to Quantify'd NCSA Mosaic.
staticd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static
@echo \*\*\* Welcome to NCSA Mosaic linked static.
static_motifd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-motif
@echo \*\*\* Welcome to NCSA Mosaic linked static for motif.
p_staticd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-purifyd
@echo \*\*\* Welcome to Purify'd NCSA Mosaic linked static.
p_static_motifd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-motif-purifyd
@echo \*\*\* Welcome to Purify'd NCSA Mosaic linked static for motif.
q_staticd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-quantifyd
@echo \*\*\* Welcome to Quantify'd NCSA Mosaic linked static.
q_static_motifd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-motif-quantifyd
@echo \*\*\* Welcome to Quantify'd NCSA Mosaic linked static for motif.
libXmx::
@echo --- Building libXmx
cd libXmx; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(xinc)"
libhtmlw::
@echo --- Building libhtmlw
cd libhtmlw; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(knrflag) $(xinc) -DMOTIF -DXMOSAIC"
libwww2::
@echo --- Building libwww2
cd libwww2; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(knrflag) $(waisflags) $(krbflags) $(xinc)"
libnut::
@echo --- Building libnut
cd libnut; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(knrflag)"
src::
@echo --- Building src
cd src; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic"
src-purifyd::
@echo --- Building Purify'd src
cd src; $(MAKE) PURIFY=$(PURIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-p"
src-quantifyd::
@echo --- Building Quantify'd src
cd src; $(MAKE) PURIFY=$(QUANTIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-q"
src-static::
@echo --- Building src-static
cd src; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags) -static" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic"
src-static-motif::
@echo --- Building src-static-motif
cd src; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_motif_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic"
src-static-purifyd::
@echo --- Building src-static-purifyd
cd src; $(MAKE) PURIFY=$(PURIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags) -static" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-p"
src-static-motif-purifyd::
@echo --- Building src-static-motif-purifyd
cd src; $(MAKE) PURIFY=$(PURIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_motif_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-p"
src-static-quantifyd::
@echo --- Building src-static-quantifyd
cd src; $(MAKE) PURIFY=$(QUANTIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags) -static" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-q"
src-static-motif-quantifyd::
@echo --- Building src-static-motif-quantifyd
cd src; $(MAKE) PURIFY=$(QUANTIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_motif_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-q"
libnet::
@echo --- Building libnet
cd libnet; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(dtmflags)"
libdtm::
@echo --- Building libdtm
cd libdtm; $(MAKE) $(dtmmachtype) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(dtmflags)"
clean:
cd libXmx; $(MAKE) $@
cd libhtmlw; $(MAKE) $@
cd libwww2; $(MAKE) $@
cd src; $(MAKE) MOSAIC="Mosaic" $@
cd libnet; $(MAKE) $@
cd libdtm; $(MAKE) $@
cd libnut; $(MAKE) $@
wclean:
cd libhtmlw; $(MAKE) $@
cd src; $(MAKE) MOSAIC="Mosaic" $@
commit:
cvs commit
update:
cvs update
countlines:
wc libdtm/*.[ch] libnet/*.[ch] libXmx/*.[ch] libhtmlw/*.[ch] libwww2/*.[ch] src/*.[ch]
replicate:
cp Makefile Makefile.sun
cp Makefile Makefile.ibm
cp Makefile Makefile.dec
cp Makefile Makefile.alpha
cp Makefile Makefile.hp
prune:
mv Makefile.sun Makefile.sun.old
mv Makefile.ibm Makefile.ibm.old
mv Makefile.dec Makefile.dec.old
mv Makefile.alpha Makefile.alpha.old
mv Makefile.hp Makefile.hp.old

View File

@ -232,7 +232,7 @@ CWARNINGS = -Wall \
-Wno-char-subscripts \ -Wno-char-subscripts \
-Wno-unused-result -Wno-unused-result
CFLAGS = -g $(sysconfigflags) $(prereleaseflags) $(CWARNINGS) $(customflags) CFLAGS = -fcommon -g $(sysconfigflags) $(prereleaseflags) $(CWARNINGS) $(customflags)
# Don't worry about these -- for development purposes only. # Don't worry about these -- for development purposes only.
PURIFY = purify PURIFY = purify

353
makefiles/Makefile.netbsd Executable file
View File

@ -0,0 +1,353 @@
# Toplevel Makefile for NCSA Mosaic.
# You shouldn't need to touch any of the Makefiles in the various
# subdirectories if you configure this Makefile correctly.
# If you need to make serious changes to get Mosaic to compile on your
# platform, send context diffs to mosaic-x@ncsa.uiuc.edu.
# -------------------------- CUSTOMIZABLE OPTIONS ----------------------------
#prereleaseflags = -DPRERELEASE
prereleaseflags = -DPRERELEASE
#RANLIB = /bin/true
#### On non-SGI's, this should be ranlib.
RANLIB = ranlib
#CC = cc
#### On Sun's, this should be gcc (ANSI required).
CC = cc
#### Linker Flags
ldflags = -R/usr/X11R7/lib -R/usr/pkg/lib -L/usr/pkg/lib -L/usr/X11R7/lib
#### For a few files in the source, some compilers may need to be kicked
#### in K&R mode. E.g., on SGI's, -cckr does this.
#knrflag = -cckr
#### On most systems, no flag is needed.
knrflag =
#### Random system configuration flags.
#### --> *** For Motif 1.2 ON ANY PLATFORM, do -DMOTIF1_2 *** <--
#### For IBM AIX 3.2, do -D_BSD
#### For NeXT, do -DNEXT
#### For HP/UX, do -Aa -D_HPUX_SOURCE
#### For Dell SVR4, do -DSVR4
#### For Solaris, do -DSVR4
#### For Esix 4.0.4 and Solaris x86 2.1, do -DSVR4
#### For Convex whatever, do -DCONVEX
#### For SCO ODT 3.0, do -DSCO -DSVR4 -DMOTIF1_2
#### For Motorola SVR4, do -DSVR4 -DMOTOROLA -DMOTIF1_2
sysconfigflags = -DMOTIF1_2 -DLINUX
#### System libraries.
# syslibs = -lPW -lsun -lmalloc
#### For AIX 3.2
# syslibs = -lPW -lbsd
#### For most other Motif platforms:
# syslibs = -lPW
#### For Sun's and Ultrix and HP and BSD/386:
# syslibs =
#### For Sun's with no DNS:
# syslibs = -lresolv
#### For SCO ODT:
# syslibs = -lPW -lsocket -lmalloc
#### For Dell SVR4:
# syslibs = -lnsl -lsocket -lc -lucb
#### For Solaris (?)
# syslibs = -lnsl -lsocket -lgen
#### For Motorola SVR4:
# syslibs = -lnsl -lsocket -lgen
syslibs = -lc
#### X include file locations -- if your platform puts the X include
#### files in a strange place, set this variable appropriately. Else
#### don't worry about it.
#### HP X11R4 version:
# xinc = -I/usr/include/Motif1.1 -I/usr/include/X11R4
#### HP X11R5 version:
# xinc = -I/usr/include/Motif1.2 -I/usr/local/X11R5/include
#### NeXT version:
# xinc = -I/usr/include/X11
#### BSD/386
# xinc = -I/usr/X11/include
#xinc = -I/usr/X11R7/include
xinc = -I/usr/X11R7/include
#### X library locations.
# xlibs = -lXm_s -lXmu -lXt_s -lX11_s
#### For Sun's (at least running stock X/Motif as installed on our machines):
# xlibs = /usr/lib/libXm.a /usr/lib/libXmu.a /usr/lib/libXt.a /usr/lib/libXext.a /usr/lib/libX11.a -lm #### For HP-UX 8.00:
# xlibs = -L/usr/lib/Motif1.1 -lXm -L/usr/lib/X11R4 -lXmu -lXt -lX11
#### For HP-UX 9.01: The X11R5 libraries are here on our systems
# xlibs = -L/usr/lib/Motif1.2 -lXm -L/usr/lib/X11R5 -L/usr/lib/X11R4 -lXmu -lXt -lX11
#### For NeXT:
# xlibs = -L/usr/lib/X11 -lXm -lXmu -lXt -lX11
#### For Dell SVR4:
# xlibs = -L/usr/X5/lib -lXm -lXmu -lXt -lXext -lX11
#### For Solaris (?)
# xlibs = -lXm -lXmu -lXt -lXext -lX11 -lm
#### For SCO ODT 3.0 (I'm told that -lXtXm_s is *not* a typo :-):
# xlibs = -lXtXm_s -lXmu -lX11_s
#### For nearly everyone else:
# xlibs = -lXm -lXmu -lXt -lX11
#### For Linux -- You must set "LD_LIBRARY_PATH" to include the path to
#### your X libs, or some may not be found by the loader. Check the
#### loader with "ldd Mosaic" after you build.
#xlibs = -L/usr/X11R7/lib -lXext -lXpm -lXm -lXmu -lXt -lX11 -lICE -lSM
xlibs = -L/usr/X11R7/lib -L/usr/pkg/lib -lXext -lXpm -lXm -lXmu -lXt -lX11 -lICE -lSM
static_motif_xlibs = -L/usr/X11R7/lib -lXext -lXpm -lXft /usr/pkg/lib/libXm.a -lXmu -lXt -lX11 -lICE -lSM
static_xlibs = /usr/X11R7/lib/libXpm.a /usr/pkg/lib/libXm.a /usr/X11R7/lib/libXmu.a /usr/X11R7/lib/libXt.a /usr/X11R7/lib/libXext.a /usr/X11R7/lib/libX11.a /usr/X11R7/lib/libSM.a /usr/X11R7/lib/libICE.a /usr/X11R7/lib/libxcb.a /usr/X11R7/lib/libXfont.a /usr/X11R7/lib/libXau.a /usr/X11R7/lib/libXdmcp.a /usr/X11R7/lib/libXft.a /usr/X11R7/lib/libfontconfig.a /usr/X11R7/lib/libXrender.a /usr/X11R7/lib/libfreetype.a /usr/lib/libexpat.a /usr/X11R7/lib/libX11.a
#### For BSD/386:
# xlibs = -L/usr/X11/lib -lXm -lXmu -lXt -lX11
#### For Motorola SVR4:
# xlibs = -lXm -lXmu -lXt -lXext -lX11 -lm
#### DTM AND HDF SUPPORT; READ CAREFULLY
#### If you want to compile with DTM and HDF support, you should leave
#### the following lines uncommented and make sure you have a copy of
#### HDF 3.3 (r1 or later) installed and ready. You can find HDF on
#### ftp.ncsa.uiuc.edu in /HDF.
#### If you do not want to compile with DTM and HDF support, comment
#### the following lines out. (If you are compiling from source for
#### the first time, you should probably not bother with HDF and DTM
#### support.)
#### dtmmachtype needs to be set to one of the following:
#### sun, sgi, dec, ibm, next, cray, convex
#### If your platform is not one of the above, then either do not compile
#### with HDF/DTM support or try hacking libdtm/makefile.
#dtmmachtype = sun
#dtmdirs = libdtm libnet
#dtmlibs = ../libnet/libnet.a ../libdtm/libdtm.a
#dtmflags = -DHAVE_DTM -I.. -I../libnet
#hdfdir = /hdf2/install/linux
#hdflibs = $(hdfdir)/lib/libnetcdf.a $(hdfdir)/lib/libdf.a
#hdfflags = -DHAVE_HDF -I$(hdfdir)/include
#### PNG SUPPORT
#### For inline PNG support, the following should be defined:
#### The libraries currently used are PNGLIB 0.81 and ZLIB 0.95
# SAM pngdir = /xdev/mosaic/libpng/linux
# SAM pnglibdir = $(pngdir)/lib
# SAM pngincludedir = $(pngdir)/include
# SAM pnglibs = $(pnglibdir)/libpng.a $(pnglibdir)/libz.a /usr/lib/libm.a
# SAM pngflags = -I$(pngincludedir) -DHAVE_PNG
pnglibs = -lpng16 -lz -lm
pngflags = -DHAVE_PNG
#### JPEG SUPPORT
#### For inline JPEG support, the following should be defined:
#### The library used is Independent JPEG Group (IJG's) 5.0a.
# SAM jpegdir = /xdev/mosaic/libjpeg/linux
# SAM jpeglibs = $(jpegdir)/lib/libjpeg.a
#SAM jpegflags = -I$(jpegdir)/include -DHAVE_JPEG
jpeglibs = -ljpeg
jpegflags = -DHAVE_JPEG
#### KERBEROS SUPPORT
####
#### If you want Mosaic to support Kerberos authentication, set the
#### following flags appropriately. You can support Kerberos V4 and/or V5,
#### although it's most likely that your realm supports one or the other.
#### To enable DES-encryption of HTTP messages via Kerberos key exchange,
#### define the KRB-ENCRYPT flag.
##krb4dir = /usr/athena
#krb4dir = /xdev/mosaic/libkrb4/linux
#krb4libs = $(krb4dir)/lib/libkrb.a $(krb4dir)/lib/libdes.a
#krb4flags = -DKRB4 -I$(krb4dir)/include
##krb5dir = /krb5
#krb5dir = /xdev/mosaic/libkrb5/linux
#krb5libs = $(krb5dir)/lib/libkrb5.a $(krb5dir)/lib/libcrypto.a $(krb5dir)/util/et/libcom_err.a
#krb5flags = -DKRB5 -I$(krb5dir)/include -I$(krb5dir)/include/krb5
#Do not comment out.
krbflags = $(krb4flags) $(krb5flags)
krblibs = $(krb4libs) $(krb5libs)
#### DIRECT WAIS SUPPORT
#### If you want to have Mosaic be able to communicate directly with
#### WAIS servers, do set the following flags appropriately. We
#### recommend linking with CNIDR's freeWAIS 0.5 distribution; other
#### WAIS distributions may work but we have not tested them with
#### Mosaic. freeWAIS 0.5 can currently (Sept.1995) be found at
#### ftp://sunsite.unc.edu/pub/wais/servers/freeWAIS
#### If you do not wish to link to the WAIS libraries, then comment
#### the following lines out. Mosaic will then communicate with WAIS
#### servers via a HTTP gateway.
#### -lm is required for freeWAIS 0.5, as ceil() is used.
#waisroot = /xdev/mosaic/freeWAIS/linux
#waisflags = -DDIRECT_WAIS -I$(waisroot)/include
#waislibdir = $(waisroot)/bin
#waislibs = $(waislibdir)/inv.a $(waislibdir)/wais.a $(waislibdir)/libftw.a -lm
#### Customization flags:
#### . If you want Mosaic to come up with monochrome colors by default,
#### use -DMONO_DEFAULT
#### . If you want to define the default Mosaic home page, set
#### -DHOME_PAGE_DEFAULT=\\\"url\\\"
#### . If you want to define the default Mosaic documentation directory
#### (should be a URL), set -DDOCS_DIRECTORY_DEFAULT=\\\"url\\\"
#### . Other things you can define are spelled out in src/mosaic.h.
customflags =
########
########
#### NOTE! If you get errors because of the following line, it means
#### you are NOT using GNUs Make program. The following line is basically
#### for the developers at NCSA to customize the build process without
#### modifying the Makefiles, so you may comment it out without harm.
########
########
-include local-defines/$(DEV_ARCH)
# ---------------------- END OF CUSTOMIZABLE OPTIONS -------------------------
# Disable certain warnings as we don't care for them
CWARNINGS = -Wall \
-Wno-parentheses \
-Wno-switch -Wno-switch-enum \
-Wno-char-subscripts \
-Wno-unused-result
CFLAGS = -fcommon -g $(sysconfigflags) $(prereleaseflags) $(CWARNINGS) $(customflags) -I/usr/X11R7/include -I/usr/pkg/include
# Don't worry about these -- for development purposes only.
PURIFY = purify
QUANTIFY = quantify
default: $(dtmdirs) libwww2 libXmx libhtmlw libnut src
@echo \*\*\* Welcome to NCSA Mosaic.
purifyd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-purifyd
@echo \*\*\* Welcome to Purify'd NCSA Mosaic.
quantifyd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-quantifyd
@echo \*\*\* Welcome to Quantify'd NCSA Mosaic.
staticd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static
@echo \*\*\* Welcome to NCSA Mosaic linked static.
static_motifd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-motif
@echo \*\*\* Welcome to NCSA Mosaic linked static for motif.
p_staticd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-purifyd
@echo \*\*\* Welcome to Purify'd NCSA Mosaic linked static.
p_static_motifd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-motif-purifyd
@echo \*\*\* Welcome to Purify'd NCSA Mosaic linked static for motif.
q_staticd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-quantifyd
@echo \*\*\* Welcome to Quantify'd NCSA Mosaic linked static.
q_static_motifd: $(dtmdirs) libwww2 libXmx libhtmlw libnut src-static-motif-quantifyd
@echo \*\*\* Welcome to Quantify'd NCSA Mosaic linked static for motif.
libXmx::
@echo --- Building libXmx
cd libXmx; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(xinc)"
libhtmlw::
@echo --- Building libhtmlw
cd libhtmlw; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(knrflag) $(xinc) -DMOTIF -DXMOSAIC"
libwww2::
@echo --- Building libwww2
cd libwww2; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(knrflag) $(waisflags) $(krbflags) $(xinc)"
libnut::
@echo --- Building libnut
cd libnut; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(knrflag)"
src::
@echo --- Building src
cd src; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic"
src-purifyd::
@echo --- Building Purify'd src
cd src; $(MAKE) PURIFY=$(PURIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-p"
src-quantifyd::
@echo --- Building Quantify'd src
cd src; $(MAKE) PURIFY=$(QUANTIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-q"
src-static::
@echo --- Building src-static
cd src; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags) -static" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic"
src-static-motif::
@echo --- Building src-static-motif
cd src; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_motif_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic"
src-static-purifyd::
@echo --- Building src-static-purifyd
cd src; $(MAKE) PURIFY=$(PURIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags) -static" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-p"
src-static-motif-purifyd::
@echo --- Building src-static-motif-purifyd
cd src; $(MAKE) PURIFY=$(PURIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_motif_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-p"
src-static-quantifyd::
@echo --- Building src-static-quantifyd
cd src; $(MAKE) PURIFY=$(QUANTIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags) -static" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-q"
src-static-motif-quantifyd::
@echo --- Building src-static-motif-quantifyd
cd src; $(MAKE) PURIFY=$(QUANTIFY) CC=$(CC) RANLIB=$(RANLIB) LDFLAGS="$(ldflags)" CFLAGS="$(CFLAGS) $(customflags) $(xinc) $(jpegflags) $(dtmflags) $(hdfflags) $(pngflags) $(krbflags) -I.. -I../libXmx -I../libwww2" AUX_CFLAGS=$(knrflag) X_LIBS="$(static_motif_xlibs)" SYS_LIBS="$(sockslibs) $(syslibs)" DTM_LIBS="$(dtmlibs)" HDF_LIBS="$(hdflibs)" WAIS_LIBS="$(waislibs)" LIBWWW_DIR=../libwww2 JPEG_LIBS="$(jpeglibs)" PNG_LIBS="$(pnglibs)" KRB_LIBS="$(krblibs)" LIBNUT_DIR=../libnut MOSAIC="Mosaic-q"
libnet::
@echo --- Building libnet
cd libnet; $(MAKE) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(dtmflags)"
libdtm::
@echo --- Building libdtm
cd libdtm; $(MAKE) $(dtmmachtype) CC=$(CC) RANLIB=$(RANLIB) CFLAGS="$(CFLAGS) $(dtmflags)"
clean:
cd libXmx; $(MAKE) $@
cd libhtmlw; $(MAKE) $@
cd libwww2; $(MAKE) $@
cd src; $(MAKE) MOSAIC="Mosaic" $@
cd libnet; $(MAKE) $@
cd libdtm; $(MAKE) $@
cd libnut; $(MAKE) $@
wclean:
cd libhtmlw; $(MAKE) $@
cd src; $(MAKE) MOSAIC="Mosaic" $@
commit:
cvs commit
update:
cvs update
countlines:
wc libdtm/*.[ch] libnet/*.[ch] libXmx/*.[ch] libhtmlw/*.[ch] libwww2/*.[ch] src/*.[ch]
replicate:
cp Makefile Makefile.sun
cp Makefile Makefile.ibm
cp Makefile Makefile.dec
cp Makefile Makefile.alpha
cp Makefile Makefile.hp
prune:
mv Makefile.sun Makefile.sun.old
mv Makefile.ibm Makefile.ibm.old
mv Makefile.dec Makefile.dec.old
mv Makefile.alpha Makefile.alpha.old
mv Makefile.hp Makefile.hp.old

30
platform-configs/config.unicos Executable file
View File

@ -0,0 +1,30 @@
#! /bin/sh
# A script to store configuration variables for Mosaic's external
# software packages
#
# In all cases configure will check the dir you supply for all libs and
# header files as well the lib and include subdirectories of that directory.
# So if you do things right and install everything in a place like
# /usr/local/include and /usr/local/lib
# you can just enter /usr/local (the default) for every field.
#
# Where to find jpeg stuff
jpegdir=/xdev/mosaic/libjpeg/linux
# Where to find libz (don't need any headers)
zdir=/xdev/mosaic/libpng/linux
# Where to find png stuff
pngdir=/xdev/mosaic/libpng/linux
# Where to find wais stuff
waisdir=/xdev/mosaic/freeWAIS/linux
# Where to find hdf stuff
hdfdir=
# Use DTM? (yes or no)
with_dtm=no
echo ./configure --with-jpegdir=$jpegdir --with-zdir=${zdir} --with-pngdir=$pngdir --with-wais=$waisdir --with-hdfdir=$hdfdir --enable-dtm=$with_dtm $*
./configure --with-jpegdir=$jpegdir --with-zdir=${zdir} --with-pngdir=$pngdir --with-wais=$waisdir --with-hdfdir=$hdfdir --enable-dtm=$with_dtm $*

View File

@ -367,7 +367,7 @@ static XmxCallback (save_win_cb)
XtUnmanageChild (win->save_win); XtUnmanageChild (win->save_win);
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value, XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET, XmFONTLIST_DEFAULT_TAG,
&fname); &fname);
pathEval (efname, fname); pathEval (efname, fname);
@ -585,7 +585,7 @@ char fileBuf[2048],*fileBoxFileName;
XtVaGetValues(win->save_win, XtVaGetValues(win->save_win,
XmNdirSpec, &fbfn, XmNdirSpec, &fbfn,
NULL); NULL);
if (!XmStringGetLtoR(fbfn,XmSTRING_DEFAULT_CHARSET,&fileBoxFileName)) { if (!XmStringGetLtoR(fbfn,XmFONTLIST_DEFAULT_TAG,&fileBoxFileName)) {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
fprintf(stderr,"Internal Error In Save As... PLEASE REPORT THIS!\n"); fprintf(stderr,"Internal Error In Save As... PLEASE REPORT THIS!\n");
@ -597,7 +597,7 @@ char fileBuf[2048],*fileBoxFileName;
if (*fileBoxFileName && win && win->current_node && win->current_node->url && *(win->current_node->url)) { if (*fileBoxFileName && win && win->current_node && win->current_node->url && *(win->current_node->url)) {
/*no need to check on NULL from getFileName as we know url exists*/ /*no need to check on NULL from getFileName as we know url exists*/
sprintf(fileBuf,"%s%s",fileBoxFileName,getFileName(win->current_node->url)); sprintf(fileBuf,"%s%s",fileBoxFileName,getFileName(win->current_node->url));
sfn=XmStringCreateLtoR(fileBuf,XmSTRING_DEFAULT_CHARSET); sfn=XmStringCreateLtoR(fileBuf,XmFONTLIST_DEFAULT_TAG);
XtVaSetValues(win->save_win, XtVaSetValues(win->save_win,
XmNdirSpec, sfn, XmNdirSpec, sfn,
NULL); NULL);
@ -676,7 +676,7 @@ static XmxCallback (savebinary_win_cb)
XtUnmanageChild (win->savebinary_win); XtUnmanageChild (win->savebinary_win);
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value, XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET, XmFONTLIST_DEFAULT_TAG,
&fname); &fname);
pathEval (efname, fname); pathEval (efname, fname);
@ -729,7 +729,7 @@ char fileBuf[2048],*fileBoxFileName;
XtVaGetValues(win->savebinary_win, XtVaGetValues(win->savebinary_win,
XmNdirSpec, &fbfn, XmNdirSpec, &fbfn,
NULL); NULL);
if (!XmStringGetLtoR(fbfn,XmSTRING_DEFAULT_CHARSET,&fileBoxFileName)) { if (!XmStringGetLtoR(fbfn,XmFONTLIST_DEFAULT_TAG,&fileBoxFileName)) {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
fprintf(stderr,"Internal Error In Save Binary... PLEASE REPORT THIS!\n"); fprintf(stderr,"Internal Error In Save Binary... PLEASE REPORT THIS!\n");
@ -749,7 +749,7 @@ char fileBuf[2048],*fileBoxFileName;
} }
} }
sprintf(fileBuf,"%s%s",fileBoxFileName,sptr); sprintf(fileBuf,"%s%s",fileBoxFileName,sptr);
sfn=XmStringCreateLtoR(fileBuf,XmSTRING_DEFAULT_CHARSET); sfn=XmStringCreateLtoR(fileBuf,XmFONTLIST_DEFAULT_TAG);
XtVaSetValues(win->savebinary_win, XtVaSetValues(win->savebinary_win,
XmNdirSpec, sfn, XmNdirSpec, sfn,
NULL); NULL);
@ -778,7 +778,7 @@ static XmxCallback (open_local_win_cb)
XtUnmanageChild (win->open_local_win); XtUnmanageChild (win->open_local_win);
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value, XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET, XmFONTLIST_DEFAULT_TAG,
&fname); &fname);
pathEval (efname, fname); pathEval (efname, fname);
@ -2705,6 +2705,7 @@ mo_status mo_edit_source(mo_window *win)
{ {
char *sourceFileName; char *sourceFileName;
FILE *fp; FILE *fp;
int fd;
int length; int length;
char *editorName; char *editorName;
char execString[1024]; char execString[1024];
@ -2748,10 +2749,10 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
/* write out source to tmp file with .html extension */ /* write out source to tmp file with .html extension */
sourceFileName = malloc(255); sourceFileName = malloc(255);
strcpy(sourceFileName, tmpnam(NULL)); strncpy(sourceFileName, "mosaic-XXXXXX.html\0", 19);
strcat(sourceFileName, ".html"); fd = mkstemps(sourceFileName, 5);
if (!(fp = fopen(sourceFileName,"w"))) if (!(fp = fdopen(fd, "w")))
{ {
char *buf, *final, tmpbuf[80]; char *buf, *final, tmpbuf[80];
int final_len; int final_len;

View File

@ -1218,7 +1218,7 @@ static void pointer_motion_callback (Widget w, char *href)
} else } else
href = " "; href = " ";
xmstr = XmStringCreateSimple (href); xmstr = XmStringCreateLocalized (href);
XtVaSetValues XtVaSetValues
(win->tracker_label, (win->tracker_label,
XmNlabelString, (XtArgVal)xmstr, XmNlabelString, (XtArgVal)xmstr,
@ -1433,7 +1433,7 @@ void mo_gui_notify_progress (char *msg)
if (!msg) if (!msg)
msg = " "; msg = " ";
xmstr = XmStringCreateSimple (msg); xmstr = XmStringCreateLocalized (msg);
XtVaSetValues XtVaSetValues
(win->tracker_label, (win->tracker_label,
XmNlabelString, (XtArgVal)xmstr, XmNlabelString, (XtArgVal)xmstr,
@ -2580,11 +2580,11 @@ Widget mo_fill_toolbar(mo_window *win, Widget top, int w, int h)
&tmpFont, &tmpFont,
NULL); NULL);
if (!tmpFont) { if (!tmpFont) {
fprintf(stderr,"Toolbar Font: Could not load! The X Resource is Mosaic*ToolbarFont\nDefault font is: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1\nExiting Mosaic."); fprintf(stderr,"Toolbar Font: Could not load! The X Resource is Mosaic*ToolbarFont\nDefault font is: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso10646-1\nExiting Mosaic.");
exit(1); exit(1);
} }
tmpFontList = XmFontListCreate(tmpFont,XmSTRING_DEFAULT_CHARSET); tmpFontList = XmFontListCreate(tmpFont,XmFONTLIST_DEFAULT_TAG);
} }
/* Which tools to show */ /* Which tools to show */

View File

@ -51,7 +51,7 @@
* Comments and questions are welcome and can be sent to * * Comments and questions are welcome and can be sent to *
* mosaic-x@ncsa.uiuc.edu. * * mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/ ****************************************************************************/
#define FONTNAME "-adobe-courier-medium-r-normal-*-17-*-*-*-*-*-iso8859-1" #define FONTNAME "-adobe-courier-medium-r-normal-*-17-*-*-*-*-*-iso10646-1"
#define TRANS_HTTP 0 #define TRANS_HTTP 0
#define TRANS_CCI 1 #define TRANS_CCI 1

View File

@ -78,6 +78,7 @@
#include <setjmp.h> #include <setjmp.h>
#define MAX(x,y) (((x) > (y)) ? (x) : (y)) #define MAX(x,y) (((x) > (y)) ? (x) : (y))
#define PNG_BYTES_TO_CHECK 4
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
extern int srcTrace; extern int srcTrace;
@ -96,49 +97,39 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
double screen_gamma; double screen_gamma;
png_byte *png_pixels=NULL, **row_pointers=NULL; png_byte *png_pixels=NULL, **row_pointers[*height];
int i, j; int i, j, bit_depth, color_type, num_palette, interlace_type;
unsigned int packets;
png_color std_color_cube[216]; png_color std_color_cube[216];
png_colorp palette;
/* first check to see if its a valid PNG file. If not, return. */ /* first check to see if its a valid PNG file. If not, return. */
/* we assume that infile is a valid filepointer */ /* we assume that infile is a valid filepointer */
{ {
int ret; png_byte buf[PNG_BYTES_TO_CHECK];
png_byte buf[8];
ret = fread(buf, 1, 8, infile); if (fread(buf, 1, PNG_BYTES_TO_CHECK, infile) != PNG_BYTES_TO_CHECK)
if(ret != 8)
return 0; return 0;
ret = png_sig_cmp(buf, 0, 8); return(!png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK));
if(ret)
return(0);
} }
/* OK, it is a valid PNG file, so let's rewind it, and start /* allocate the structures */
decoding it */
rewind(infile);
/* allocate the structures */
/*png_ptr = (png_struct *)malloc(sizeof(png_struct));*/
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if(!png_ptr) if(!png_ptr)
fclose(infile);
return 0; return 0;
/* initialize the structures */ /* initialize the structures */
info_ptr = png_create_info_struct(png_ptr); info_ptr = png_create_info_struct(png_ptr);
if(!info_ptr) { if(!info_ptr) {
/*free(png_ptr);*/ fclose(infile);
png_destroy_read_struct(png_ptr, NULL, NULL);
return 0; return 0;
} }
/* Establish the setjmp return context for png_error to use. */ /* Establish the setjmp return context for png_error to use. */
if (setjmp(png_jmpbuf(png_ptr))) { if (setjmp(png_jmpbuf(png_ptr))) {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
@ -147,17 +138,15 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
} }
#endif #endif
/*png_read_destroy(png_ptr, info_ptr, (png_info *)0); */ png_destroy_read_struct(png_ptr, info_ptr, NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL); fclose(infile);
if(png_pixels != NULL) if(png_pixels != NULL)
free((char *)png_pixels); free((char *)png_pixels);
if(row_pointers != NULL) if(row_pointers != NULL)
free((png_byte **)row_pointers); free((png_byte **)row_pointers);
/*free((char *)png_ptr);*/
free((char *)info_ptr);
return 0; return 0;
} }
@ -176,20 +165,22 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
/* setup other stuff using the fields of png_info. */ /* setup other stuff using the fields of png_info. */
*width = (int)png_ptr->width; png_get_IHDR(png_ptr, info_ptr, width, height, &bit_depth, &color_type, &interlace_type, NULL, NULL);
*height = (int)png_ptr->height;
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
fprintf(stderr,"\n\nBEFORE\nheight = %d\n", (int)png_ptr->width); fprintf(stderr,"\n\nBEFORE\nwidth = %ls\n", width);
fprintf(stderr,"width = %d\n", (int)png_ptr->height); fprintf(stderr,"height = %ls\n", height);
fprintf(stderr,"bit depth = %d\n", info_ptr->bit_depth); fprintf(stderr,"bit depth = %d\n", bit_depth);
fprintf(stderr,"color type = %d\n", info_ptr->color_type); fprintf(stderr,"color type = %d\n", color_type);
fprintf(stderr,"interlace type = %d\n", interlace_type);
/*
fprintf(stderr,"compression type = %d\n", info_ptr->compression_type); fprintf(stderr,"compression type = %d\n", info_ptr->compression_type);
fprintf(stderr,"filter type = %d\n", info_ptr->filter_type); fprintf(stderr,"filter type = %d\n", info_ptr->filter_type);
fprintf(stderr,"interlace type = %d\n", info_ptr->interlace_type);
fprintf(stderr,"num colors = %d\n",info_ptr->num_palette); fprintf(stderr,"num colors = %d\n",info_ptr->num_palette);
fprintf(stderr,"rowbytes = %d\n", info_ptr->rowbytes); fprintf(stderr,"rowbytes = %d\n", info_ptr->rowbytes);
*/
} }
#endif #endif
@ -200,28 +191,28 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
/* its #if'ed out for now cause I don't have anything to /* its #if'ed out for now cause I don't have anything to
test it with */ test it with */
{ {
png_color_16 my_background; png_color_16 my_background, *image_background;
if (info_ptr->valid & PNG_INFO_bKGD) if (PNG_INFO_bKGD(png_ptr, info_ptr, &image_background) != 0)
png_set_background(png_ptr, &(info_ptr->background), png_set_background(png_ptr, image_background,
PNG_GAMMA_FILE, 1, 1.0); PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
else else
png_set_background(png_ptr, &my_background, png_set_background(png_ptr, &my_background,
PNG_GAMMA_SCREEN, 0, 1.0); PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
} }
#endif #endif
/* strip pixels in 16-bit images down to 8 bits */ /* strip pixels in 16-bit images down to 8 bits */
if (info_ptr->bit_depth == 16) if (bit_depth == 16)
png_set_strip_16(png_ptr); png_set_strip_16(png_ptr);
/* If it is a color image then check if it has a palette. If not /* If it is a color image then check if it has a palette. If not
then dither the image to 256 colors, and make up a palette */ then dither the image to 256 colors, and make up a palette */
if (info_ptr->color_type==PNG_COLOR_TYPE_RGB || if (color_type==PNG_COLOR_TYPE_RGB ||
info_ptr->color_type==PNG_COLOR_TYPE_RGB_ALPHA) { color_type==PNG_COLOR_TYPE_RGB_ALPHA) {
if(! (info_ptr->valid & PNG_INFO_PLTE)) { if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) != 0) {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
@ -239,7 +230,7 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
/* this should probably be dithering to /* this should probably be dithering to
Rdata.colors_per_inlined_image colors */ Rdata.colors_per_inlined_image colors */
png_set_dither(png_ptr, std_color_cube, png_set_quantize(png_ptr, std_color_cube,
216, 216,
216, NULL, 1); 216, NULL, 1);
@ -250,10 +241,12 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
} }
#endif #endif
png_set_dither(png_ptr, info_ptr->palette, png_uint_16p histogram = NULL;
info_ptr->num_palette, png_get_hIST(png_ptr, info_ptr, &histogram);
png_set_quantize(png_ptr, palette,
num_palette,
get_pref_int(eCOLORS_PER_INLINED_IMAGE), get_pref_int(eCOLORS_PER_INLINED_IMAGE),
info_ptr->hist, 1); histogram, 1);
} }
} }
@ -262,14 +255,14 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
small as they can. This expands pixels to 1 pixel per byte, and small as they can. This expands pixels to 1 pixel per byte, and
if a transparency value is supplied, an alpha channel is if a transparency value is supplied, an alpha channel is
built.*/ built.*/
if (info_ptr->bit_depth < 8) if (bit_depth < 8)
png_set_packing(png_ptr); png_set_packing(png_ptr);
/* have libpng handle the gamma conversion */ /* have libpng handle the gamma conversion */
if (get_pref_boolean(eUSE_SCREEN_GAMMA)) { /*SWP*/ if (get_pref_boolean(eUSE_SCREEN_GAMMA)) { /*SWP*/
if (info_ptr->bit_depth != 16) { /* temporary .. glennrp */ if (bit_depth != 16) { /* temporary .. glennrp */
screen_gamma=(double)(get_pref_float(eSCREEN_GAMMA)); screen_gamma=(double)(get_pref_float(eSCREEN_GAMMA));
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
@ -277,53 +270,56 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
fprintf(stderr,"screen gamma=%f\n",screen_gamma); fprintf(stderr,"screen gamma=%f\n",screen_gamma);
} }
#endif #endif
if (info_ptr->valid & PNG_INFO_gAMA) { double image_gamma;
if (png_get_gAMA(png_ptr, info_ptr, &image_gamma) != 0) {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
printf("setting gamma=%f\n",info_ptr->gamma); printf("setting gamma=%f\n", image_gamma);
} }
#endif #endif
png_set_gamma(png_ptr, screen_gamma, (double)info_ptr->gamma); png_set_gamma(png_ptr, screen_gamma, image_gamma);
} }
else { else {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
fprintf(stderr,"setting gamma=%f\n",0.45); fprintf(stderr,"setting gamma=%f\n",0.45455);
} }
#endif #endif
png_set_gamma(png_ptr, screen_gamma, (double)0.45); png_set_gamma(png_ptr, screen_gamma, 0.45455);
} }
} }
} }
if (info_ptr->interlace_type) if (interlace_type)
png_set_interlace_handling(png_ptr); png_set_interlace_handling(png_ptr);
png_read_update_info(png_ptr, info_ptr); png_read_update_info(png_ptr, info_ptr);
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
fprintf(stderr,"\n\nAFTER\nheight = %d\n", (int)png_ptr->width); fprintf(stderr,"\n\nAFTER\nwidth = %ls\n", width);
fprintf(stderr,"width = %d\n", (int)png_ptr->height); fprintf(stderr,"height = %ls\n", height);
fprintf(stderr,"bit depth = %d\n", info_ptr->bit_depth); fprintf(stderr,"bit depth = %d\n", bit_depth);
fprintf(stderr,"color type = %d\n", info_ptr->color_type); fprintf(stderr,"color type = %d\n", color_type);
fprintf(stderr,"interlace type = %d\n", interlace_type);
/*
fprintf(stderr,"compression type = %d\n", info_ptr->compression_type); fprintf(stderr,"compression type = %d\n", info_ptr->compression_type);
fprintf(stderr,"filter type = %d\n", info_ptr->filter_type); fprintf(stderr,"filter type = %d\n", info_ptr->filter_type);
fprintf(stderr,"interlace type = %d\n", info_ptr->interlace_type);
fprintf(stderr,"num colors = %d\n",info_ptr->num_palette); fprintf(stderr,"num colors = %d\n",info_ptr->num_palette);
fprintf(stderr,"rowbytes = %d\n", info_ptr->rowbytes); fprintf(stderr,"rowbytes = %d\n", info_ptr->rowbytes);
*/
} }
#endif #endif
/* allocate the pixel grid which we will need to send to /* allocate the pixel grid which we will need to send to
png_read_image(). */ png_read_image(). */
png_pixels = (png_byte *)malloc(info_ptr->rowbytes * int rowbytes = png_get_rowbytes(png_ptr, info_ptr);
png_pixels = (png_byte *)malloc(rowbytes *
(*height) * sizeof(png_byte)); (*height) * sizeof(png_byte));
row_pointers = (png_byte **) malloc((*height) * sizeof(png_byte *));
for (i=0; i < *height; i++) for (i=0; i < *height; i++)
row_pointers[i]=png_pixels+(info_ptr->rowbytes*i); row_pointers[i]=png_malloc(png_ptr, rowbytes);
/* FINALLY - read the darn thing. */ /* FINALLY - read the darn thing. */
@ -332,13 +328,13 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
/* now that we have the (transformed to 8-bit RGB) image, we have /* now that we have the (transformed to 8-bit RGB) image, we have
to copy the resulting palette to our colormap. */ to copy the resulting palette to our colormap. */
if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) { if (color_type & PNG_COLOR_MASK_COLOR) {
if (info_ptr->valid & PNG_INFO_PLTE) { if (png_get_PLTE(png_ptr, info_ptr, palette, num_palette) != 0) {
for (i=0; i < info_ptr->num_palette; i++) { for (i=0; i < num_palette; i++) {
colrs[i].red = info_ptr->palette[i].red << 8; colrs[i].red = palette[i].red << 8;
colrs[i].green = info_ptr->palette[i].green << 8; colrs[i].green = palette[i].green << 8;
colrs[i].blue = info_ptr->palette[i].blue << 8; colrs[i].blue = palette[i].blue << 8;
colrs[i].pixel = i; colrs[i].pixel = i;
colrs[i].flags = DoRed|DoGreen|DoBlue; colrs[i].flags = DoRed|DoGreen|DoBlue;
} }
@ -373,7 +369,7 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
/* if there is an alpha channel, we have to get rid of it in the /* if there is an alpha channel, we have to get rid of it in the
pixmap, since I don't do anything with it yet */ pixmap, since I don't do anything with it yet */
if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) { if (color_type & PNG_COLOR_MASK_ALPHA) {
#ifndef DISABLE_TRACE #ifndef DISABLE_TRACE
if (srcTrace) { if (srcTrace) {
@ -387,8 +383,6 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
q++; /* skip the alpha pixel */ q++; /* skip the alpha pixel */
} }
} }
free((char *)png_pixels);
} }
else { else {
@ -404,21 +398,13 @@ ReadPNG(FILE *infile,int *width, int *height, XColor *colrs)
*p++ = *q++; /*palette index*/ *p++ = *q++; /*palette index*/
} }
} }
free((char *)png_pixels);
} }
free((char *)png_pixels);
free((png_byte **)row_pointers); free((png_byte **)row_pointers);
/* clean up after the read, and free any memory allocated */ /* clean up after the read, and free any memory allocated */
/*png_read_destroy(png_ptr, info_ptr, (png_info *)0);*/ png_destroy_read_struct(png_ptr, info_ptr, NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
/* free the structures */
/*free((char *)png_ptr);*/
free((char *)info_ptr);
return pixmap; return pixmap;
} }

View File

@ -588,32 +588,32 @@ static XrmOptionDescRec options[] = {
}; };
static String color_resources[] = { static String color_resources[] = {
"*XmLabel*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmLabel*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmScale*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmScale*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmBulletinBoard*labelFontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmBulletinBoard*labelFontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*optionmenu.XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*optionmenu.XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmPushButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmPushButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmPushButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmPushButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmToggleButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmToggleButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmToggleButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmToggleButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*optionmenu*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*optionmenu*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmIconGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmIconGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmBulletinBoard*buttonFontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmBulletinBoard*buttonFontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*menubar*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*menubar*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmPushButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmPushButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmLabelGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmLabelGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmPushButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmPushButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmToggleButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmToggleButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmToggleButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmToggleButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*pulldownmenu*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*pulldownmenu*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmList*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmList*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmText.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso8859-1", "*XmText.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso10646-1",
"*XmTextField.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso8859-1", "*XmTextField.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso10646-1",
"*optionmenu*marginHeight: 0", "*optionmenu*marginHeight: 0",
"*optionmenu*marginTop: 5", "*optionmenu*marginTop: 5",
@ -655,23 +655,23 @@ static String color_resources[] = {
/* "*geometry: +400+200", */ /* "*geometry: +400+200", */
/* "*keyboardFocusPolicy: pointer",*/ /* "*keyboardFocusPolicy: pointer",*/
"*TitleFont: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso8859-1", "*TitleFont: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso10646-1",
"*Font: -adobe-times-medium-r-normal-*-17-*-*-*-*-*-iso8859-1", "*Font: -adobe-times-medium-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*ItalicFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso8859-1", "*ItalicFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso10646-1",
"*BoldFont: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso8859-1", "*BoldFont: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*FixedFont: -adobe-courier-medium-r-normal-*-17-*-*-*-*-*-iso8859-1", "*FixedFont: -adobe-courier-medium-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*Header1Font: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso8859-1", "*Header1Font: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso10646-1",
"*Header2Font: -adobe-times-bold-r-normal-*-18-*-*-*-*-*-iso8859-1", "*Header2Font: -adobe-times-bold-r-normal-*-18-*-*-*-*-*-iso10646-1",
"*Header3Font: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso8859-1", "*Header3Font: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*Header4Font: -adobe-times-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*Header4Font: -adobe-times-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*Header5Font: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1", "*Header5Font: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso10646-1",
"*Header6Font: -adobe-times-bold-r-normal-*-10-*-*-*-*-*-iso8859-1", "*Header6Font: -adobe-times-bold-r-normal-*-10-*-*-*-*-*-iso10646-1",
"*AddressFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso8859-1", "*AddressFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso10646-1",
"*PlainFont: -adobe-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1", "*PlainFont: -adobe-courier-medium-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*ListingFont: -adobe-courier-medium-r-normal-*-12-*-*-*-*-*-iso8859-1", "*ListingFont: -adobe-courier-medium-r-normal-*-12-*-*-*-*-*-iso10646-1",
"*SupSubFont: -adobe-times-medium-r-normal-*-10-*-*-*-*-*-iso8859-1", "*SupSubFont: -adobe-times-medium-r-normal-*-10-*-*-*-*-*-iso10646-1",
"*MeterFont: -adobe-courier-bold-r-normal-*-14-*-*-*-*-*-*-*", "*MeterFont: -adobe-courier-bold-r-normal-*-14-*-*-*-*-*-*-*",
"*ToolbarFont: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1", "*ToolbarFont: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso10646-1",
"*AnchorUnderlines: 1", "*AnchorUnderlines: 1",
"*VisitedAnchorUnderlines: 1", "*VisitedAnchorUnderlines: 1",
"*DashedVisitedAnchorUnderlines: True", "*DashedVisitedAnchorUnderlines: True",
@ -746,32 +746,32 @@ static String color_resources[] = {
}; };
static String mono_resources[] = { static String mono_resources[] = {
"*XmLabel*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmLabel*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmScale*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmScale*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmBulletinBoard*labelFontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*XmBulletinBoard*labelFontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*optionmenu.XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*optionmenu.XmLabelGadget*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*XmPushButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmPushButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmPushButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmPushButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmToggleButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmToggleButton*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmToggleButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmToggleButtonGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*optionmenu*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*optionmenu*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmIconGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmIconGadget*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmBulletinBoard*buttonFontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmBulletinBoard*buttonFontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*menubar*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*menubar*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmPushButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmPushButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmLabelGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmLabelGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmPushButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmPushButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmCascadeButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmCascadeButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmToggleButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmToggleButton*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmMenuShell*XmToggleButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*XmMenuShell*XmToggleButtonGadget*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*pulldownmenu*fontList: -*-helvetica-bold-o-normal-*-14-*-iso8859-1", "*pulldownmenu*fontList: -*-helvetica-bold-o-normal-*-14-*-iso10646-1",
"*XmList*fontList: -*-helvetica-medium-r-normal-*-14-*-iso8859-1", "*XmList*fontList: -*-helvetica-medium-r-normal-*-14-*-iso10646-1",
"*XmText.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso8859-1", "*XmText.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso10646-1",
"*XmTextField.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso8859-1", "*XmTextField.fontList: -*-lucidatypewriter-medium-r-normal-*-14-*-iso10646-1",
"*optionmenu*marginHeight: 0", "*optionmenu*marginHeight: 0",
"*optionmenu*marginTop: 5", "*optionmenu*marginTop: 5",
@ -813,23 +813,23 @@ static String mono_resources[] = {
/* "*geometry: +400+200", */ /* "*geometry: +400+200", */
/* "*keyboardFocusPolicy: pointer", */ /* "*keyboardFocusPolicy: pointer", */
"*TitleFont: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso8859-1", "*TitleFont: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso10646-1",
"*Font: -adobe-times-medium-r-normal-*-17-*-*-*-*-*-iso8859-1", "*Font: -adobe-times-medium-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*ItalicFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso8859-1", "*ItalicFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso10646-1",
"*BoldFont: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso8859-1", "*BoldFont: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*FixedFont: -adobe-courier-medium-r-normal-*-17-*-*-*-*-*-iso8859-1", "*FixedFont: -adobe-courier-medium-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*Header1Font: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso8859-1", "*Header1Font: -adobe-times-bold-r-normal-*-24-*-*-*-*-*-iso10646-1",
"*Header2Font: -adobe-times-bold-r-normal-*-18-*-*-*-*-*-iso8859-1", "*Header2Font: -adobe-times-bold-r-normal-*-18-*-*-*-*-*-iso10646-1",
"*Header3Font: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso8859-1", "*Header3Font: -adobe-times-bold-r-normal-*-17-*-*-*-*-*-iso10646-1",
"*Header4Font: -adobe-times-bold-r-normal-*-14-*-*-*-*-*-iso8859-1", "*Header4Font: -adobe-times-bold-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*Header5Font: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1", "*Header5Font: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso10646-1",
"*Header6Font: -adobe-times-bold-r-normal-*-10-*-*-*-*-*-iso8859-1", "*Header6Font: -adobe-times-bold-r-normal-*-10-*-*-*-*-*-iso10646-1",
"*AddressFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso8859-1", "*AddressFont: -adobe-times-medium-i-normal-*-17-*-*-*-*-*-iso10646-1",
"*PlainFont: -adobe-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1", "*PlainFont: -adobe-courier-medium-r-normal-*-14-*-*-*-*-*-iso10646-1",
"*ListingFont: -adobe-courier-medium-r-normal-*-12-*-*-*-*-*-iso8859-1", "*ListingFont: -adobe-courier-medium-r-normal-*-12-*-*-*-*-*-iso10646-1",
"*SupSubFont: -adobe-courier-medium-r-normal-*-10-*-*-*-*-*-iso8859-1", "*SupSubFont: -adobe-courier-medium-r-normal-*-10-*-*-*-*-*-iso10646-1",
"*MeterFont: -adobe-courier-bold-r-normal-*-14-*-*-*-*-*-*-*", "*MeterFont: -adobe-courier-bold-r-normal-*-14-*-*-*-*-*-*-*",
"*ToolbarFont: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1", "*ToolbarFont: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso10646-1",
"*Foreground: black", "*Foreground: black",
"*Background: white", "*Background: white",