Fix whitespace errors as reported by 'git diff --check'

This commit is contained in:
Wolfgang Müller 2021-04-19 16:49:45 +02:00
parent e9ba313131
commit 2cd784b75c
85 changed files with 375 additions and 395 deletions

12
CHANGES
View File

@ -403,7 +403,7 @@ Added for check "id" attribute. Erik Corry <erik@kroete2.freinet.de>
The HTML code now has a timeout that will destroy an inline if it
takes too long to find its size.
Moved the cache code into www/.
alpha 110
---------
Frames are refreshed when they are resized.
@ -550,7 +550,7 @@ URL failure was not being reported back to the parent frame. This caused
HTML rendering to stop forever waiting for the image. Partially fixed.
Reported by Karl Eichwalder <ke@ke.Central.DE>.
Added support for the size attribute for form text input.
Larry Doolittle <doolitt@recycle.cebaf.gov>
Larry Doolittle <doolitt@recycle.cebaf.gov>
Paragraph align attribute was being carried over into the following
paragraphs if the aligned paragraph didn't have an end tag. Fixed.
Reported by Karl Eichwalder <ke@ke.Central.DE>
@ -727,7 +727,7 @@ The cancel button sort of works. The inlines don't get cancelled.
GIF patches that fixed the endless loop problem and some other
problems. Shigeru Yamamoto <shige-y@is.aist-nara.ac.jp>
GIF patch that fixed problems with interfaced 2-color GIFs.
Erik Corry <ehcorry@inet.uni-c.dk>
Erik Corry <ehcorry@inet.uni-c.dk>
Added patch that reduced memory usage in proto/file.c, added
HAVE_STRING_H to proto/error.c (now message.c), and fixed prototype
in image/image.c. Larry Doolittle <doolitt@recycle.cebaf.gov>
@ -750,7 +750,7 @@ The y coordinate of the rectangle to refresh in CreateRenderLine() was
visible area to not be refreshed.
Placement of text and other items has changed. Changes in text.c and
layout.c.
alpha 77
--------
Incorporated the second big patch to the color/image handling code.
@ -925,7 +925,7 @@ alpha 10
HTML widget changed a lot. Expose and reformat code changed.
Changed the title/message widget to just a plain pane (basically).
Added anchor URL display.
Roman Czyborra <czyborra@cs.tu-berlin.de>
Roman Czyborra <czyborra@cs.tu-berlin.de>
alpha 1-9
---------
@ -948,7 +948,7 @@ Added strlen(anchor) to MakeURL. I think Martin made this fix too. I
Added patch to local.c so that local file directory listings contain
lots of useful information. Didn't include the FTP part because it
won't work on all FTP servers. Patch is at
http://xph029.physics.montana.edu/chimera/filesize.patch if you
http://xph029.physics.montana.edu/chimera/filesize.patch if you
would like to try it. It needs work for 2.0...
Added patch for SGML escape stuff. Jim Rees <rees@umich.edu>
Patch to HTML.c to make scrolling work right.

View File

@ -167,7 +167,7 @@ OS_LIBS =
#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
-DHAVE_STDARG_H
OS_LIBS =-lsocket
#define CConfigSet 1
#endif

View File

@ -172,7 +172,7 @@ OS_LIBS =
#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
-DHAVE_STDARG_H
OS_LIBS =-lsocket
#define CConfigSet 1
#endif

View File

@ -27,5 +27,5 @@ typedef void (*ChimeraAuthCallback) _ArgProto((void *, char *, char *));
ChimeraAuth AuthCreate _ArgProto((ChimeraResources, char *, char *,
ChimeraAuthCallback, void *));
void AuthDestroy _ArgProto((ChimeraAuth));
#endif

View File

@ -102,7 +102,7 @@ GeomGeometryManager(w, request, reply)
Widget w;
XtWidgetGeometry *request;
XtWidgetGeometry *reply;
{
{
return(XtGeometryNo);
}

View File

@ -313,7 +313,7 @@ WWWGeometryManager(w, request, reply)
Widget w;
XtWidgetGeometry *request;
XtWidgetGeometry *reply;
{
{
return(XtGeometryNo);
}
@ -348,7 +348,7 @@ WWWWidget rw;
(float)top/(float)total,
(float)length/(float)total);
}
if (rw->www.vert_bar != (Widget)NULL)
{
top = -(child->core.y);
@ -376,18 +376,18 @@ int x, y;
{
x = -(child->core.width - clip->core.width);
}
if (-y + (int)clip->core.height > (int)child->core.height)
{
y = -(child->core.height - clip->core.height);
}
if (x >= 0) x = 0;
if (y >= 0) y = 0;
/* Mmmm hairy cast */
XtMoveWidget(child, (Position)x, (Position)y);
RedrawThumbs(rw);
return;
@ -403,9 +403,9 @@ XtPointer call_data;
register Widget child = rw->www.child;
int pix = (int)call_data;
Position x, y;
if (child == NULL) return; /* no child to scroll. */
x = child->core.x - ((widget == rw->www.horiz_bar) ? pix : 0);
y = child->core.y - ((widget == rw->www.vert_bar) ? pix : 0);
WWWMoveChild((Widget)rw, (int)x, (int)y);
@ -423,9 +423,9 @@ XtPointer call_data;
register Widget child = rw->www.child;
Position x, y;
float *percent = (float *)call_data;
if (child == NULL) return; /* no child to scroll. */
if (widget == rw->www.horiz_bar) x = -(int)(*percent * child->core.width);
else x = child->core.x;
@ -480,7 +480,7 @@ Cardinal *count;
ScrollUpDownProc, (XtPointer)new);
XtAddCallback(new->www.vert_bar, XtNjumpProc,
ThumbProc, (XtPointer)new);
new->www.horiz_bar = XtVaCreateWidget("horiz_bar",
scrollbarWidgetClass, n,
XtNorientation, XtorientHorizontal,
@ -657,7 +657,7 @@ Widget w;
bool use_scroll;
{
WWWWidget rw = (WWWWidget)w;
rw->www.use_scroll = use_scroll;
if (!rw->www.use_scroll)
{

View File

@ -127,7 +127,7 @@ void *closure;
wa->callback = callback;
wa->closure = closure;
wa->cres = cres;
XQueryPointer(cres->dpy, DefaultRootWindow(cres->dpy),
&rw, &cw,
&rx, &ry,
@ -147,7 +147,7 @@ void *closure;
AuthDialogAddButton(dw, "ok", AuthOKCallback, wa);
AuthDialogAddButton(dw, "dismiss", AuthDismissCallback, wa);
XtAddCallback(dw, XtNcallback, AuthActivateCallback, wa);
XtRealizeWidget(wa->w);
return(wa);

View File

@ -330,7 +330,7 @@ MLElement p;
if (bc->is_group_element || bc->is_mark_element) GListAddTail(bc->nel, p);
return;
}
if (strlen(name) == 2 && strcasecmp("h3", name) == 0)
{
if (MLGetType(p) == ML_ENDTAG)
@ -557,8 +557,8 @@ XtPointer cldata, cbdata;
BMChangeGroupList(bc);
BMChangeMarkList(bc);
BMWrite(bc);
BMWrite(bc);
}
return;
@ -665,7 +665,7 @@ XtPointer cldata, cbdata;
{
GListRemoveItem(g->mlist, m);
BMChangeMarkList(bc);
BMWrite(bc);
}
@ -700,7 +700,7 @@ XtPointer cldata, cbdata;
BookmarkContext bc = (BookmarkContext)cldata;
BMChangeMarkList(bc);
return;
}
@ -745,7 +745,7 @@ ChimeraResources cres;
{
return(NULL);
}
mp = MPCreate();
bc = (BookmarkContext)MPCGet(mp, sizeof(struct BookmarkContextP));
bc->mp = mp;
@ -783,7 +783,7 @@ ChimeraResources cres;
XtNfromHoriz, w,
NULL);
XtAddCallback(w, XtNcallback, BMRMGroup, (XtPointer)bc);
/* Mark widgets */
mvw = XtVaCreateManagedWidget("markview",
viewportWidgetClass, fw,

View File

@ -49,7 +49,7 @@
typedef struct
{
MemPool mp; /* memory descriptor */
char *filename; /* name of cache file */
char *filename; /* name of cache file */
char *url; /* URL string */
int cid; /* cache ID */
@ -268,7 +268,7 @@ void *closure;
CRDestroy(cr);
return(NULL);
}
cr->wt = TaskSchedule(cr->cres, CRRead, cr);
return(cr);
@ -304,7 +304,7 @@ int cid;
ce->cid = cid;
if (cid > cc->next_cid) cc->next_cid = cid + 1;
}
snprintf (filename, len, "%s/%d.ccf", cc->dirname, ce->cid);
ce->filename = filename;
@ -530,7 +530,7 @@ void *closure;
CRDestroy(cr);
return(NULL);
}
cr->wt = TaskSchedule(cc->cres, CRRead, cr);
return(cr);

View File

@ -48,7 +48,7 @@ ChimeraSourceHooks *shooks;
nhooks = (ChimeraSourceHooks *)MPCGet(cres->mp, sizeof(ChimeraSourceHooks));
memcpy(nhooks, shooks, sizeof(ChimeraSourceHooks));
GListAddHead(cres->sourcehooks, nhooks);
return(0);
@ -201,11 +201,11 @@ char *filelist;
fp = fopen(filename, "r");
if (fp == NULL) continue;
while (fgets(buffer, sizeof(buffer), fp))
{
if (buffer[0] == '#' || buffer[0] == '\n') continue;
if (sscanf(buffer, "%s %[^\n]", content, exts) == 2)
{
cp = exts;
@ -222,7 +222,7 @@ char *filelist;
}
}
}
fclose(fp);
}

View File

