diff --git a/Common.tmpl b/Common.tmpl new file mode 100644 index 0000000..eff872b --- /dev/null +++ b/Common.tmpl @@ -0,0 +1,214 @@ +/* + * Common config file + */ + +/* + * Installation directories. + * + * CHIMERA_BINDIR - chimera's executable gets installed here. + * CHIMERA_LIBDIR - configuration files. someday. + * CHIMERA_MANDIR - directory to hold the outdated man page. + */ + +CHIMERA_PREFIX = /usr +CHIMERA_BINDIR = $(CHIMERA_PREFIX)/bin +CHIMERA_LIBDIR = $(CHIMERA_PREFIX)/lib/chimera +CHIMERA_MANDIR = $(CHIMERA_PREFIX)/man + +#if !defined(__QNX__) +LIBPRE=lib +LIBEXT=.a +#else +LIBPRE= +LIBEXT=3r.lib +#endif + +/* + * Add a bit of fluff to the end of the image library name if + * you need it. For example, on IRIX and Linux boxes its nice + * to use it to differentiate from the vendor libraries of the same + * name. + */ +/* +IMGLEXT = _local +*/ + +/* Uncomment and modify if you have the JPEG 6 library */ + +#define Use_JPEG +JPEGDIR = /usr +JPEGINCLUDE = -I$(JPEGDIR)/include +JPEGLIB = -L$(JPEGDIR)/lib -ljpeg$(IMGLEXT) + +/* Uncomment and modify if you have the PNG library */ + +#define Use_PNG +PNGDIR = /usr +PNGINCLUDE = -I$(PNGDIR)/include +PNGLIB = -L$(PNGDIR)/lib -lpng$(IMGLEXT) -lz$(IMGLEXT) + +/* Tells Imakefile to set the flags for debugging. Comment for -O. */ +/* #define CDebugging 1 */ + +/* You might need to force the compiler to gcc */ +/* +CC = gcc +*/ + +/* Add site stuff here */ +SITE_DEFINES = -DINET6 +SITE_LIBS = +SITE_DEPLIBS = +SITE_LDFLAGS = + +/* + * You should not have change anything below unless you add a new + * OS feature section or add your own module. + */ + +/* + * + * OS features + * + */ + +/* Sparcs */ +#if defined(SunArchitecture) +#if OSMajorVersion > 4 /* Solaris */ +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_SSIZE_T -DHAVE_STDARG_H +OS_LIBS = -lsocket -lnsl +#else /* SunOS 4.1.4 X11R6, gcc */ +#define NEED_MEMMOVE 1 +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_STDARG_H +OS_LIBS = +#endif +#define CConfigSet 1 +#endif + +/* DEC UNIX */ +#if defined(AlphaArchitecture) +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UTIME -DHAVE_MKTIME -D_BSD -DHAVE_SIZE_T -DHAVE_SSIZE_T \ + -DHAVE_STDARG_H +OS_LIBS = -lbsd +OS_DEBUG_FLAGS = -std1 +#define CConfigSet 1 +#endif + +/* IRIX */ +#if defined(SGIArchitecture) +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_SSIZE_T \ + -DHAVE_STDARG_H +OS_LIBS = +OS_DEBUG_FLAGS = -fullwarn +#define CConfigSet 1 +#endif + +/* FreeBSD, BSDI, NetBSD */ +#if defined(FreeBSDArchitecture) || defined(BSD386Architecture) || defined(NetBSDArchitecture) +#define HAVE_SNPRINTF 1 +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_SSIZE_T \ + -DHAVE_STDARG_H -DHAVE_SNPRINTF +OS_LIBS = +#define CConfigSet 1 +#endif + +/* Linux */ +#if defined(LinuxArchitecture) || defined(GNUArchitecture) +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_SSIZE_T \ + -DHAVE_STDARG_H +OS_LIBS = +#define CConfigSet 1 +#endif + +/* Convex */ +#if defined(ConvexArchitecture) +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_STDARG_H +OS_LIBS = +#define CConfigSet 1 +#endif + +/* HP */ +#if defined(HPArchitecture) +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_STDARG_H \ + -DHAVE_SSIZE_T +OS_LIBS = +#define CConfigSet 1 +#endif + +/* QNX */ +#if defined(__QNX__) +CC = cc -Otx -mf -zp1 -w4 +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_SSIZE_T \ + -DHAVE_STDARG_H +OS_LIBS = +#define CConfigSet 1 +#endif + +/* AIX 3.2.5 */ +#if defined(RsArchitecture) +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_SSIZE_T \ + -DHAVE_STDARG_H +OS_LIBS = +#define CConfigSet 1 +#endif + +/* OS/2, XFree86 & EMX gcc */ +#if defined(OS2Architecture) && !defined(CConfigSet) +#define NEED_SNPRINTF 1 +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H \ + -DHAVE_STDDEF_H -DHAVE_SIZE_T -DHAVE_SSIZE_T \ + -DHAVE_STDARG_H +OS_LIBS =-lsocket +#define CConfigSet 1 +#endif + +/* everything else hopefully */ +#if !defined(CConfigSet) +OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ + -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_STDARG_H +OS_LIBS = +OS_DEBUG_FLAGS = +#define CConfigSet 1 +#endif + +/* + * + * Glue together the various flags for compiling and linking + * + */ +CHIMERA_DEFINES = $(OS_DEFINES) $(SITE_DEFINES) + +CHIMERA_LOAD_FLAGS = $(OS_LDFLAGS) $(SITE_LDFLAGS) + +IMAGELIB = -L../image -lximage $(JPEGLIB) $(PNGLIB) +IMAGEDEPLIB = ../image/$(LIBPRE)ximage$(LIBEXT) $(JPEGDEPLIB) $(PNGDEPLIB) +HTMLLIB = -L../html -lxhtml +HTMLDEPLIB = ../html/$(LIBPRE)xhtml$(LIBEXT) +PLAINLIB = -L../plain -lxplain +PLAINDEPLIB = ../plain/$(LIBPRE)xplain$(LIBEXT) +PROTOLIB = -L../proto -lxproto +PROTODEPLIB = ../proto/$(LIBPRE)xproto$(LIBEXT) +OTHERLIB = -L../common -lxcommon -L../mxw -lmxw \ + -L../port -lxport \ + XawClientLibs -lm +OTHERDEPLIB = ../common/$(LIBPRE)xcommon$(LIBEXT) \ + ../port/$(LIBPRE)xport$(LIBEXT) \ + ../mxw/$(LIBPRE)mxw$(LIBEXT) + +CHIMERA_LIBS = $(IMAGELIB) $(HTMLLIB) $(PROTOLIB) $(PLAINLIB) \ + $(OTHERLIB) $(OS_LIBS) $(SITE_LIBS) + +CHIMERA_DEPLIBS = $(IMAGEDEPLIB) $(HTMLDEPLIB) $(PROTODEPLIB) \ + $(PLAINDEPLIB) $(OTHERDEPLIB) $(SITE_DEPLIBS) + +#define MyNull diff --git a/Common.tmpl.dist b/Common.tmpl.dist index 50977a1..fecc87b 100644 --- a/Common.tmpl.dist +++ b/Common.tmpl.dist @@ -123,7 +123,7 @@ OS_LIBS = #endif /* Linux */ -#if defined(LinuxArchitecture) +#if defined(LinuxArchitecture) || defined(GNUArchitecture) OS_DEFINES = -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_UNISTD_H -DHAVE_STDDEF_H \ -DHAVE_UNAME -DHAVE_MKTIME -DHAVE_SIZE_T -DHAVE_SSIZE_T \ -DHAVE_STDARG_H diff --git a/Imakefile b/Imakefile index 7ac09d2..7439847 100644 --- a/Imakefile +++ b/Imakefile @@ -6,7 +6,7 @@ #ifdef CDebugging #define PassCDebugFlags "CDEBUGFLAGS=-g -Wall" #else -#define PassCDebugFlags "CDEBUGFLAGS=-O -Wall" +#define PassCDebugFlags "CDEBUGFLAGS=-O2 -g -Wall" #endif #else #ifdef CDebugging diff --git a/chimera/ChimeraStream.h b/chimera/ChimeraStream.h index 392fa16..a2484f7 100644 --- a/chimera/ChimeraStream.h +++ b/chimera/ChimeraStream.h @@ -37,6 +37,6 @@ void StreamWrite _ArgProto((ChimeraStream, byte *, size_t, void StreamRead _ArgProto((ChimeraStream, byte *, size_t, ChimeraStreamCallback, void *)); int StreamGetINetPort _ArgProto((ChimeraStream)); -unsigned long StreamGetINetAddr _ArgProto((ChimeraStream)); +struct in6_addr StreamGetINetAddr _ArgProto((ChimeraStream)); #endif diff --git a/chimera/WWW.c b/chimera/WWW.c index 1ac59f0..fb47359 100644 --- a/chimera/WWW.c +++ b/chimera/WWW.c @@ -91,11 +91,17 @@ static void WWWScrollLeftAction _ArgProto((Widget, XEvent *, String *, Cardinal *)); static void WWWScrollRightAction _ArgProto((Widget, XEvent *, String *, Cardinal *)); +static void WWWScroll5UpAction _ArgProto((Widget, XEvent *, + String *, Cardinal *)); +static void WWWScroll5DownAction _ArgProto((Widget, XEvent *, + String *, Cardinal *)); static char defaultTranslations[] = ": select() \n\ : select() \n\ : select() \n\ + : scroll5_up() \n\ + : scroll5_down() \n\ : expose() \n\ : motion() \n\ :BackSpace: page_up()\n\ @@ -135,6 +141,8 @@ static XtActionsRec actionsList[] = { "scroll_down", WWWScrollDownAction }, { "scroll_left", WWWScrollLeftAction }, { "scroll_right", WWWScrollRightAction}, + { "scroll5_up", WWWScroll5UpAction }, + { "scroll5_down", WWWScroll5DownAction }, }; #define offset(field) XtOffsetOf(WWWRec, www.field) @@ -944,3 +952,35 @@ Cardinal *num_params; /* unused */ WWWMoveChild((Widget)rw,child->core.x-10,child->core.y); } + +/* + * WWWScroll5UpAction + */ +static void +WWWScroll5UpAction(w, xe, params, num_params) +Widget w; +XEvent *xe; +String *params; /* unused */ +Cardinal *num_params; /* unused */ +{ + WWWWidget rw = (WWWWidget)XtParent(XtParent(w)); + Widget child = rw->www.child; + + WWWMoveChild((Widget)rw,child->core.x,child->core.y+50); +} + +/* + * WWWScroll5DownAction + */ +static void +WWWScroll5DownAction(w, xe, params, num_params) +Widget w; +XEvent *xe; +String *params; /* unused */ +Cardinal *num_params; /* unused */ +{ + WWWWidget rw = (WWWWidget)XtParent(XtParent(w)); + Widget child = rw->www.child; + + WWWMoveChild((Widget)rw,child->core.x,child->core.y-50); +} diff --git a/chimera/chimera.man b/chimera/chimera.man index 6a30406..263cf5b 100644 --- a/chimera/chimera.man +++ b/chimera/chimera.man @@ -1,11 +1,11 @@ -.TH chimera 1 "26 October 1994" -.IX chimera +.TH chimera2 1 "26 October 1994" +.IX chimera2 .SH NAME -chimera - X/Athena World-Wide Web Client +chimera2 - X/Athena World-Wide Web Client .SH SYNOPSIS -.B chimera +.B chimera2 .RI [ URL ] .SH DESCRIPTION diff --git a/chimera/fallback.c b/chimera/fallback.c index a32d3aa..fca3b94 100644 --- a/chimera/fallback.c +++ b/chimera/fallback.c @@ -21,15 +21,16 @@ char *fallback_resources[] = { - "*background: moccasin", +/* "*background: moccasin", */ + "*WWW.background: white", "*showGrip: false", - "*Scrollbar.background: burlywood2", +/* "*Scrollbar.background: burlywood2", "*Command.background: burlywood2", "*Toggle.background: burlywood2", "*MenuButton.background: burlywood2", "*SimpleMenu.background: burlywood2", - "*SmeBSB.background: burlywood2", + "*SmeBSB.background: burlywood2", */ "*Box.orientation: horizontal", "*Label.borderWidth: 0", @@ -58,10 +59,10 @@ char *fallback_resources[] = "*dismiss.label: Dismiss", "*www_toplevel.height: 600", - "*www_toplevel.width: 650", + "*www_toplevel.width: 550", /* message widget */ - "*message.width: 600", + "*message.width: 550", "*message.editable: false", "*message.displayCaret: false", "*message.borderWidth: 0", @@ -96,10 +97,10 @@ char *fallback_resources[] = "*url.right: ChainRight", "*url.fromHoriz: urllabel", - "*Label.font: -*-lucidatypewriter-medium-r-normal-*-*-120-*-*-*-*-iso8859-1", +/* "*Label.font: -*-lucidatypewriter-medium-r-normal-*-*-120-*-*-*-*-iso8859-1", "*Text.font: -*-lucidatypewriter-medium-r-normal-*-*-120-*-*-*-*-iso8859-1", "*Command.font: -*-lucida-bold-r-normal-sans-*-120-*-*-*-*-iso8859-1", - "*Toggle.font: -*-lucida-bold-r-normal-sans-*-120-*-*-*-*-iso8859-1", + "*Toggle.font: -*-lucida-bold-r-normal-sans-*-120-*-*-*-*-iso8859-1", */ NULL }; diff --git a/chimera/head.c b/chimera/head.c index d97e804..129dba0 100644 --- a/chimera/head.c +++ b/chimera/head.c @@ -218,7 +218,7 @@ char *name; Widget paned, box, form; Atom delete; - wc->toplevel = XtVaAppCreateShell(name, "Chimera", + wc->toplevel = XtVaAppCreateShell(name, "Chimera2", topLevelShellWidgetClass, wc->cres->dpy, NULL); diff --git a/chimera/io.c b/chimera/io.c index 9b88b15..105bfef 100644 --- a/chimera/io.c +++ b/chimera/io.c @@ -62,6 +62,13 @@ #include "ChimeraStream.h" +union sockaddr_union +{ + struct sockaddr sa; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; +} ; + struct ChimeraStreamP { bool destroyed; @@ -69,7 +76,7 @@ struct ChimeraStreamP ChimeraResources cres; int s; int as; - unsigned long addr; + struct in6_addr addr; int port; bool bound; bool accepted; @@ -144,7 +151,7 @@ XtInputId *xid; { ChimeraStream ps = (ChimeraStream)cldata; ssize_t rlen; - struct sockaddr addr; + union sockaddr_union addr; int s; int namlen; @@ -153,7 +160,7 @@ XtInputId *xid; if (!ps->accepted) { namlen = sizeof(addr); - if ((ps->as = accept(ps->s, &addr, &namlen)) < 0) + if ((ps->as = accept(ps->s, &addr.sa, &namlen)) < 0) { XtRemoveInput(ps->rdid); ps->rdid = 0; @@ -252,7 +259,7 @@ int port; ChimeraStream ps; int s; int rval; - struct sockaddr_in addr; + union sockaddr_union addr; struct hostent *hp; MemPool mp; @@ -260,37 +267,85 @@ int port; memset(&addr, 0, sizeof(addr)); - /* fix by Jim Rees so that numeric addresses are dealt with */ - if ((addr.sin_addr.s_addr = inet_addr(host)) == -1) + if( inet_pton( AF_INET, host, &addr.sin.sin_addr ) ) { - if ((hp = (struct hostent *)gethostbyname(host)) == NULL) - { - return(NULL); - } - memcpy(&(addr.sin_addr), hp->h_addr, hp->h_length); + addr.sin.sin_family = AF_INET ; + + addr.sin.sin_port = htons( (unsigned short)port ) ; + s = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP ) ; + if (s < 0) return(NULL); + + rval = connect(s, (struct sockaddr *)&addr, sizeof(addr) ) ; + if( rval >= 0 || errno == EINPROGRESS ) + goto Connected ; /* Eeurgh, a goto :) */ } - - addr.sin_family = AF_INET; - addr.sin_port = htons((unsigned short)port); - - s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (s < 0) return(NULL); - -#ifdef __QNX__ - ioctl(s, FNDELAY, 0); -#else - fcntl(s, F_SETFL, FNDELAY); -#endif - - if ((rval = connect(s, (struct sockaddr *)&addr, sizeof(addr))) != 0) +// +// IPv6 literal support commented out as it doesn't work because of : in URLs +// +// else if( inet_pton( AF_INET6, host, &addr.sin6.sin6_addr ) ) +// { +// addr.sin6.sin6_family = AF_INET6 ; +// addr.sin6.sin6_port = htons( (unsigned short)port ) ; +// s = socket( AF_INET6, SOCK_STREAM, IPPROTO_TCP ) ; +// if (s < 0) return(NULL); +// +// rval = connect(s, (struct sockaddr *)&addr, sizeof(addr) ) ; +// if( rval >= 0 || errno == EINPROGRESS ) +// goto Connected ; /* Eeurgh, a goto :) */ +// } + else { - if (errno != EINPROGRESS) + if( ( hp = gethostbyname2( host, AF_INET6 ) ) != NULL ) { - close(s); - return(NULL); + if( hp->h_addrtype == AF_INET6 ) + { + addr.sin6.sin6_family = AF_INET6 ; + if( hp->h_length > (int) sizeof( addr.sin6.sin6_addr ) ) + hp->h_length = sizeof( addr.sin6.sin6_addr ) ; + + addr.sin6.sin6_port = htons( (unsigned short)port ) ; + s = socket( AF_INET6, SOCK_STREAM, IPPROTO_TCP ) ; + if (s < 0) return(NULL); + + do + { + memcpy( &addr.sin6.sin6_addr, *(hp->h_addr_list++), + hp->h_length ) ; + + rval = connect(s, (struct sockaddr *)&addr, sizeof(addr) ) ; + if( rval >= 0 || errno == EINPROGRESS ) + goto Connected ; /* Eeurgh, a goto :) */ + } while( *(hp->h_addr_list) ) ; + } + } + if( ( hp = gethostbyname2( host, AF_INET ) ) != NULL ) + { + if( hp->h_addrtype == AF_INET ) + { + addr.sin.sin_family = AF_INET ; + if( hp->h_length > (int) sizeof( addr.sin.sin_addr ) ) + hp->h_length = sizeof( addr.sin.sin_addr ) ; + + addr.sin.sin_port = htons( (unsigned short)port ) ; + s = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP ) ; + if (s < 0) return(NULL); + + do + { + memcpy( &addr.sin.sin_addr, *(hp->h_addr_list++), + hp->h_length ) ; + + rval = connect(s, (struct sockaddr *)&addr, sizeof(addr) ) ; + if( rval >= 0 || errno == EINPROGRESS ) + goto Connected ; /* Eeurgh, a goto :) */ + } while( *(hp->h_addr_list) ) ; + } } } + /* Couldn't connect */ + return NULL ; +Connected: mp = MPCreate(); ps = (ChimeraStream)MPCGet(mp, sizeof(struct ChimeraStreamP)); ps->mp = mp; @@ -310,8 +365,7 @@ ChimeraResources cres; MemPool mp; ChimeraStream ps; int s; - struct sockaddr_in addr; - struct sockaddr_in xaddr; + struct sockaddr_in6 addr; struct hostent *hp; int namlen; char host[BUFSIZ]; @@ -319,9 +373,9 @@ ChimeraResources cres; s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (s < 0) return(NULL); - addr.sin_addr.s_addr = INADDR_ANY; - addr.sin_family = AF_INET; - addr.sin_port = 0; + memcpy( (char *)&addr.sin6_addr, (char *)&in6addr_any, 16 ) ; + addr.sin6_family = AF_INET6; + addr.sin6_port = 0; if (bind(s, (struct sockaddr *) &addr, sizeof (addr)) < 0) { @@ -335,25 +389,6 @@ ChimeraResources cres; return(NULL); } - if (gethostname(host, sizeof(host) - 1) == 0) - { - /* fix by Jim Rees so that numeric addresses are dealt with */ - if ((xaddr.sin_addr.s_addr = inet_addr(host)) == -1) - { - if ((hp = (struct hostent *)gethostbyname(host)) == NULL) - { - close(s); - return(NULL); - } - memcpy(&(xaddr.sin_addr), hp->h_addr, hp->h_length); - } - } - else - { - close(s); - return(NULL); - } - namlen = sizeof(addr); if (getsockname(s, (struct sockaddr *)&addr, &namlen) < 0) { @@ -372,8 +407,8 @@ ChimeraResources cres; ps->mp = mp; ps->cres = cres; ps->s = s; - ps->port = (int)addr.sin_port; - ps->addr = xaddr.sin_addr.s_addr; + ps->port = (int)addr.sin6_port; + ps->addr = addr.sin6_addr; ps->bound = true; return((ChimeraStream)ps); @@ -410,7 +445,7 @@ ChimeraStream ps; /* * StreamGetINetAddr */ -unsigned long +struct in6_addr StreamGetINetAddr(ps) ChimeraStream ps; { diff --git a/chimera/main.c b/chimera/main.c index 968aece..59c6fbe 100644 --- a/chimera/main.c +++ b/chimera/main.c @@ -304,7 +304,7 @@ char *argv[]; XtAppSetFallbackResources(cres->appcon, fallback_resources); cres->dpy = XtOpenDisplay(cres->appcon, NULL, - NULL, "Chimera", + NULL, "Chimera2", NULL, 0, argcp, argv); if (cres->dpy == NULL) diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..5cb2b00 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,8 @@ +As chimera 2 is still in alpha test, it may be useful to have both it and +chimera 1.x on the system simulatenously. For that reason, I've renamed +everything from "chimera" to "chimera2". + +In particular, the resource class is Chimera2; in earlier releases of this +package I left it as it was, with the result that it found resources +intended for the old version, and messed up many things, particularly the +window size. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8806aef --- /dev/null +++ b/debian/changelog @@ -0,0 +1,246 @@ +chimera2 (2.0a19-8) unstable; urgency=low + + * Fix segfault with font handling - Thanks to Flos Lonicera for patch + (Closes: #24905) + + -- Mark Baker Sun, 12 May 2013 20:22:27 +0100 + +chimera2 (2.0a19-7) unstable; urgency=low + + * Use libpng-dev in build-depends instead of libpng12-dev (Closes: #662286) + * Fix so it will build on kfreebsd; thanks Petr Salinger for patch + (Closes: #537821) + * Changes to work with libpng 1.5; thanks Nobuhiro Iwamatsu for patch + (Closes: #635743) + * Move to correct place in current menu structure (Closes: #496099) + * Support nostrip build option (Closes: #436628) + + -- Mark Baker Mon, 05 Mar 2012 22:53:11 +0000 + +chimera2 (2.0a19-6) unstable; urgency=low + + * Replace libjpeg62-dev with libjpeg-dev in Build-Depends (Closes: #641097) + + -- Mark Baker Thu, 15 Sep 2011 20:52:50 +0100 + +chimera2 (2.0a19-5.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS by replacing obsolete xutils with xutils-dev in + Build-Depends (Closes: #485200). + * Set urgency to “medium”, bug is in testing too. + + -- Cyril Brulebois Sat, 18 Jul 2009 10:41:36 +0200 + +chimera2 (2.0a19-5) unstable; urgency=low + + * debian/control: Update build dependencies: xlibs-dev no longer exists + (Closes: #346637) + + -- Mark Baker Wed, 11 Jan 2006 21:52:10 +0000 + +chimera2 (2.0a19-4) unstable; urgency=low + + * Includes patch so it doesn't crash when used with recent + libpng. (Closes: #130902). Thanks to Jeremie Koenig for the patch + * debian/postinst, debian/prerm: Largely rewritten + * debian/postinst, debian/prerm: Install x-www-browser alternatives + entry. I've gone for 30 as the priority, as it should be lower than + more fully-featured modern browsers. (Closes: #161762) + * chimera/chimera.man: refer to chimera2 instead of chimera + * debian/control: update my email address + * debian/rules: install manpage as chimera2.1, not .1x, to avoid lintian + warning + * debian/copyright: fix spelling of Debian GNU/Linux + * debian/rules: put menu file in /usr/share instead of /usr/lib + + -- Mark Baker Sat, 20 Aug 2005 18:22:53 +0100 + +chimera2 (2.0a19-3.3) unstable; urgency=low + + * Bug Party quick NMU #3, fix xlib6g-dev dependency. (Closes: #170136) + + -- Joshua Kwan Sat, 15 Mar 2003 01:05:04 -0800 + +chimera2 (2.0a19-3.2) unstable; urgency=low + + * NMU + * Put in some more general detection of endianess and + 64-bitness. This allows chimera2 to build on ia64 and hppa. + (closes: Bug#105040) + + -- Doug Porter Thu, 18 Oct 2001 13:44:52 -0500 + +chimera2 (2.0a19-3.1) unstable; urgency=low + + * Bug Party NMU! + * Added Build-Depends on libjpeg62-dev, libpng2-dev, xlib6g-dev, + xutils, zlib1g-dev (closes: #83833, #70271). + * Added menu hints (closes: #80074). + * Call dpkg-gencontrol with -isp now so that Section and Priority + are included in the .deb. + * Updated location of GPL in copyright file. + * Moved binary from /usr/X11R6/bin to /usr/bin. + * prerm was not copied to debian/tmp/DEBIAN/. Fixed. + + -- Peter Palfrader Sun, 25 Feb 2001 01:21:25 +0000 + +chimera2 (2.0a19-3) unstable; urgency=low + + * Recompiled so it doesn't segfault (believed to have been an + incompatibility with a new version of libjpeg?) (#50558) + * chimera/WWW.c: added translations so mouse wheel can be used + * debian/rules: put documentation and manpage in /usr/share + * debian/postinst,debian/prerm: handle /usr/doc/chimera2 symlink + * debian/control: policy version 3.1.0.0 + + -- Mark Baker Sat, 27 Nov 1999 20:59:53 +0000 + +chimera2 (2.0a19-2) unstable; urgency=low + + * Applied powerpc patch from Konstantinos Margaritis (#39051) - thanks + + -- Mark Baker Sun, 4 Jul 1999 23:03:23 +0100 + +chimera2 (2.0a19-1) unstable; urgency=low + + * New upstream version + * Improved IPv6 support (support for incoming connections (for ftp)) + + -- Mark Baker Tue, 1 Jun 1999 23:56:53 +0100 + +chimera2 (2.0a17-2) unstable; urgency=low + + * Added IPv6 support + + -- Mark Baker Mon, 24 May 1999 23:52:15 +0100 + +chimera2 (2.0a17-1) unstable; urgency=low + + * New upstream version (should fix #25912) + * Recompiled against libpng2 (#26922) + * debian/control: Provides www-browser (#27916) + + -- Mark Baker Fri, 16 Apr 1999 23:37:26 +0100 + +chimera2 (2.0a15-2) unstable; urgency=low + + * Fix so cursor keys work when mouse over images + * Reimplemented accelerators fix in previous release more cleanly + * Changed resources so transparent GIFs don't have cream background + + -- Mark Baker Mon, 08 Jun 1998 20:31:18 +0100 + +chimera2 (2.0a15-1) unstable; urgency=low + + * New upstream version + * Changes (compared to upstream version) so accelerators aren't installed + on text field. Having 's' mapped to view source etc on the URL input + line isn't very useful! + * debian/prerm: deleted + * debian/postrm: created (run update-menus in postrm, not prerm (#23004)) + * debian/postinst: update-menus is in /usr/bin not /usr/sbin (#23006) + * debian/rules: minor changes + + -- Mark Baker Sat, 30 May 1998 10:43:00 +0100 + +chimera2 (2.0a14-2) unstable; urgency=low + + * Updated to standards-versions 2.4.0.0 + * Fixed copyright file (GPL is not compressed now) + + -- Mark Baker Tue, 10 Feb 1998 00:05:29 +0000 + +chimera2 (2.0a14-1) unstable; urgency=low + + * New upstream version + * Only run install-menus if it exists (#17275) + * Changed class to "chimera2" (#15035) + + -- Mark Baker Tue, 20 Jan 1998 22:18:27 +0000 + +chimera2 (2.0a11-3) unstable; urgency=low + + * Converted menu file to new format (#15036) + + -- Mark Baker Thu, 20 Nov 1997 21:02:26 +0000 + +chimera2 (2.0a11-2) unstable; urgency=low + + * Run chimera2 instead of chimera from menu (#14230) + + -- Mark Baker Thu, 30 Oct 1997 22:26:58 +0000 + +chimera2 (2.0a11-1) unstable; urgency=low + + * New upstream release (fixes memory bugs; unfortunately doesn't fix + rendering bugs AFAICS) + + -- Mark Baker Mon, 20 Oct 1997 00:14:15 +0100 + +chimera2 (2.0a10-1) unstable; urgency=low + + * New upstream release + + -- Mark Baker Tue, 30 Sep 1997 20:50:31 +0100 + +chimera2 (2.0a6-6) unstable; urgency=low + + * Compiled with all libc6 libraries (I was waiting for libpng) + + -- Mark Baker Sun, 28 Sep 1997 20:30:45 +0100 + +chimera2 (2.0a6-5) unstable; urgency=low + + * Patch to accept filenames on the command line [#13029] + + -- Mark Baker Tue, 16 Sep 1997 20:19:19 +0100 + +chimera2 (2.0a6-4) unstable; urgency=low + + * Only run install-menus if it exists [#13028] + + -- Mark Baker Mon, 15 Sep 1997 20:33:09 +0100 + +chimera2 (2.0a6-3) unstable; urgency=low + + * Renamed man page from chimera to chimera2 to match binary filename + * And menu file similarly (though this isn't user visible so doesn't + matter so much) [both #12733] + * Ownerships were wrong in last version. I haven't done anything to fix + them, but they seem to be OK in this one! + * Move binary from /usr/bin to /usr/X11R6/bin + + -- Mark Baker Wed, 10 Sep 1997 12:35:47 +0100 + +chimera2 (2.0a6-2) unstable; urgency=low + + * Compiled against xlib6g + + -- Mark Baker Tue, 09 Sep 1997 22:33:52 +0100 + +chimera2 (2.0a6-1) unstable; urgency=low + + * New upstream version + * Built from pristine sources + + -- Mark Baker Sun, 07 Sep 1997 21:23:13 +0100 + +chimera2 (2.0a2-3) unstable; urgency=low + + * Absolutely no changes, just recompiled becuase of bogus dependency + in last release + + -- Mark Baker Sun, 07 Sep 1997 00:22:59 +0100 + +chimera2 (2.0a2-2) unstable; urgency=low + + * Recompiled for libc6 + + -- Mark Baker Fri, 20 Jun 1997 12:38:46 +0100 + +chimera2 (2.0a2-1) unstable; urgency=low + + * First debian release + + -- Mark Baker Tue, 20 May 1997 21:06:00 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..0b835e8 --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: chimera2 +Section: web +Priority: optional +Maintainer: Mark Baker +Standards-Version: 3.6.2 +Build-Depends: libjpeg-dev, libpng-dev, xutils-dev, zlib1g-dev, libxaw7-dev, libxmu-dev, libxt-dev, libsm-dev, libice-dev, libxpm-dev, libxext-dev, libx11-dev + +Package: chimera2 +Architecture: any +Depends: ${shlibs:Depends} +Provides: www-browser +Description: Web browser for X + Simple, fast, free web browser. + . + This is an alpha-test version; some of the rendering routines are buggy. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..0ec5e5b --- /dev/null +++ b/debian/copyright @@ -0,0 +1,196 @@ +This is Debian GNU/Linux's prepackaged version of chimera 2. + +This package was put together by me, Mark Baker from +the the original sources in ftp.cs.unlv.edu:/pub/chimera-alpha/ +chimera-2.0a19.tar.gz. The only changes were those necessary for debian +packaging. + +The program is copyright 1997 John Kilburg and others. +This debian package is copyright 1997 Mark Baker. + +[what follows is the file doc/COPYRIGHT from the original distribution] + +Most of the code was written by John and Erik and is GPL'd. See +/usr/share/common-licenses/GPL for details. If I've left anything out below +please let me know. Also, if you see GPL'd replacements for anything +not GPL'd please send it (or a pointer to it) to john@cs.unlv.edu. + +Other GPL'd code used: + +www/url_translate.c by Theodore Ts'o +common/snprintf.c by Patrick Powell +mxw/TextField* was written by Rob McMullen and is LGPL'd. + +==== +www/ +==== + +WWW.c has some code from the Xaw Viewport widget and is + +Copyright (c) 1989, 1994 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not +be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +==== +mxw/ +==== + +Also, the AuthDialog and MyDialog widgets are based on code from the +Athena Dialog widget are + +Copyright (c) 1987, 1988, 1994 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not +be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + +Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, +Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +======= +common/ +======= + +Some string functions were grabbed from the BSD libraries and are + +Copyright (c) 1988-1993 The Regents of the University of California. +All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS `AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +memmove.c from the X folks: + +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the X Consortium. + +====== +image/ +====== + +gif.c, new.c, imagep.h were derived from code from xloadimage and are + +Copyright 1989, 1991 Jim Frost +Copyright 1989 Kirk L. Johnson + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation. The author makes no representations +about the suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. + +THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/debian/menu b/debian/menu new file mode 100644 index 0000000..fef8a2d --- /dev/null +++ b/debian/menu @@ -0,0 +1,5 @@ +?package(chimera2):needs="x11" \ + title="Chimera" \ + section="Applications/Network/Web Browsing" \ + hints="Web browsers" \ + command="chimera2" diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..c492b1f --- /dev/null +++ b/debian/postinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Register in menu +if [ "$1" = "configure" ] && [ -x "$(which update-menus 2>/dev/null)" ]; then + update-menus +fi + +# Install alternatives +update-alternatives --install \ + /usr/bin/x-www-browser x-www-browser /usr/bin/chimera2 30 \ + --slave /usr/share/man/man1/x-www-browser.1.gz x-www-browser.1.gz \ + /usr/share/man/man1/chimera2.1.gz diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..f1a5df1 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,5 @@ +#!/bin/sh -e + +if [ -x /usr/bin/update-menus ]; then + update-menus +fi diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..5dd93d1 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,6 @@ +#!/bin/sh -e + +# Remove alternatives entry +if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then + update-alternatives --remove x-www-browser /usr/bin/chimera2 +fi diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..fe585d0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,83 @@ +#!/usr/bin/make -f +# debian.rules file - for xdemineur (2.4) +# Based on sample debian.rules file (copyright 1994,1995 by Ian Jackson). +# +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) + +package=chimera2 + +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALLOPT= +else + INSTALLOPT=-s +endif + +build: + $(checkdir) + xmkmf -a + $(MAKE) + touch build + +clean: + $(checkdir) + -rm -f build + -$(MAKE) clean + -rm Makefile */Makefile + -rm -rf *~ debian/tmp debian/*~ debian/files* + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp + # First create directories + install -d debian/tmp debian/tmp/DEBIAN + install -d debian/tmp/usr/share/doc/$(package) + install -d debian/tmp/usr/bin + install -d debian/tmp/usr/share/man/man1 + install -d debian/tmp/usr/share/menu + # Copy documentation + cp debian/copyright debian/tmp/usr/share/doc/$(package)/. + cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian + gzip -9v debian/tmp/usr/share/doc/$(package)/changelog.Debian + install -m 0644 doc/INFO debian/tmp/usr/share/doc/$(package)/INFO + install -m 0644 doc/HINTS debian/tmp/usr/share/doc/$(package)/HINTS + install -m 0644 debian/README.Debian debian/tmp/usr/share/doc/$(package) + # Copy other files + install -m 0644 chimera/chimera.man \ + debian/tmp/usr/share/man/man1/chimera2.1 + install -m 0644 debian/menu debian/tmp/usr/share/menu/chimera2 + gzip -9v debian/tmp/usr/share/man/man1/chimera2.1 + install $(INSTALLOPT) chimera/chimera debian/tmp/usr/bin/chimera2; \ + # Various bits and pieces needed to build package + cp debian/postinst debian/postrm debian/prerm debian/tmp/DEBIAN/. + chmod +x debian/tmp/DEBIAN/postinst debian/tmp/DEBIAN/postrm debian/tmp/DEBIAN/prerm + dpkg-shlibdeps chimera/chimera + dpkg-gencontrol -isp + chown -R root.root debian/tmp + chmod -R g-ws debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f chimera/chimera.man -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/debian/substvars b/debian/substvars new file mode 100644 index 0000000..c7cfe80 --- /dev/null +++ b/debian/substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.3), libice6 (>= 1:1.0.0), libjpeg8 (>= 8c), libpng12-0 (>= 1.2.13-4), libsm6, libx11-6, libxaw7, libxext6, libxmu6, libxpm4, libxt6, zlib1g (>= 1:1.1.4) diff --git a/html/font.c b/html/font.c index 991a08e..9aca923 100644 --- a/html/font.c +++ b/html/font.c @@ -385,7 +385,7 @@ HTMLFontList fl; if (fl->fontInfo != NULL) { - for (i = 0; i < XLFD_COUNT; i++) + for (i = 0; i < fl->count; i++) { if (fl->fontInfo[i].xfi != NULL && fl->fontInfo[i].xfi != lc->defaultFont) diff --git a/image/image_endian.h b/image/image_endian.h index 69a0957..e42d2f7 100644 --- a/image/image_endian.h +++ b/image/image_endian.h @@ -2,6 +2,9 @@ * endian.h */ +#include +#include + #ifndef __ENDIAN_H__ #define __ENDIAN_H__ 1 @@ -48,12 +51,12 @@ #define __VAX__ 1 #endif -#if defined(__i386__) || defined(__VAX__) || defined(__MIPSEL__) || defined(__alpha__) || defined(__QNX__) +#if defined(__i386__) || defined(__VAX__) || defined(__MIPSEL__) || defined(__alpha__) || defined(__QNX__) || (__BYTE_ORDER == __LITTLE_ENDIAN) #undef CHIMERA_BIG_ENDIAN #define CHIMERA_LITTLE_ENDIAN #endif -#if defined(__RS6000__) || defined(__SPARC__) || defined(__680x0__) || defined(__HPUX__) || defined(__MIPSEB__) || defined(__convex__) +#if defined(__RS6000__) || defined(__SPARC__) || defined(__680x0__) || defined(__HPUX__) || defined(__MIPSEB__) || defined(__convex__) || defined(__powerpc__) || (__BYTE_ORDER == __BIG_ENDIAN) #undef CHIMERA_LITTLE_ENDIAN #define CHIMERA_BIG_ENDIAN #endif @@ -75,7 +78,7 @@ Error: Unknown endianism of architecture #endif -#ifdef __alpha__ +#if defined(__alpha__) || (__WORDSIZE == 64) #define SIXTYFOUR_BIT #endif diff --git a/image/png.c b/image/png.c index 2c77a0b..0b20dce 100644 --- a/image/png.c +++ b/image/png.c @@ -60,33 +60,49 @@ lf_info_callback(png_struct *state, png_info *info) int orig_depth = 0; pngState *png = (pngState *) png_get_progressive_ptr(state); - if (info->bit_depth < 8 && (PNG_COLOR_TYPE_RGB == info->color_type || - PNG_COLOR_TYPE_RGB_ALPHA == info->color_type)) + png_byte bit_depth = png_get_bit_depth(state, info), + color_type = png_get_color_type(state, info); + png_uint_32 width = png_get_image_width(state, info), + height = png_get_image_height(state, info), + valid_tRNS = png_get_valid(state, info, PNG_INFO_tRNS), + valid_gAMA = png_get_valid(state, info, PNG_INFO_gAMA); + png_colorp palette; + png_color_16p trans_values; + png_bytep trans; + int num_palette, num_trans; + double gamma; + + png_get_PLTE(state, info, &palette, &num_palette); + png_get_tRNS(state, info, &trans, &num_trans, &trans_values); + png_get_gAMA(state, info, &gamma); + + if (bit_depth < 8 && (PNG_COLOR_TYPE_RGB == color_type || + PNG_COLOR_TYPE_RGB_ALPHA == color_type)) png_set_expand(state); /* I wish the frame's background colour was available here */ - if (info->color_type & PNG_COLOR_MASK_ALPHA) { + if (color_type & PNG_COLOR_MASK_ALPHA) { png_color_16 bg; int gflag = PNG_BACKGROUND_GAMMA_SCREEN; double gval = 1.0; int expand = 0; bg.red = bg.green = bg.blue = bg.gray = 0; - if (PNG_COLOR_TYPE_PALETTE == info->color_type) + if (PNG_COLOR_TYPE_PALETTE == color_type) png_set_expand(state); png_set_background(state, &bg, gflag, expand, gval); } - if (info->bit_depth < 8 && (info->bit_depth > 1 || - PNG_COLOR_TYPE_GRAY != info->color_type)) { - if (PNG_COLOR_TYPE_GRAY == info->color_type) - orig_depth = info->bit_depth; + if (bit_depth < 8 && (bit_depth > 1 || + PNG_COLOR_TYPE_GRAY != color_type)) { + if (PNG_COLOR_TYPE_GRAY == color_type) + orig_depth = bit_depth; png_set_packing(state); } /* tell libpng to strip 16 bit depth files down to 8 bits */ - if (info->bit_depth > 8) + if (bit_depth > 8) png_set_strip_16(state); png_set_interlace_handling(state); @@ -95,18 +111,18 @@ lf_info_callback(png_struct *state, png_info *info) png_read_update_info(state, info); /* allocate the memory to hold the image using the fields of png_info. */ - if (PNG_COLOR_TYPE_GRAY == info->color_type && 1 == info->bit_depth) { - png->image = newBitImage(info->width, info->height); + if (PNG_COLOR_TYPE_GRAY == color_type && 1 == bit_depth) { + png->image = newBitImage(width, height); if (!png->image) { png->done = image_error; return; } png_set_invert_mono(state); - } else if (PNG_COLOR_TYPE_PALETTE == info->color_type) { + } else if (PNG_COLOR_TYPE_PALETTE == color_type) { int i; - png->image = newRGBImage(info->width, info->height, info->bit_depth); + png->image = newRGBImage(width, height, bit_depth); if (!png->image) { png->done = image_error; return; @@ -115,28 +131,28 @@ lf_info_callback(png_struct *state, png_info *info) png->image->rgb.red = png->cmap[0]; png->image->rgb.green = png->cmap[1]; png->image->rgb.blue = png->cmap[2]; - for (i = 0; i < info->num_palette; ++i) { - png->image->rgb.red[i] = info->palette[i].red << 8; - png->image->rgb.green[i] = info->palette[i].green << 8; - png->image->rgb.blue[i] = info->palette[i].blue << 8; + for (i = 0; i < num_palette; ++i) { + png->image->rgb.red[i] = palette[i].red << 8; + png->image->rgb.green[i] = palette[i].green << 8; + png->image->rgb.blue[i] = palette[i].blue << 8; } - png->image->rgb.used = info->num_palette; - if (info->valid & PNG_INFO_tRNS) { + png->image->rgb.used = num_palette; + if (valid_tRNS) { int val, i; val = 0; - for (i = 0; i < info->num_trans; ++i) { - if (info->trans[i] < info->trans[val]) + for (i = 0; i < num_trans; ++i) { + if (trans[i] < trans[val]) val = i; } png->image->transparent = val; } - } else if (PNG_COLOR_TYPE_GRAY == info->color_type) { + } else if (PNG_COLOR_TYPE_GRAY == color_type) { int i; - int depth = orig_depth ? orig_depth : info->bit_depth; + int depth = orig_depth ? orig_depth : bit_depth; int maxval = (1 << depth) - 1; - png->image = newRGBImage(info->width, info->height, depth); + png->image = newRGBImage(width, height, depth); if (!png->image) { png->done = image_error; return; @@ -153,10 +169,10 @@ lf_info_callback(png_struct *state, png_info *info) } png->image->rgb.used = maxval + 1; - if (info->valid & PNG_INFO_tRNS) - png->image->transparent = info->trans_values.gray; + if (valid_tRNS) + png->image->transparent = trans_values->gray; } else { - png->image = newTrueImage(info->width, info->height); + png->image = newTrueImage(width, height); if (!png->image) { png->done = image_error; return; @@ -164,10 +180,11 @@ lf_info_callback(png_struct *state, png_info *info) } - if (info->valid & PNG_INFO_gAMA && png->image->type != IBITMAP) - png->image->gamma = 1.0 / info->gamma; + if (valid_gAMA && png->image->type != IBITMAP) + png->image->gamma = 1.0 / gamma; - assert((png->image->width * png->image->pixlen + 7) / 8 == info->rowbytes); + assert((png->image->width * png->image->pixlen + 7) / 8 + == png_get_rowbytes(state, info)); } @@ -177,6 +194,7 @@ lf_row_callback(png_struct *state, png_byte *new_row, png_uint_32 row_num, { pngState *png; byte *old_row; + int rowbytes; if (!new_row) return; @@ -185,6 +203,7 @@ lf_row_callback(png_struct *state, png_byte *new_row, png_uint_32 row_num, if (!png->image) return; + rowbytes = png_get_rowbytes(png->state, png->info); old_row = png->image->data + png->image->bytes_per_line * row_num; png_progressive_combine_row(state, old_row, new_row); @@ -192,12 +211,12 @@ lf_row_callback(png_struct *state, png_byte *new_row, png_uint_32 row_num, /* I can't say I'm too fond of this endian business. */ #ifdef CHIMERA_LITTLE_ENDIAN if (IBITMAP == png->image->type) - lc_reverse_byte(old_row, png->info->rowbytes); + lc_reverse_byte(old_row, rowbytes); #endif (png->lineProc)(png->closure, row_num, row_num); #ifdef CHIMERA_LITTLE_ENDIAN if (IBITMAP == png->image->type) - lc_reverse_byte(old_row,png->info->rowbytes); + lc_reverse_byte(old_row, rowbytes); #endif } } @@ -219,18 +238,13 @@ pngDestroy(void *pointer) if (!png) return; - if (setjmp(png->state->jmpbuf)) + if (setjmp(png_jmpbuf((png->state)))) return; if (png->state) { - png_read_destroy(png->state, png->info, (png_info *) 0); - free_mem(png->state); + png_destroy_read_struct(&png->state, &png->info, NULL); png->state = 0; - } - - if (png->info) { - free_mem(png->info); - png->info = 0; + png->info = 0; } if (png->image) { @@ -246,7 +260,7 @@ pngAddData(void *pointer, byte *data, int len, bool data_ended) { pngState *png = (pngState *) pointer; - if (setjmp(png->state->jmpbuf)) + if (setjmp(png_jmpbuf((png->state)))) return image_error; if (len > png->lenSoFar) { @@ -275,28 +289,17 @@ pngInit(void (*lineProc)(void *, int, int), void *closure, struct ifs_vector *if memset(png, 0, sizeof(pngState)); png->lineProc = lineProc; png->closure = closure; - png->state = (png_struct *) alloc_mem(sizeof(png_struct)); - if (!png->state) - return; + png->state = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL,NULL,NULL); + png->info = png_create_info_struct(png->state); + assert(png->state && png->info); - png->info = (png_info *) alloc_mem(sizeof(png_info)); - if (!png->info) { - free_mem(png->state); - return; - } - - if (setjmp(png->state->jmpbuf)) { - png_read_destroy(png->state, png->info, (png_info *) 0); - free_mem(png->state); - free_mem(png->info); + if (setjmp(png_jmpbuf((png->state)))) { + png_destroy_read_struct(&png->state, &png->info, NULL); png->state = 0; png->info = 0; return; } - png_info_init(png->info); - png_read_init(png->state); - png_set_progressive_read_fn(png->state, (void *) png, lf_info_callback, lf_row_callback, lf_end_callback); png->done = image_need_data;