@ -127,7 +127,7 @@ void *closure;
return;
}
filename = FixPath(di->mp, filename);
filename = FixPath(di->mp, filename);
if ((fp = fopen(filename, "w")) == NULL)
{
XBell(di->cres->dpy, 100);
@ -139,10 +139,10 @@ void *closure;
}
SinkGetData(di->wp, &data, &len, &mh);
fwrite(data, 1, len, fp);
fclose(fp);
DownloadDestroy(di);
return;

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
*/
#include <stdio.h>
char *fallback_resources[] =

View File

@ -207,7 +207,7 @@ ChimeraGUI wd;
unsigned int *width, *height;
{
if (!wd->size_set) return(-1);
WWWGetDrawSize(wd->www, width, height);
WWWGetDrawSize(wd->www, width, height);
return(0);
}
@ -250,14 +250,14 @@ int *x, *y;
unsigned int *width, *height;
{
WWWWidget rw = (WWWWidget)wd->www;
*x = -(int)rw->www.child->core.x;
*y = -(int)rw->www.child->core.y;
*width = (unsigned int)rw->www.child->core.width;
*height = (unsigned int)rw->www.clip->core.height;
return;
}
}
/*
* GUIReset
@ -468,7 +468,7 @@ int *x, *y;
/*
* GUIBackgroundPixel
*/
*/
Pixel
GUIBackgroundPixel(wd)
ChimeraGUI wd;
@ -487,4 +487,3 @@ ChimeraGUI wd;
{
return(WWWGetDrawWidget(wd->www));
}

View File

@ -137,7 +137,7 @@ char *list;
}
else
{
snprintf(accel, sizeof(accel) - 1,
snprintf(accel, sizeof(accel) - 1,
"%s: set() notify() unset()", btp->accel);
btp->w = XtVaCreateManagedWidget(btp->name,
commandWidgetClass, box,
@ -231,7 +231,7 @@ char *name;
* Main window pane
*/
paned = XtCreateManagedWidget("paned",
panedWidgetClass, wc->toplevel,
panedWidgetClass, wc->toplevel,
NULL, 0);
/*
@ -258,7 +258,7 @@ char *name;
textfieldWidgetClass, form,
XtNstring, "",
NULL);
XtOverrideTranslations(wc->url,
XtParseTranslationTable
("<Key>Return: ReturnAction()"));
@ -387,7 +387,7 @@ XtPointer cldata, cbdata;
if ((url = MyDialogGetValue(GetDialogWidget(wc->openpop))) == NULL) return;
StackOpen(wc->tstack, RequestCreate(wc->cres, url, NULL));
XtPopdown(wc->openpop);
XtPopdown(wc->openpop);
return;
}
@ -401,7 +401,7 @@ Widget w;
XtPointer cldata, cbdata;
{
ChimeraContext wc = (ChimeraContext)cldata;
XtPopdown(wc->openpop);
XtPopdown(wc->openpop);
return;
}
@ -668,7 +668,7 @@ XtPointer cldata, cbdata;
RenderSearch(StackToRender(wc->tstack), str, 0);
XtPopdown(wc->findpop);
XtPopdown(wc->findpop);
return;
}
@ -682,7 +682,7 @@ Widget w;
XtPointer cldata, cbdata;
{
ChimeraContext wc = (ChimeraContext)cldata;
XtPopdown(wc->findpop);
XtPopdown(wc->findpop);
return;
}
@ -762,14 +762,14 @@ ChimeraRequest *lastresort;
url = (char *)MPCGet(mp, count + 1);
memcpy(url, buffer, count);
url[count] = '\0';
XFree(buffer);
if ((wr = RequestCreate(wc->cres, url, base_url)) != NULL)
{
XStoreBytes(cres->dpy, "", 0);
}
MPDestroy(mp);
}
}

View File

@ -68,7 +68,7 @@ union sockaddr_union
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
} ;
struct ChimeraStreamP
{
bool destroyed;
@ -80,7 +80,7 @@ struct ChimeraStreamP
int port;
bool bound;
bool accepted;
/* read callback */
ChimeraStreamCallback rdfunc;
void *rdclosure;
@ -330,13 +330,13 @@ int port;
s = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP ) ;
if (s < 0) return(NULL);
do
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 )
rval = connect(s, (struct sockaddr *)&addr, sizeof(addr) ) ;
if( rval >= 0 || errno == EINPROGRESS )
goto Connected ; /* Eeurgh, a goto :) */
} while( *(hp->h_addr_list) ) ;
}

View File

@ -155,16 +155,16 @@ ChimeraCleanup(cres)
ChimeraResources cres;
{
if (cres->bc != NULL) BookmarkDestroyContext(cres->bc);
ResourcesDestroy(cres);
if (cres->logfp != NULL) fclose(cres->logfp);
GListDestroy(cres->heads);
MPPrintStatus();
GListPrintStatus();
exit(0);
}

View File

@ -275,7 +275,7 @@ URLParts *up;
if (up->hostname &&
/*
* Allow localhost and hostname proxies
*
*
strcmp(up->hostname, "localhost") != 0 &&
! match_host_name(up->hostname, thishostname.nodename) &&
*/
@ -321,7 +321,7 @@ char *c1, *c2;
c1 = MPStrDup(mp, c1);
c2 = MPStrDup(mp, c2);
error = true;
for (cp = c1; *cp != '\0'; cp++)
{
@ -348,10 +348,10 @@ char *c1, *c2;
}
if (error) return(false);
if ((strlen(c1) == 1 && *c1 == '*') ||
if ((strlen(c1) == 1 && *c1 == '*') ||
(strlen(c1) == strlen(c2) && strcasecmp(c1, c2) == 0))
{
if ((strlen(p1) == 1 && *p1 == '*') ||
if ((strlen(p1) == 1 && *p1 == '*') ||
(strlen(p1) == strlen(p2) && strcasecmp(p1, p2) == 0))
{
return(true);
@ -404,7 +404,7 @@ char *base;
* always be possible to get the schemes so that the source hooks
* can be found to see if an alternate parsing method is going to
* be used.
*/
*/
uscheme = URLGetScheme(mp, url);
if (base != NULL) bscheme = URLGetScheme(mp, base);
else bscheme = NULL;
@ -519,7 +519,7 @@ char *base;
return(NULL);
}
memcpy(&(wr->hooks), hooks, sizeof(ChimeraSourceHooks));
memcpy(&(wr->hooks), hooks, sizeof(ChimeraSourceHooks));
wr->scheme = URLGetScheme(wr->mp, wr->url);

View File

@ -146,7 +146,7 @@ ChimeraSource ws;
myassert(c->state == SinkStateDestroyed, "Sink not destroyed");
if (c->wt != NULL) TaskRemove(cres, c->wt);
MPDestroy(c->mp);
MPDestroy(c->mp);
}
if (ws->closure != NULL) CMethod(ws->shooks.destroy)(ws->closure);
@ -252,7 +252,7 @@ ChimeraSource ws;
{
ws->closure = CMethodVoidPtr(wr->hooks.init)(ws,
wr, wr->hooks.class_closure);
memcpy(&(ws->shooks), &(wr->hooks), sizeof(ws->shooks));
memcpy(&(ws->shooks), &(wr->hooks), sizeof(ws->shooks));
if (ws->closure != NULL) detail = wr->hooks.name;
}
@ -352,13 +352,13 @@ void *closure;
}
return;
}
if (wp->ws->sstate == SourceStateComplete)
{
ChangeSinkState(wp, SourceEndTask, SinkStateComplete);
}
else ChangeSinkState(wp, NULL, SinkStateLoading);
return;
}
@ -418,7 +418,7 @@ ChimeraRequest *wr;
}
}
}
return(NULL);
}
@ -704,7 +704,7 @@ ChimeraRequest *wr;
memset(&wp->dhooks, 1, sizeof(wp->dhooks));
GListAddTail(ws->sinks, wp);
if (cres->printLoadMessages)
{
fprintf (stderr, "Sink(%d) Create %s %s\n", wp->debug,
@ -739,7 +739,7 @@ void *closure;
myassert(hooks->add != NULL, "Add function is NULL.");
myassert(hooks->end != NULL, "End function is NULL.");
myassert(hooks->message != NULL, "Message function is NULL.");
memcpy(&wp->dhooks, hooks, sizeof(wp->dhooks));
wp->closure = closure;

View File

@ -172,7 +172,7 @@ StackHome(cs)
ChimeraStack cs;
{
URLInfo *u;
if (GListGetTail(cs->urls) == GListGetHead(cs->urls)) return;
if ((u = (URLInfo *)GListGetTail(cs->urls)) == NULL) return;
StackOp(cs, RequestCreate(cs->wc->cres, u->url, NULL), StackHomeAction);
@ -324,7 +324,7 @@ void *closure;
url = SinkGetInfo(wp, "x-url");
ctype = SinkGetInfo(wp, "content-type");
if (cs->rh != NULL) rh = cs->rh;
else
{
@ -340,7 +340,7 @@ void *closure;
return(-1);
}
}
if (cs->wn != NULL)
{
curstate = RenderGetState(cs->wn);
@ -349,7 +349,7 @@ void *closure;
cs->wn = NULL;
}
else curstate = NULL;
if (cs->wp != NULL) SinkDestroy(cs->wp);
cs->wp = cs->pending;
cs->pending = NULL;

View File

@ -39,7 +39,7 @@ static void TimeOutHandler _ArgProto((XtPointer, XtIntervalId *));
/*
* TimeOutCreate
*/
*/
ChimeraTimeOut
TimeOutCreate(cres, interval, func, closure)
ChimeraResources cres;
@ -62,7 +62,7 @@ void *closure;
pto->iid = XtAppAddTimeOut(pto->cres->appcon,
(unsigned long)interval,
TimeOutHandler, cres);
return(pto);
}

View File

@ -42,7 +42,7 @@
#include "ChimeraP.h"
typedef struct
typedef struct
{
MemPool mp;
ChimeraSink wp;
@ -88,14 +88,14 @@ char *content;
{
filename = FixPath(mp, filename);
if (filename == NULL) continue;
fp = fopen(filename, "r");
if (fp == NULL) continue;
while (fgets(buffer, sizeof(buffer), fp))
{
if (buffer[0] == '#' || buffer[0] == '\n') continue;
if (sscanf(buffer, "%[^;]%[;]%[^;\n]", ctype, junk, command) == 3)
{
if (RequestMatchContent(tmp, ctype, content))
@ -146,7 +146,7 @@ void *closure;
{
if ((path = getenv("PATH")) == NULL) path = "";
}
finallen = strlen(" ; rm &") + strlen(path) + strlen(filename) * 2 +
strlen(vi->command) + strlen("PATH=") + 1;
final = (char *)MPGet(vi->mp, finallen);
@ -274,7 +274,7 @@ ViewInfo *vi;
NULL);
paned = XtCreateManagedWidget("paned",
panedWidgetClass, vi->pop,
panedWidgetClass, vi->pop,
NULL, 0);
box = XtCreateManagedWidget("box", boxWidgetClass, paned, NULL, 0);

View File

@ -82,7 +82,7 @@ char *cwd;
strcat(r, c);
}
else r = MPStrDup(mp, c);
for (p = r; *p != '\0'; )
{
if (*p == '/')

View File

@ -180,7 +180,7 @@ char *file;
f->next = track_list;
track_list = f;
#endif
return(mp);
}

View File

@ -126,7 +126,7 @@ char *line;
t = (char *)MPGet(mp, cp - ps + 1);
strncpy(t, ps, cp - ps);
t[cp - ps] = '\0';
if (mf->value == NULL) mf->value = t;
else
{
@ -216,7 +216,7 @@ size_t len;
*/
if (*pcp == '\r') le = pcp;
else le = cp;
/*
* If the line start is the same as the line end then it must be
* a blank line and its time to bail out.
@ -259,7 +259,7 @@ size_t len;
usedlen += le - ls;
line[usedlen] = '\0';
}
/*
* Start the next line after the \n
*/
@ -372,12 +372,12 @@ MIMEHeader mh;
char *line;
{
MIMEField f;
if ((f = parse_line(mh->mp, line)) != NULL)
{
GListAddTail(mh->list, f);
}
return;
}

View File

@ -34,4 +34,3 @@ int MIMEFindData _ArgProto((MIMEHeader, char *, size_t, size_t *));
int MIMEWriteHeader _ArgProto((MIMEHeader, FILE *));
#endif

View File

@ -62,7 +62,7 @@ struct MLAttributeP
struct MLElementP
{
MLElementType type;
MLElementType type;
char *ptext; /* processed text */
size_t plen; /* processed text length */
MLAttribute ta; /* attribute list */
@ -292,7 +292,7 @@ size_t *newlen;
}
if (cp < x)
{
*bcp = *cp;
*bcp = *cp;
bcp++;
}
}
@ -387,7 +387,7 @@ size_t len;
return(tahead);
}
/*
/*
* hs_add_element
*/
static void
@ -494,7 +494,7 @@ void *closure;
hs_push(hs, MLS_START);
hs_push(hs, MLS_DATA);
return(hs);
}
@ -785,4 +785,3 @@ char *name;
return(atoi(value));
}

View File

@ -48,7 +48,7 @@ ReapChild()
#if defined(WNOHANG) && !defined(SYSV) && !defined(SVR4) && !defined(__QNX__) && !defined(__EMX__)
int st;
do
do
{
errno = 0;
pid = wait3(&st, WNOHANG, 0);

View File

@ -190,7 +190,7 @@ bool addfrag;
if (NullString(up->scheme)) scheme = "file";
else scheme = up->scheme;
if (NullString(up->hostname))
{
delim = "";
@ -477,7 +477,7 @@ char *url;
* the rest is a filename because there is no // or it appears
* after other characters
*/
if (colon != NULL && colon < slash)
if (colon != NULL && colon < slash)
{
up->filename = MPStrDup(mp, colon + 1);
}

View File

@ -58,4 +58,3 @@ int URLReadTranslations _ArgProto((GList, char *));
char *URLTranslate _ArgProto((MemPool, GList, char *));
#endif

10
debian/changelog vendored
View File

@ -8,9 +8,9 @@ chimera2 (2.0a19-8) unstable; urgency=low
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
* 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
* 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)
@ -21,8 +21,8 @@ chimera2 (2.0a19-6) unstable; urgency=low
* Replace libjpeg62-dev with libjpeg-dev in Build-Depends (Closes: #641097)
-- Mark Baker <mark@mnb.org.uk> Thu, 15 Sep 2011 20:52:50 +0100
-- Mark Baker <mark@mnb.org.uk> Thu, 15 Sep 2011 20:52:50 +0100
chimera2 (2.0a19-5.1) unstable; urgency=medium
* Non-maintainer upload.
@ -173,7 +173,7 @@ chimera2 (2.0a11-2) unstable; urgency=low
chimera2 (2.0a11-1) unstable; urgency=low
* New upstream release (fixes memory bugs; unfortunately doesn't fix
* New upstream release (fixes memory bugs; unfortunately doesn't fix
rendering bugs AFAICS)
-- Mark Baker <mbaker@iee.org> Mon, 20 Oct 1997 00:14:15 +0100

12
debian/copyright vendored
View File

@ -11,8 +11,8 @@ 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
/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:
@ -89,13 +89,13 @@ 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,
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
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.
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

2
debian/postinst vendored
View File

@ -1,5 +1,5 @@
#!/bin/sh
set -e
set -e
# Register in menu
if [ "$1" = "configure" ] && [ -x "$(which update-menus 2>/dev/null)" ]; then

View File

@ -73,13 +73,13 @@ 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,
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
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.
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

View File

@ -134,7 +134,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@ -480,4 +480,3 @@ necessary. Here is a sample; alter the names:
Ty Coon, President of Vice
That's all there is to it!

View File

@ -236,7 +236,7 @@ size_t slen;
if ((colon = ParseToChar(s, ep, ':', true)) == NULL) return(NULL);
prop = (CSSProperty)MPCGet(mp, sizeof(struct CSSPropertyP));
prop->name = (char *)MPGet(mp, colon - s + 1);
strncpy(prop->name, s, colon - s);
prop->name[colon - s] = '\0';
@ -523,7 +523,7 @@ CSSContext css;
if (!ParseAt(css, ci)) return;
}
else if (!ParseRule(css, ci)) return;
ci->cp = ParseSpace(ci->cp, ci->ep);
}
@ -762,7 +762,7 @@ char *argv[];
fread(b, 1, st.st_size, fp);
fclose(fp);
css = CSSParseBuffer(NULL, b, st.st_size, NULL, NULL);
css = CSSParseBuffer(NULL, b, st.st_size, NULL, NULL);
mp = MPCreate();
slist = GListCreate();

View File

@ -78,7 +78,7 @@ static void RenderFlow _ArgProto((HTMLInfo, HTMLBox, Region));
static void SetupHLine _ArgProto((HTMLInfo, HFlow *, HLine *));
static HLine *StartLine _ArgProto((HTMLInfo, HTMLEnv, HFlow *, HTMLBox));
static void EndLine _ArgProto((HTMLInfo, HFlow *, HLine *, HTMLBox));
static void AddFloater _ArgProto((HTMLInfo, HFlow *, HTMLBox, HTMLBox));
static void AddFloater _ArgProto((HTMLInfo, HFlow *, HTMLBox, HTMLBox));
/*
* DestroyFlow
@ -259,7 +259,7 @@ HTMLBox parent;
/*
* Add a new line to the end.
*/
*/
hl = (HLine *)MPCGet(li->mp, sizeof(HLine));
hl->boxes = GListCreateX(li->mp);
hl->ff = env->ff;
@ -587,6 +587,6 @@ HTMLBox box;
HTMLSetFinalPosition(li);
}
return;
}

View File

@ -108,10 +108,10 @@ HTMLFont lfi;
if (strcmp(fields[XLFD_WEIGHT_NAME], "bold") == 0 ||
strcmp(fields[XLFD_WEIGHT_NAME], "demi") == 0 ||
strcmp(fields[XLFD_WEIGHT_NAME], "demibold") == 0)
strcmp(fields[XLFD_WEIGHT_NAME], "demibold") == 0)
{
lfi->weight = 1;
}
}
else lfi->weight = 0;
lfi->size = atoi(fields[XLFD_PIXEL_SIZE]);
@ -258,7 +258,7 @@ char *pattern;
/*
* Find sizes for each of the font scales. There must be a better way.
* This should probably not take
* This should probably not take
*/
scale_count = 0;
for (i = 0; i < count && scale_count < FONT_SCALE_COUNT; i++)
@ -295,7 +295,7 @@ char *pattern;
fl->scale[0] = fl->fontInfo[0].size;
scale_count++;
}
/*
* Fill out the rest if there aren't FONT_SCALE_COUNT
*/

View File

@ -148,7 +148,7 @@ static void HandleSubmit _ArgProto((HTMLInfo, FormState *, InputState *,
/*
* Functions
*/
*/
static XFontStruct *
GetFont(w)
Widget w;
@ -196,7 +196,7 @@ int count;
n = URLEscape(mp, names[i], 0);
if (values[i] != NULL) v = URLEscape(mp, values[i], 1);
else v = "";
alen = flen + strlen(n) + strlen(v) + strlen(sep) + strlen(format) + 1;
nf = (char *)MPGet(mp, alen);
@ -270,7 +270,7 @@ char *action;
{
names[i] = NULL;
values[i] = NULL;
if ((n = MLFindAttribute(xi->p, "name")) == NULL) continue;
if (xi->id == INPUT_TEXT || xi->id == INPUT_PASSWORD)
@ -289,7 +289,7 @@ char *action;
}
else if (xi->id == INPUT_CHECKBOX || xi->id == INPUT_RADIO)
{
XtVaGetValues(xi->w, XtNstate, &checked, NULL);
XtVaGetValues(xi->w, XtNstate, &checked, NULL);
if (checked)
{
names[i] = n;
@ -417,7 +417,7 @@ XtPointer cldata, cbdata;
co = (OptionState *)GListGetNext(ci->oplist))
{
if (co->sme == w)
{
{
if (co->selected)
{
if (ci->multi) co->selected = false;
@ -502,7 +502,7 @@ InputType type;
ci->fs = fs;
GListAddTail(fs->islist, ci);
return(ci);
}
@ -733,7 +733,7 @@ InputType type;
ci = CreateInputState(fs, p, type);
box = CreateInputBox(fs->li, env, ci, width, height);
ci->w = w;
if (type == INPUT_SUBMIT)
{
XtAddCallback(w, XtNcallback, SubmitCallback, (XtPointer)ci);
@ -777,14 +777,14 @@ MLElement p;
FormState *fs;
HTMLAddLineBreak(li, env);
fs = (FormState *)MPCGet(li->mp, sizeof(FormState));
fs->p = p;
fs->li = li;
fs->islist = GListCreateX(li->mp);
fs->rslist = GListCreateX(li->mp);
fs->action = MLFindAttribute(p, "action");
env->closure = fs;
return;
@ -814,7 +814,7 @@ MLElement p;
else if (strcasecmp(type, "checkbox") == 0) CreateCheckbox(fs, env, p);
else if (strcasecmp(type, "hidden") == 0) CreateHidden(fs, env, p);
else if (strcasecmp(type, "image") == 0) CreateImage(fs, env, p);
else if (strcasecmp(type, "password") == 0)
else if (strcasecmp(type, "password") == 0)
{
CreateText(fs, env, p, INPUT_PASSWORD);
}
@ -857,7 +857,7 @@ MLElement p;
if ((tatext = HTMLGetEnvText(li->mp, env)) == NULL) tatext = NULL;
obj = (HTMLObject)GListGetHead(env->slist);
w = XtVaCreateWidget("textarea",
asciiTextWidgetClass, li->widget,
XtNeditType, XtEtextEdit,
@ -870,17 +870,17 @@ MLElement p;
if (font == NULL) height = 20;
else height = font->ascent + font->descent + 2;
width = XTextWidth(font, "X", 1);
if ((rows = MLAttributeToInt(obj->o.p, "rows")) <= 0) rows = 5;
height *= rows;
if ((cols = MLAttributeToInt(obj->o.p, "cols")) <= 0) cols = 20;
width *= cols;
ci = CreateInputState(fs, obj->o.p, INPUT_TEXTAREA);
box = CreateInputBox(fs->li, env, ci, width, height);
ci->w = w;
return;
}
@ -927,13 +927,13 @@ HTMLEnv env;
XtNmenuName, "simplemenu",
XtNlabel, c->text,
NULL);
smw = XtVaCreatePopupShell("simplemenu",
simpleMenuWidgetClass, w,
XtNwidth, 0,
XtNheight, 0,
NULL);
XtVaGetValues(w, XtNfont, &font, NULL);
width = 0;
for (c = (OptionState *)GListGetHead(oplist); c != NULL;
@ -942,7 +942,7 @@ HTMLEnv env;
c->sme = XtVaCreateManagedWidget(c->text,
smeBSBObjectClass, smw,
NULL);
twidth = XTextWidth(font, c->text, strlen(c->text));
if (width < twidth) width = twidth;
}
@ -961,7 +961,7 @@ HTMLEnv env;
{
XtAddCallback(c->sme, XtNcallback, SmeCallback, (XtPointer)ci);
}
return;
}
@ -989,7 +989,7 @@ MLElement p;
n->value = MLFindAttribute(obj->o.p, "value");
if (MLFindAttribute(obj->o.p, "selected") != NULL) n->selected = true;
GListAddTail(formstate->oplist, n);
return;
}

View File

@ -143,7 +143,7 @@ MLElement p;
if ((height = MLAttributeToInt(p, "height")) < 0) height = 500;
box = HTMLCreateBox(li, env);
aid = HTMLAttributeToID(p, "align");
if (aid == ATTRIB_MIDDLE) box->baseline = height / 2;
else if (aid == ATTRIB_TOP) box->baseline = 0;

View File

@ -1,7 +1,7 @@
/*
* hr.c
*
* libhtml - HTML->X renderer
* libhtml - HTML->X renderer
*
* Copyright (c) 1995-1997, John Kilburg <john@cs.unlv.edu>
*

View File

@ -152,7 +152,7 @@ HTMLTagID tagid;
GList list;
list = li->envstack;
for (env = (HTMLEnv)GListGetHead(list); env != NULL;
for (env = (HTMLEnv)GListGetHead(list); env != NULL;
env = (HTMLEnv)GListGetNext(list))
{
if (env->tag->id == tagid) return(env);
@ -386,7 +386,7 @@ MLElement p;
env = (HTMLEnv)GListPop(li->envstack);
AddObject(li, HTML_ENV, env);
return;
}
@ -507,7 +507,7 @@ MLElement p;
AddObject(li, HTML_BEGINTAG, p);
}
else AddObject(li, HTML_TAG, p);
return;
}
@ -524,7 +524,7 @@ MLElement p;
HTMLInfo li = (HTMLInfo)closure;
HTMLTag tag;
MLElementType mt;
if ((mt = MLGetType(p)) == ML_EOF)
{
/*
@ -548,7 +548,7 @@ MLElement p;
{
printf ("Unknown tag: %s\n", MLTagName(p));
}
return;
}
@ -585,7 +585,7 @@ HTMLObject obj;
cenv->ff = env->ff;
cenv->anchor = env->anchor;
cenv->fi = HTMLDupFont(li, env->fi);
if (HTMLTestM(cenv->tag, MARKUP_SPACER))
{
HTMLAddBlankLine(li, env);

View File

@ -204,7 +204,7 @@ struct HTMLEnvP
bool visited; /* used by boxify functions */
MLElement anchor; /* anchor to use in environment */
HTMLFont fi; /* font to use in environment */
HTMLFlowAlign ff; /* alignment in flow box */
HTMLFlowAlign ff; /* alignment in flow box */
void *closure; /* environment specific data */
};
@ -282,7 +282,7 @@ struct HTMLInfoP
Pixel anchor_color;
Pixel anchor_select_color;
Pixel fg, bg;
/* www lib */
ChimeraContext wc;
ChimeraResources cres;
@ -311,7 +311,7 @@ struct HTMLInfoP
GList envstack; /* tag hierarchy */
GList selectors; /* CSS selector list */
GList oldselectors; /* old CSS selector list */
GList endstack; /* pending end tags */
GList endstack; /* pending end tags */
GList alist; /* anchor box list */
ChimeraTimeOut sto; /* select timeout */

View File

@ -245,7 +245,7 @@ static struct HTMLTagP tlist[] =
NULL, NULL, NULL },
/* Internal tags */
{ "xxx-document", TAG_DOCUMENT, HTMLDocumentBegin, HTMLDocumentEnd,
{ "xxx-document", TAG_DOCUMENT, HTMLDocumentBegin, HTMLDocumentEnd,
HTMLFillData, HTMLDocumentAddBox, HTMLDocumentWidth,
MARKUP_FAKE, NULL, NULL, NULL }
};

View File

@ -149,7 +149,7 @@ HTMLInline isp;
int border;
isp->box = box = HTMLCreateBox(isp->li, isp->env);
if ((border = MLAttributeToInt(isp->ii.p, "border")) < 0) isp->border = 0;
else isp->border = border;
@ -165,7 +165,7 @@ HTMLInline isp;
box->width = isp->width + isp->hspace * 2;
box->height = isp->height + isp->vspace * 2;
box->closure = isp;
HTMLEnvAddBox(isp->li, isp->env, box);
return;
@ -409,7 +409,7 @@ void *rc;
else isp->hspace = hspace;
isp->ismap = MLFindAttribute(ii->p, "ismap") != NULL ? true:false;
isp->mapurl = MLFindAttribute(ii->p, "usemap");
if (isp->width == 0 || isp->height == 0)
{
isp->delayed = true;

View File

@ -77,7 +77,7 @@ HTMLBox box;
if (r == NULL)
{
GUIGetOnScreenDimensions(li->wd, &x, &y, &width, &height);
r = XCreateRegion();
rec.x = (short)x;
rec.y = (short)y;

View File

@ -156,7 +156,7 @@ CreateList(li, env)
HTMLInfo li;
HTMLEnv env;
{
HList *ls;
HList *ls;
ls = (HList *)MPCGet(li->mp, sizeof(HList));
ls->lbox = HTMLCreateBox(li, env);
@ -224,11 +224,11 @@ MLElement p;
* If the <ol> specifies a START or SEQNUM attribute, handle that,
* otherwise the default is 1
*/
if((startstr = MLFindAttribute(p, "start"))!= NULL)
if((startstr = MLFindAttribute(p, "start"))!= NULL)
{
ls->count = atoi(startstr);
}
else if((startstr = MLFindAttribute(p, "seqnum"))!= NULL)
else if((startstr = MLFindAttribute(p, "seqnum"))!= NULL)
{
ls->count = atoi(startstr);
}
@ -237,7 +237,7 @@ MLElement p;
ls->count = 1;
}
/*
* Now see if said <ol> has a TYPE attribute.
* Now see if said <ol> has a TYPE attribute.
* Types are:
* 1 ==> std numbering
* aA ==>[aA]lphabetic
@ -255,7 +255,7 @@ MLElement p;
{
ls->type = OL_NUMERIC;
}
return;
}
@ -273,7 +273,7 @@ MLElement p;
ls->ibox = HTMLCreateFlowBox(li, env, HTMLGetMaxWidth(li, env->penv));
GListAddTail(ls->klist, ls->ibox);
env->closure = ls;
if (HTMLTagToID(env->penv->tag) == TAG_OL)
{
OLNext(buffer, sizeof(buffer), ls->count++, ls->type);
@ -392,13 +392,13 @@ OListType oltype;
if (oltype == OL_ALPHA_CAP)
{
number = (number-1) % 26;
number = (number-1) % 26;
number += 65;
snprintf(buffer, bsize, "%c.", (char)number);
}
else if (oltype == OL_ALPHA_MINISCULE)
{
number = (number-1) % 26;
number = (number-1) % 26;
number += 97;
snprintf(buffer, bsize, "%c.", (char)number);
}

View File

@ -1,7 +1,7 @@
/*
* load.c
*
* libhtml - HTML->X renderer
* libhtml - HTML->X renderer
*
* Copyright (c) 1996-1997, John Kilburg <john@cs.unlv.edu>
*
@ -45,7 +45,7 @@ char *action;
HTMLFindName(li, url + 1);
return(0);
}
wr = RequestCreate(li->cres, url, li->burl);
RenderAction(li->wn, wr, action);
@ -151,7 +151,7 @@ HTMLInfo li;
HTMLAnchor anchor;
int x, y;
bool ismap;
{
{
char *url, *aurl;
MemPool mp;

View File

@ -214,7 +214,7 @@ int x, y;
if (map == NULL) return(NULL);
list = map->areas;
for (area = (HTMLArea)GListGetHead(list); area != NULL;
for (area = (HTMLArea)GListGetHead(list); area != NULL;
area = (HTMLArea)GListGetNext(list))
{
if (area->shape == HTMLMapShapeRect)

View File

@ -135,7 +135,7 @@ MLElement p;
HTMLAddFontWeight(env->fi);
}
else if (tagid == TAG_TT) HTMLSetFontFixed(env->fi);
return;
}
@ -295,4 +295,3 @@ MLElement p;
return;
}

View File

@ -208,7 +208,7 @@ int x, y;
{
if (InAnchor(x, y, a->box)) break;
}
if (a == NULL || a->p == NULL) RenderSendMessage(li->wn, NULL);
else HTMLPrintAnchor(li, a, x, y, false);
li->over = a;
@ -403,7 +403,7 @@ void *state;
GUIGetNamedColor(wd, "black", &(li->fg));
XSetForeground(li->dpy, li->gc, li->fg);
HTMLSetupFonts(li);
GUISetScrollBar(wd, true);
@ -503,7 +503,7 @@ ChimeraResources cres;
if (blen == st.st_size)
{
lc->css = CSSParseBuffer(NULL, b, blen, NULL, NULL);
lc->css = CSSParseBuffer(NULL, b, blen, NULL, NULL);
}
free_mem(b);

View File

@ -393,7 +393,7 @@ MLElement p;
else if (x >= 100) width = x;
}
}
if (width > 0) ts->max_width = width;
if (width > 0) ts->max_width = width;
else ts->max_width = 0;
}
else
@ -448,7 +448,7 @@ MLElement p;
}
else
{
TablePosition2(ts);
TablePosition2(ts);
HTMLEnvAddBox(li, env->penv, ts->box);
}
@ -457,7 +457,7 @@ MLElement p;
}
/*
* FillSpans
* FillSpans
*/
static void
FillSpans(ts)
@ -524,7 +524,7 @@ HTable *ts;
}
}
}
/*
* Now extend HData to the right depending on the colspan.
*/
@ -545,7 +545,7 @@ HTable *ts;
if (rs->ca[i].ds == NULL) break;
}
myassert(ts->colcount != i, "Table column count confused.");
rs->ca[i].original = true;
for (j = 0; j < ds->colspan; j++, i++)
{
@ -729,7 +729,7 @@ HTable *ts;
ds = rs->ca[i].ds;
width = ds->box->width / ds->colspan;
if (width > ts->cwidth[i]) ts->cwidth[i] = width;
height = ds->box->height / ds->rowspan;
if (height > ts->rheight[j]) ts->rheight[j] = height;
}
@ -739,7 +739,7 @@ HTable *ts;
ds = rs->ca[i].ds2;
width = ds->box->width / ds->colspan;
if (width > ts->cwidth[i]) ts->cwidth[i] = width;
height = ds->box->height / ds->rowspan;
if (height > ts->rheight[j]) ts->rheight[j] = height;
}
@ -897,4 +897,3 @@ HTMLEnv env;
HTable *ts = (HTable *)env->closure;
return(HTMLGetBoxWidth(li, ts->dbox));
}

View File

@ -177,7 +177,7 @@ size_t len;
}
else ptlen++;
}
if (tabbed)
{
s = ExpandTabs(li, start, cp - start, ptlen);
@ -244,7 +244,7 @@ MLElement p;
if (text == NULL) return;
HTMLPreformatted(li, env, text, len);
return;
}
@ -300,16 +300,16 @@ MLElement p;
{
found_space = true;
}
if (found_space)
{
HTMLEnvAddBox(li, env, HTMLCreateTextBox(li, env, NULL, 0));
}
if (cp == lastcp) break;
for (s = cp; cp < lastcp && !isspace8(*cp); cp++)
;
HTMLEnvAddBox(li, env, HTMLCreateTextBox(li, env, s, cp - s));
}
}

View File

@ -68,7 +68,7 @@ lf_create_dither_matrix(
/* Make sure the column count is <= row count */
if (tc > tr)
{
{
int t = tc;
tc = tr;
tr = t;
@ -101,7 +101,7 @@ lf_create_dither_matrix(
for (y = 0; y < r; y++)
{
for (x= 0; x < c2; x++)
{
{
matrix[(y + r2) % r][x + c2] = matrix[y][x] * 2 -1;
matrix[y][x] *= 2;
}
@ -111,7 +111,7 @@ lf_create_dither_matrix(
/* Swap matrix width/height if necessary */
if (swapped)
{
{
for (r = 0; r < tr; r++)
{
for (c = 0; c < r; c++)
@ -142,7 +142,7 @@ lf_calculate_dither_table(
unsigned long pixel_values[256])
{
int i, c, j;
double brightness_factor = 255.0 /
double brightness_factor = 255.0 /
(brightnesses[value_count - 1] -
brightnesses[0]);
@ -423,7 +423,7 @@ ccf_create_true_true_conversion_table(cct_cube cube)
}
return answer;
}
/*
* For 8-bit palette input we do not need to convert to true-color
* one component at a time. We can do it in one lookup. This generates
@ -526,7 +526,7 @@ ccf_gray_to_gray_dither_convert(
return answer;
}
/*
* If we are converting 8-bit palette to grayscale, we do not
* need to convert every pixel to gray, we can simply integrate
@ -559,4 +559,3 @@ ccf_gray_to_gray_conversion_convert(
return answer;
}

View File

@ -40,7 +40,7 @@ typedef struct ccs_8_8_dither_table *cct_8_8_dither_table;
typedef struct ccs_8_true_conversion_table *cct_8_true_conversion_table;
typedef struct ccs_true_true_conversion_table *cct_true_true_conversion_table;
union ccu_dither_table
union ccu_dither_table
{
void *generic_dither_table;
cct_true_8_dither_table true_8_dither;

View File

@ -57,7 +57,7 @@
static void
lf_color_dither_line_24_4_no_mapping(
lf_color_dither_line_24_4_no_mapping(
cct_true_8_dither_table table,
unsigned char *input,
unsigned char *output,
@ -89,7 +89,7 @@ lf_color_dither_line_24_4_no_mapping(
}
static void
lf_color_dither_line_24_4_mapping(
lf_color_dither_line_24_4_mapping(
cct_true_8_dither_table table,
unsigned char *input,
unsigned char *output,
@ -125,7 +125,7 @@ lf_color_dither_line_24_4_mapping(
}
static void
lf_color_dither_line_24_4(
lf_color_dither_line_24_4(
cct_true_8_dither_table table,
unsigned char *input,
unsigned char *output,
@ -139,7 +139,7 @@ lf_color_dither_line_24_4(
}
static void
lf_color_dither_line_24_8_no_mapping(
lf_color_dither_line_24_8_no_mapping(
cct_true_8_dither_table table,
unsigned char *input,
unsigned char *output,
@ -157,7 +157,7 @@ lf_color_dither_line_24_8_no_mapping(
}
static void
lf_color_dither_line_24_8_mapping(
lf_color_dither_line_24_8_mapping(
cct_true_8_dither_table table,
unsigned char *input,
unsigned char *output,
@ -177,7 +177,7 @@ lf_color_dither_line_24_8_mapping(
}
static void
lf_color_dither_line_24_8(
lf_color_dither_line_24_8(
cct_true_8_dither_table table,
unsigned char *input,
unsigned char *output,
@ -195,7 +195,7 @@ lf_color_dither_line_24_8(
*/
static void
lf_color_dither_line_24_16(
lf_color_dither_line_24_16(
cct_true_8_dither_table table,
unsigned char *input,
unsigned short *output,
@ -1037,4 +1037,3 @@ ddf_gray_convert_line_24(
/************************************************************************/

View File

@ -187,10 +187,10 @@ gifState *gs;
gs->prefix[i] = NULL_CODE;
gs->extnsn[i] = i;
}
/* initialize pixel stack */
gs->pstk_idx = 0;
gs->state = GS_MAKE_IMAGE;
return(GS_SUCCESS);
@ -219,7 +219,7 @@ gifState *gs;
gs->pos = pos;
return(GS_NEED_DATA);
}
if (*b == 0xf9)
{
if ((rval = gs_read_data_block(gs)) != GS_SUCCESS)
@ -312,7 +312,7 @@ gifState *gs;
return(GS_SUCCESS);
}
/*
* gs_load_g_cmap
*
@ -325,7 +325,7 @@ gifState *gs;
byte *b;
if (gs_read(gs, &b, 3) != 3) return(GS_NEED_DATA);
gs->g_cmap[GIF_RED][gs->g_ncolors_pos] = b[GIF_RED] << 8;
gs->g_cmap[GIF_GRN][gs->g_ncolors_pos] = b[GIF_GRN] << 8;
gs->g_cmap[GIF_BLU][gs->g_ncolors_pos] = b[GIF_BLU] << 8;
@ -335,7 +335,7 @@ gifState *gs;
return(GS_SUCCESS);
}
/*
* gs_read_data_block
*
@ -394,7 +394,7 @@ gifState *gs;
image->rgb.red = gs->g_cmap[GIF_RED];
image->rgb.green = gs->g_cmap[GIF_GRN];
image->rgb.blue = gs->g_cmap[GIF_BLU];
image->rgb.blue = gs->g_cmap[GIF_BLU];
image->rgb.used = gs->g_ncolors;
}
@ -446,16 +446,16 @@ int *pel;
return(rval);
}
}
gs->work_data |= ((unsigned) gs->buf[gs->buf_idx++]) << gs->work_bits;
gs->work_bits += 8;
}
/* get the next code */
code = gs->work_data & gs->code_mask;
gs->work_data >>= gs->code_size;
gs->work_bits -= gs->code_size;
/* interpret the code */
if (code > gs->table_size || code == gs->eoi_code)
{
@ -720,21 +720,17 @@ void *closure;
struct ifs_vector *if_vector;
{
gifState *gs;
gs = (gifState *)alloc_mem(sizeof(gifState));
memset(gs, 0, sizeof(gifState));
gs->state = GS_READ_SIG;
gs->transparent = -1;
gs->lineProc = lineProc;
gs->closure = closure;
if_vector->image_format_closure = (void *)gs;
if_vector->initProc = &gifInit;
if_vector->destroyProc = &gifDestroy;
if_vector->addDataProc = &gifAddData;
if_vector->getImageProc = &gifGetImage;
}

View File

@ -108,7 +108,7 @@ typedef struct _gif_state
#define GS_ERR_NOMEM -11 /* allocation failure */
/*
* colormap indices
* colormap indices
*/
#define GIF_RED 0
#define GIF_GRN 1
@ -141,5 +141,3 @@ typedef struct _gif_state
#define GS_INIT_DECODER 8
#define GS_READ_SIG 9
#define GS_READ_IMAGE_HEADER 10

View File

@ -51,7 +51,7 @@ typedef void (*lt_expansion_fn) _ArgProto((byte *, byte *,
Intensity, Intensity,
Intensity));
#define IMAGE_GIF 0
#define IMAGE_GIF 0
#define IMAGE_XBM 1
#define IMAGE_JPEG 2
#define IMAGE_PNG 3
@ -216,7 +216,7 @@ ImageState *is;
Intensity intensities[3];
is->expanded_type = image->type;
if(image->type == IBITMAP)
{
is->bg = is->bgcolor.pixel;
@ -462,7 +462,7 @@ ImageState *is;
{
maps[0][image->transparent] = is->bgcolor.red >> 8;
maps[1][image->transparent] = is->bgcolor.green >> 8;
maps[2][image->transparent] = is->bgcolor.blue >> 8;
maps[2][image->transparent] = is->bgcolor.blue >> 8;
}
/*
@ -574,7 +574,7 @@ ImageState *is;
is->fg = ic->grayscale->u.grayscale.pixel_values[1];
is->bg = ic->grayscale->u.grayscale.pixel_values[0];
}
else
else
{
is->fg = ic->grayscale->u.grayscale.pixel_values[0];
is->bg = ic->grayscale->u.grayscale.pixel_values[1];
@ -618,7 +618,7 @@ ImageState *is;
* True-color-to-grayscale type situtation
*/
for (i = 0; i < TCOUNT; i++)
is->dither_table[i].true_8_dither =
is->dither_table[i].true_8_dither =
ic->gray_tables[i].true_8_dither;
is->free_dither_table = 0; /* don't free it its a copied pointer!! */
is->dither_function = &ddf_gray_dither_line_24;
@ -640,7 +640,7 @@ ImageState *is;
maps[1][image->transparent] = is->bgcolor.green >> 8;
maps[2][image->transparent] = is->bgcolor.blue >> 8;
}
if (!ic->gray_tables[0].eight_true_conversion)
ic->gray_tables[0].eight_true_conversion =
ccf_create_gray_conversion_table(ic->grayscale);
@ -661,7 +661,7 @@ ImageState *is;
for (i = 0; i < TCOUNT; i++)
is->dither_table[i].eight_true_conversion =
ccf_gray_to_gray_conversion_convert(ic->gray_tables[0].
eight_true_conversion,
eight_true_conversion,
image->rgb.used,
maps);
is->free_dither_table = TCOUNT;
@ -682,7 +682,7 @@ ImageState *is;
is->dithering = true;
}
}
maps[0] = maps[1] = maps[2] = 0;
return;
@ -848,7 +848,7 @@ int lline;
if (image->pixlen == 1) depth = 1;
else depth = is->depth;
if(image->depth == 1)
{
lf_set_up_bitmap(is);
@ -878,19 +878,19 @@ int lline;
xccf_allocate_grays(is->dpy, is->cmap, is->v, is->depth);
}
}
is->xi = XCreateImage(is->dpy, is->v,
depth,
depth == 1 ? XYBitmap : ZPixmap,
0, NULL,
image->width, image->height,
32, 0);
/* Make sure we have plenty of padding at the end of each line */
is->xi->bytes_per_line += 16;
is->xi->data = (char *)MPCGet(is->mp,
image->height * is->xi->bytes_per_line);
#ifdef CHIMERA_LITTLE_ENDIAN
is->xi->byte_order = is->xi->bitmap_bit_order = LSBFirst;
#else
@ -958,7 +958,7 @@ int lline;
}
}
}
/*
* Paint line
*/
@ -990,7 +990,7 @@ Display *dpy;
ic->icount = 0;
ic->init = True;
ic->gc = XCreateGC(dpy, RootWindow(dpy, DefaultScreen(dpy)), 0, NULL);
if (getenv("CHIMERA_MAX_SPECIAL_COLORS"))
{
ic->special_max = atoi(getenv("CHIMERA_MAX_SPECIAL_COLORS"));
@ -1132,7 +1132,7 @@ void *closure;
is->if_vector.addDataProc(is->if_vector.image_format_closure,
data, len, false);
}
return;
}

View File

@ -67,7 +67,7 @@
* look in the compiler manual. Try to find a symbol that identifies the
* processor, rather than the OS or compiler. If you have gcc on a Unix
* system, the following will tell you what symbols it defines:
*
*
* ln -s /dev/null null.c
* gcc -ansi -dM -E null.c
*

View File

@ -31,7 +31,7 @@
#ifndef MAX
#define MAX(a,b) ((a) < (b) ? (b) : (a))
#endif
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif

View File

@ -314,16 +314,16 @@ lf_read_image(jpegState *jpeg)
scanline_pointers[i] = output_addr;
output_addr += jpeg->image->bytes_per_line;
}
scanline_count =
jpeg_read_scanlines(&jpeg->cinfo, scanline_pointers, max_scanlines);
if (scanline_count == 0) return CH_JPEG_NEED_DATA;
if (jpeg->lineProc != NULL)
(jpeg->lineProc)(jpeg->lineClosure, jpeg->ypos,
jpeg->ypos + scanline_count - 1);
jpeg->ypos += scanline_count;
}
@ -416,7 +416,7 @@ bool data_ended;
/* Update libjpeg's input pointers */
jpeg->input_state.pub.next_input_byte =
((JOCTET*) data) + jpeg->input_state.bytes_consumed;
jpeg->input_state.pub.bytes_in_buffer =
jpeg->input_state.pub.bytes_in_buffer =
len - jpeg->input_state.bytes_consumed;
jpeg->input_state.faked_eoi = false; /* next_input_byte is valid */
if (data_ended)

View File

@ -76,19 +76,19 @@ unsigned int width, height, depth;
Image *image;
unsigned int pixlen;
unsigned long datasize;
if(depth == 1)
{
image = newBitImage(width, height);
image->type = IRGB;
return image;
}
pixlen = ((depth - 1) / CHAR_BITS) + 1;
pixlen *= CHAR_BITS;
if (pixlen == 0) pixlen = 1;
image = (Image *)alloc_mem(sizeof(Image));
if (!image) return((Image *)0);
@ -113,13 +113,13 @@ unsigned int width, height, depth;
}
memset(image->data, 0, datasize);
image->rgb.used = 0;
image->rgb.compressed = 0;
image->rgb.size = 2;
image->transparent = -1;
return(image);
}
@ -129,7 +129,7 @@ unsigned int width, height;
{
Image *image;
unsigned long datasize;
image = (Image *)alloc_mem(sizeof(Image));
if (!image) return((Image *) 0);
@ -154,13 +154,13 @@ unsigned int width, height;
}
memset(image->data, 0, datasize);
image->rgb.used = 0;
image->rgb.compressed = 0;
image->rgb.size = 2;
image->transparent = -1;
return(image);
}

View File

@ -60,18 +60,18 @@ lf_info_callback(png_struct *state, png_info *info)
int orig_depth = 0;
pngState *png = (pngState *) png_get_progressive_ptr(state);
png_byte bit_depth = png_get_bit_depth(state, info),
color_type = png_get_color_type(state, info);
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);
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);
@ -100,7 +100,7 @@ lf_info_callback(png_struct *state, png_info *info)
orig_depth = bit_depth;
png_set_packing(state);
}
/* tell libpng to strip 16 bit depth files down to 8 bits */
if (bit_depth > 8)
png_set_strip_16(state);

View File

@ -149,9 +149,9 @@ lf_skip_whitespace(
{
while(pnm->pos < len)
{
while(data[pnm->pos] == ' ' ||
data[pnm->pos] == '\n' ||
data[pnm->pos] == '\r' ||
while(data[pnm->pos] == ' ' ||
data[pnm->pos] == '\n' ||
data[pnm->pos] == '\r' ||
data[pnm->pos] == '\t')
{
if(pnm->pos && data[pnm->pos] == '\r' && data[pnm->pos-1] != '\n')
@ -354,7 +354,7 @@ lf_read_raw(
byte *imagepos = pnm->imagepos;
byte *sourcepos = data + pnm->pos;
byte *table = pnm->input_table;
if(table) for(i = bytes_per_line; i; i--)
{
*imagepos++ = table[*sourcepos++];
@ -365,7 +365,7 @@ lf_read_raw(
imagepos += bytes_per_line;
sourcepos += bytes_per_line;
}
pnm->imagepos += pnm->image->bytes_per_line;
pnm->pos += bytes_per_line;
if(pnm->lineProc) pnm->lineProc(pnm->closure, pnm->ypos, pnm->ypos);
@ -385,7 +385,7 @@ lf_read_asc(
int bytes_per_line = pnm->image->width * pnm->image->pixlen;
bytes_per_line += CHAR_BITS - 1;
bytes_per_line /= CHAR_BITS;
while(pnm->ypos < pnm->image->height)
{
if(lf_skip_whitespace(pnm, data, len) == PNM_NEED_DATA)
@ -552,7 +552,7 @@ void *closure;
struct ifs_vector *if_vector;
{
pnmState *pnm;
pnm = (pnmState *)alloc_mem(sizeof(pnmState));
memset(pnm, 0, sizeof(pnmState));
pnm->state = PNM_READ_MAGIC;
@ -565,4 +565,3 @@ struct ifs_vector *if_vector;
if_vector->addDataProc = &pnmAddData;
if_vector->getImageProc = &pnmGetImage;
}

View File

@ -231,7 +231,7 @@ lf_read_header(
static void
lf_wrap_x(xbmState *xbm)
{
{
if(xbm->xpos >= xbm->image->width)
{
if (xbm->lineProc != NULL)
@ -363,7 +363,7 @@ void *closure;
struct ifs_vector *if_vector;
{
xbmState *xbm;
xbm = (xbmState *)alloc_mem(sizeof(xbmState));
memset(xbm, 0, sizeof(xbmState));
xbm->state = XBM_READ_HEADER;

View File

@ -425,7 +425,7 @@ xccf_color_compare(
int r2,
int g2,
int b2)
{
{
if(lf_abs(r1 - r2) > 6) return false;
if(lf_abs(g1 - g2) > 3) return false;
if(lf_abs(b1 - b2) > 6) return false;

View File

@ -30,13 +30,13 @@ 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,
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
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.
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
@ -59,7 +59,7 @@ SOFTWARE.
#include <X11/Xmu/Misc.h>
#include <X11/Xaw/XawInit.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Label.h>
#include <X11/Xaw/Cardinals.h>
@ -83,7 +83,7 @@ static XtResource resources[] = {
XtOffsetOf(AuthDialogRec, authdialog.username), XtRString, NULL },
{ XtNicon, XtCIcon, XtRBitmap, sizeof(Pixmap),
XtOffsetOf(AuthDialogRec, authdialog.icon), XtRImmediate, 0 },
{ XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer),
{ XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer),
XtOffsetOf(AuthDialogRec, authdialog.callbacks),XtRCallback, NULL },
};
@ -314,7 +314,7 @@ static void
CreateAuthDialogFields(w)
Widget w;
{
AuthDialogWidget dw = (AuthDialogWidget) w;
AuthDialogWidget dw = (AuthDialogWidget) w;
dw->authdialog.usernameW =
XtVaCreateWidget("username",
@ -361,7 +361,7 @@ Widget w;
XtManageChild(dw->authdialog.usernameW);
XtManageChild(dw->authdialog.passwordW);
/*
/*
* Value widget gets the keyboard focus.
*/
@ -387,7 +387,7 @@ XtPointer param;
*/
Widget button;
button = XtCreateManagedWidget( name, commandWidgetClass, authdialog,
button = XtCreateManagedWidget( name, commandWidgetClass, authdialog,
(ArgList)NULL, (Cardinal)0 );
if (function != NULL) /* don't add NULL callback func. */

View File

@ -30,13 +30,13 @@ 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,
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
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.
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

View File

@ -30,13 +30,13 @@ 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,
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
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.
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

View File

@ -2,7 +2,7 @@
HEADERS = MyDialog.h MyDialogP.h TextField.h TextFieldP.h AuthDialogP.h \
AuthDialog.h
SRCS = MyDialog.c TextField.c AuthDialog.c
OBJS = MyDialog.o TextField.o AuthDialog.o

View File

@ -30,13 +30,13 @@ 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,
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
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.
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
@ -59,7 +59,7 @@ SOFTWARE.
#include <X11/Xmu/Misc.h>
#include <X11/Xaw/XawInit.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Cardinals.h>
#include "TextField.h"
@ -73,7 +73,7 @@ static char defaultTranslations[] =
static XtResource resources[] = {
{ XtNlabel, XtCLabel, XtRString, sizeof(String),
XtOffsetOf(MyDialogRec, mydialog.label), XtRString, NULL },
{XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer),
{XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer),
XtOffsetOf(MyDialogRec, mydialog.callbacks),XtRCallback,(XtPointer)NULL},
};
@ -195,12 +195,12 @@ Cardinal *num_args;
}
}
}
XtOverrideTranslations(dw->mydialog.valueW,
XtParseTranslationTable(defaultTranslations));
XtManageChild(dw->mydialog.valueW);
XtSetKeyboardFocus(new, dw->mydialog.valueW);
}

View File

@ -30,13 +30,13 @@ 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,
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
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.
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

View File

@ -30,13 +30,13 @@ 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,
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
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.
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

View File

@ -31,7 +31,7 @@
#ifndef XtIsTextField
#define XtIsTextField(w) XtIsSubclass((Widget)w, textfieldWidgetClass)
#endif
#endif
/* Athena style resource names */

View File

@ -98,7 +98,7 @@ size_t len;
li->len = len;
li->y = pi->height;
pi->height += pi->lineheight;
li->width = XTextWidth(pi->font, s, len);
if (li->width > pi->width) pi->width = li->width + PLAIN_MARGIN * 2;
@ -385,7 +385,7 @@ void *state;
pi->bg = GUIBackgroundPixel(wd);
XSetForeground(pi->dpy, pi->gc, pi->fg);
GUISetScrollBar(wd, true);
if (GUIGetDimensions(wd, &width, &height) == -1)
{

View File

@ -1,4 +1,4 @@
/*
/*
* getcwd.c --
*
* This file provides an implementation of the getcwd procedure
@ -12,7 +12,7 @@
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
*
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
@ -62,4 +62,3 @@ getcwd(buf, size)
strcpy(buf, realBuffer);
return buf;
}

View File

@ -110,7 +110,7 @@ typedef int bool;
#ifndef MAX
#define MAX(a,b) ((a) < (b) ? (b) : (a))
#endif
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif

View File

@ -130,7 +130,7 @@ static void dopr( char *buffer, const char *format, va_list args )
case '%':
ljust = len = zpad = 0;
precision = -1; set_precision = 0;
nextch:
nextch:
ch = *format++;
switch( ch ){
case 0:
@ -267,7 +267,7 @@ fmtnum( long value, int base, int dosign, int ljust,
if( dosign ){
if( value < 0 ) {
signvalue = '-';
uvalue = -value;
uvalue = -value;
}
}
if( base < 0 ){
@ -350,5 +350,3 @@ static void dopr_outch( int c )
*output++ = c;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* strstr.c --
*
* Source code for the "strstr" library routine.
@ -11,7 +11,7 @@
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
*
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF

View File

@ -1,4 +1,4 @@
/*
/*
* strtol.c --
*
* Source code for the "strtol" library procedure.
@ -11,7 +11,7 @@
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
*
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF

View File

@ -1,4 +1,4 @@
/*
/*
* strtoul.c --
*
* Source code for the "strtoul" library procedure.
@ -11,7 +11,7 @@
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
*
* IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
@ -101,7 +101,7 @@ strtoul(string, endPtr, base)
* If no base was provided, pick one from the leading characters
* of the string.
*/
if (base == 0)
{
if (*p == '0') {

View File

@ -174,7 +174,7 @@ FileInfo *fi;
}
*cp++ = '\0';
snprintf(f + strlen(f), flen - strlen(f),
format, fi->di.dirname, sa[i], sa[i], cp);
format, fi->di.dirname, sa[i], sa[i], cp);
}
strcat(f, trailer1);
@ -226,7 +226,7 @@ void *closure;
else strcpy(fi->mbuf, " &lt;unknown&gt;");
}
else strcpy(fi->mbuf, " ");
/*
* Resize the file entry table if needed.
*/
@ -238,7 +238,7 @@ void *closure;
fi->di.size *= 2;
fi->di.sa = nsa;
}
salen = strlen(de->d_name) + strlen(fi->mbuf) + 2 * sizeof(char);
fi->di.sa[fi->di.used] = (char *)MPGet(fi->mp, salen);
strcpy(fi->di.sa[fi->di.used], de->d_name);
@ -409,7 +409,7 @@ void *class_closure;
return(NULL);
}
fi->di.dirname = (char *)MPGet(fi->mp, strlen(fi->filename) +
fi->di.dirname = (char *)MPGet(fi->mp, strlen(fi->filename) +
strlen("/") + sizeof(char));
strcpy(fi->di.dirname, fi->filename);
if (fi->filename[strlen(fi->filename) - 1] != '/')

View File

@ -65,7 +65,7 @@ static struct ftp_message
{ NULL, NULL },
};
typedef struct
typedef struct
{
char *username;
char *password;
@ -313,7 +313,7 @@ FTPData(ios, len, closure)
ChimeraStream ios;
ssize_t len;
void *closure;
{
{
FTPInfo *fi = (FTPInfo *)closure;
if (len < 0)
@ -364,7 +364,7 @@ FTPDirData(ios, len, closure)
ChimeraStream ios;
ssize_t len;
void *closure;
{
{
FTPInfo *fi = (FTPInfo *)closure;
if (len > 0)
@ -572,10 +572,10 @@ FTPInfo *fi;
/* error */
return;
}
snprintf (dhost, sizeof(dhost), "%d.%d.%d.%d", h0, h1, h2, h3);
dport = (p0 << 8) + p1;
/*
* Check for error here.
*/
@ -669,7 +669,7 @@ FTPInfo *fi;
{
snprintf (fi->request, sizeof(fi->request),
"PASS -nobody@nowhere.org\r\n");
}
}
FTPSimple(fi, FTPType, false);
return;
@ -733,7 +733,7 @@ FTPInfo *fi;
{
snprintf (fi->request, sizeof(fi->request), "USER anonymous\r\n");
}
FTPSimple(fi, FTPPass, false);
return;
@ -771,7 +771,7 @@ void *class_closure;
{
fi->msg[i] = ftp_messages[i].def;
}
if ((tlen = strlen(fi->msg[i])) > mlen) mlen = tlen;
if ((tlen = strlen(fi->msg[i])) > mlen) mlen = tlen;
}
snprintf (fi->msgbuf, sizeof(fi->msgbuf),
@ -836,7 +836,7 @@ MIMEHeader *mh;
*data = fi->db;
*len = fi->dblen;
*mh = fi->mh;
return;
}
@ -873,7 +873,7 @@ ChimeraResources cres;
ph.stop = FTPCancel;
ph.getdata = FTPGetData;
SourceAddHooks(cres, &ph);
return;
}
@ -921,12 +921,12 @@ FTPInfo *fi;
{
hostname = fi->wr->up->hostname;
}
filename = fi->wr->up->filename;
hlen = strlen(hostname);
flen = strlen(filename);
elen = strlen(entry);
sacount = 0;
for (cp = fi->db, lastcp = cp + fi->dblen; cp < lastcp; cp++)
{
@ -967,4 +967,3 @@ FTPInfo *fi;
return(f);
}

View File

@ -77,7 +77,7 @@ static struct http_message
{ NULL, NULL },
};
typedef struct
typedef struct
{
char *username;
char *password;
@ -132,7 +132,7 @@ typedef struct
size_t bsize;
size_t bmax;
size_t doff; /* offset to data beyond header */
MIMEHeader mh;
MIMEHeader mh;
} HTTPInfo;
static int uuencode _ArgProto((unsigned char *, unsigned int, char *));
@ -206,20 +206,20 @@ char *bufcoded;
{
/* ENC is the basic 1 character encoding function to make a char printing */
#define ENC(c) six2pr[c]
register char *outptr = bufcoded;
unsigned int i;
for (i=0; i<nbytes; i += 3)
for (i=0; i<nbytes; i += 3)
{
*(outptr++) = ENC(*bufin >> 2); /* c1 */
*(outptr++) = ENC(((*bufin << 4) & 060) | ((bufin[1] >> 4) & 017)); /*c2*/
*(outptr++) = ENC(((bufin[1] << 2) & 074) | ((bufin[2] >> 6) & 03));/*c3*/
*(outptr++) = ENC(bufin[2] & 077); /* c4 */
bufin += 3;
}
/* If nbytes was not a multiple of 3, then we have encoded too
* many characters. Adjust appropriately.
*/
@ -267,7 +267,7 @@ char *password;
HTTPFailure(hi);
}
HTTPDestroyInfo(hi);
return;
}
@ -370,7 +370,7 @@ ssize_t *len;
strlen(authfield) +
2 * strlen(username) + 2 * strlen(":") +
2 * strlen(password != NULL ? password:"") +
2 * strlen(hi->hp->type) +
2 * strlen(hi->hp->type) +
strlen("\r\n") + 1);
strcpy(line, username);
if (password != NULL)
@ -413,7 +413,7 @@ ssize_t *len;
line = (char *)MPGet(hi->rmp, linelen);
snprintf (line, linelen, uaformat, ua);
if (line != NULL) *len = strlen(line);
if (line != NULL) *len = strlen(line);
return((byte *)line);
}
@ -469,7 +469,7 @@ ssize_t *len;
{
rlen += strlen(nr) + delimlen;
}
line = (char *)MPGet(hi->rmp, strlen(accfield) +
rlen + strlen("\r\n") + 1);
strcpy(line, accfield);
@ -529,7 +529,7 @@ ssize_t *len;
{
linelen = strlen(getformat2) + wr->input_len + strlen(filename) +
strlen("?") + 1;
line = (char *)MPGet(hi->rmp, linelen);
snprintf (line, linelen, getformat2, filename, "?", wr->input_data);
}
@ -641,7 +641,7 @@ ssize_t *len;
return(NULL);
}
/*
/*
* HTTPBuildRequest
*
* This became less efficient but easier to hack, I think.
@ -752,15 +752,15 @@ void *closure;
HTTPInfo *hi = *hip;
long rnum;
char *rmsg;
if (len < 0)
{
HTTPFailure(hi);
return;
}
if (len > 0) hi->blen += len;
if (len == 0 || ((hi->blen - hi->doff) == hi->bmax && hi->bmax > 0))
{
SourceSendMessage(hi->ws, hi->hc->msg[HM_DONE]);
@ -783,16 +783,16 @@ void *closure;
rmsg = hi->hc->msg[HM_RU];
rnum = (long)(hi->blen - hi->doff);
}
if (hi->rcount++ % PRINT_RATE == 0)
{
snprintf (hi->msgbuf, sizeof(hi->msgbuf), "%ld %s", rnum, rmsg);
SourceSendMessage(hi->ws, hi->msgbuf);
}
HTTPRead(hip, HTTPReadData);
}
return;
}
@ -836,14 +836,14 @@ HTTPInfo **hip;
pup = up;
up = hi->up;
}
if (HTTPCreateInfo(hip, hi->ws, hi->wr, hi->hc,
up, pup, hi->hp) == -1)
{
HTTPFailure(hi);
}
HTTPDestroyInfo(hi);
return(-1);
}
if (MIMEGetField(hi->mh, "content-length", &value) == 0 && value != NULL)
@ -869,7 +869,7 @@ HTTPInfo **hip;
value != NULL && hi->hp == NULL)
{
cache = false;
/*
* Look for the authorization type and realm
*/
@ -892,7 +892,7 @@ HTTPInfo **hip;
}
}
}
/*
* If there is an authorization type and realm then try to
* see if the password is already known. If not then ask the user
@ -924,7 +924,7 @@ HTTPInfo **hip;
else username = hi->up->username;
}
else username = "";
hi->wa = AuthCreate(hi->cres, "Enter password", username,
HTTPAuthCallback, hip);
@ -938,7 +938,7 @@ HTTPInfo **hip;
}
}
}
if (MIMEGetField(hi->mh, "content-type", &value) != 0 || value == NULL)
{
if ((value = ChimeraExt2Content(hi->cres, HTTPGetFilename(hi))) == NULL)
@ -947,15 +947,15 @@ HTTPInfo **hip;
}
MIMEAddField(hi->mh, "content-type", value);
}
if (hi->url != NULL) url = hi->url;
else url = "unknown:/";
MIMEAddField(hi->mh, "x-url", url);
/* Do not call this before dealing with "Location:" */
SourceInit(hi->ws, cache && hi->hp == NULL);
return(0);
}
@ -1249,7 +1249,7 @@ void *closure;
StreamDestroy(hi->ios);
hi->ios = NULL;
}
return;
}
@ -1310,7 +1310,7 @@ ChimeraResources cres;
{
hc->msg[i] = http_messages[i].def;
}
if ((tlen = strlen(hc->msg[i])) > hc->mlen) hc->mlen = tlen;
if ((tlen = strlen(hc->msg[i])) > hc->mlen) hc->mlen = tlen;
}
memset(&ph, 0, sizeof(ph));

View File

@ -149,7 +149,7 @@ ChimeraResources cres;
ph.stop = MailtoCancel;
ph.getdata = MailtoGetData;
SourceAddHooks(cres, &ph);
memset(&ph, 0, sizeof(ph));
ph.name = "x-mailtoaction";
ph.init = MailtoActionInit;
@ -157,7 +157,7 @@ ChimeraResources cres;
ph.stop = MailtoActionCancel;
ph.getdata = MailtoActionGetData;
SourceAddHooks(cres, &ph);
return;
}
@ -247,7 +247,7 @@ MIMEHeader *mh;
*data = mi->data;
*len = mi->len;
*mh = mi->mh;
return;
}
@ -339,7 +339,7 @@ void *closure;
strcat(f, "<INPUT type=submit name=SendMail value=\"Send mail\">\n");
strcat(f, "<INPUT type=submit name=Cancel value=\"Cancel\">\n");
strcat(f, "</FORM>\n</BODY>\n</HTML>\n");
mi->data = (byte *)f;
mi->len = strlen(f);
SourceInit(mi->ws, false);
@ -401,7 +401,7 @@ char *data;
{
mp = MPCreate();
mh = MailHeaders;
for(mh = MailHeaders; mh->name != NULL; mh++)
{
p = strstr(data, mh->name) + strlen(mh->name) + 1;
@ -499,6 +499,6 @@ MIMEHeader *mh;
*data = mi->data;
*len = mi->len;
*mh = mi->mh;
return;
}