From 2cd784b75ccc82c1001fd5e917d5978ae0e22eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= Date: Mon, 19 Apr 2021 16:49:45 +0200 Subject: [PATCH] Fix whitespace errors as reported by 'git diff --check' --- CHANGES | 12 ++++----- Common.tmpl | 2 +- Common.tmpl.dist | 2 +- chimera/ChimeraAuth.h | 2 +- chimera/Geom.c | 2 +- chimera/WWW.c | 22 ++++++++-------- chimera/auth.c | 4 +-- chimera/bookmark.c | 14 +++++----- chimera/cache.c | 8 +++--- chimera/cmisc.c | 8 +++--- chimera/download.c | 6 ++--- chimera/fallback.c | 2 +- chimera/gui.c | 11 ++++---- chimera/head.c | 20 +++++++-------- chimera/io.c | 10 ++++---- chimera/main.c | 10 ++++---- chimera/request.c | 12 ++++----- chimera/source.c | 14 +++++----- chimera/stack.c | 8 +++--- chimera/timeout.c | 4 +-- chimera/view.c | 12 ++++----- common/dir.c | 2 +- common/mempool.c | 2 +- common/mime.c | 10 ++++---- common/mime.h | 1 - common/ml.c | 9 +++---- common/uproc.c | 2 +- common/url.c | 4 +-- common/url.h | 1 - debian/changelog | 10 ++++---- debian/copyright | 12 ++++----- debian/postinst | 2 +- doc/COPYRIGHT | 8 +++--- doc/LCOPYING | 3 +-- html/css.c | 6 ++--- html/flow.c | 6 ++--- html/font.c | 8 +++--- html/form.c | 40 ++++++++++++++--------------- html/frame.c | 2 +- html/hr.c | 2 +- html/html.c | 12 ++++----- html/html.h | 6 ++--- html/htmltags.h | 2 +- html/inline.c | 6 ++--- html/layout.c | 2 +- html/list.c | 16 ++++++------ html/load.c | 6 ++--- html/map.c | 2 +- html/misc.c | 3 +-- html/module.c | 6 ++--- html/table.c | 15 +++++------ html/text.c | 10 ++++---- image/colorcube.c | 13 +++++----- image/colorcube.h | 2 +- image/dispdither.c | 15 +++++------ image/gif.c | 28 +++++++++----------- image/gifp.h | 4 +-- image/image.c | 30 +++++++++++----------- image/image_endian.h | 2 +- image/imagep.h | 2 +- image/jpeg.c | 8 +++--- image/new.c | 22 ++++++++-------- image/png.c | 14 +++++----- image/pnm.c | 15 +++++------ image/xbm.c | 4 +-- image/xcolorcube.c | 2 +- mxw/AuthDialog.c | 18 ++++++------- mxw/AuthDialog.h | 8 +++--- mxw/AuthDialogP.h | 8 +++--- mxw/Imakefile | 2 +- mxw/MyDialog.c | 18 ++++++------- mxw/MyDialog.h | 8 +++--- mxw/MyDialogP.h | 8 +++--- mxw/TextField.h | 2 +- plain/plain.c | 4 +-- port/getcwd.c | 5 ++-- port/port_after.h | 2 +- port/snprintf.c | 6 ++--- port/strstr.c | 4 +-- port/strtol.c | 4 +-- port/strtoul.c | 6 ++--- proto/file.c | 8 +++--- proto/ftp.c | 25 +++++++++--------- proto/http.c | 60 +++++++++++++++++++++---------------------- proto/mailto.c | 12 ++++----- 85 files changed, 375 insertions(+), 395 deletions(-) diff --git a/CHANGES b/CHANGES index 089fd95..244ce6a 100644 --- a/CHANGES +++ b/CHANGES @@ -403,7 +403,7 @@ Added for check "id" attribute. Erik Corry 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 . Added support for the size attribute for form text input. - Larry Doolittle + Larry Doolittle 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 @@ -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 GIF patch that fixed problems with interfaced 2-color GIFs. - Erik Corry + Erik Corry 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 @@ -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 + Roman Czyborra 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 Patch to HTML.c to make scrolling work right. diff --git a/Common.tmpl b/Common.tmpl index eff872b..59aec1f 100644 --- a/Common.tmpl +++ b/Common.tmpl @@ -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 diff --git a/Common.tmpl.dist b/Common.tmpl.dist index fecc87b..053098d 100644 --- a/Common.tmpl.dist +++ b/Common.tmpl.dist @@ -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 diff --git a/chimera/ChimeraAuth.h b/chimera/ChimeraAuth.h index c4f28a6..d1141a5 100644 --- a/chimera/ChimeraAuth.h +++ b/chimera/ChimeraAuth.h @@ -27,5 +27,5 @@ typedef void (*ChimeraAuthCallback) _ArgProto((void *, char *, char *)); ChimeraAuth AuthCreate _ArgProto((ChimeraResources, char *, char *, ChimeraAuthCallback, void *)); void AuthDestroy _ArgProto((ChimeraAuth)); - + #endif diff --git a/chimera/Geom.c b/chimera/Geom.c index 0f35da8..973feb6 100644 --- a/chimera/Geom.c +++ b/chimera/Geom.c @@ -102,7 +102,7 @@ GeomGeometryManager(w, request, reply) Widget w; XtWidgetGeometry *request; XtWidgetGeometry *reply; -{ +{ return(XtGeometryNo); } diff --git a/chimera/WWW.c b/chimera/WWW.c index fb47359..97f2166 100644 --- a/chimera/WWW.c +++ b/chimera/WWW.c @@ -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) { diff --git a/chimera/auth.c b/chimera/auth.c index 01fd0dc..bda02a2 100644 --- a/chimera/auth.c +++ b/chimera/auth.c @@ -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); diff --git a/chimera/bookmark.c b/chimera/bookmark.c index 7fe0892..41a2a30 100644 --- a/chimera/bookmark.c +++ b/chimera/bookmark.c @@ -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, diff --git a/chimera/cache.c b/chimera/cache.c index 8df8210..fccb537 100644 --- a/chimera/cache.c +++ b/chimera/cache.c @@ -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); diff --git a/chimera/cmisc.c b/chimera/cmisc.c index 30906c6..b84dba2 100644 --- a/chimera/cmisc.c +++ b/chimera/cmisc.c @@ -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); } diff --git a/chimera/download.c b/chimera/download.c index c339529..aa2ef5b 100644 --- a/chimera/download.c +++ b/chimera/download.c @@ -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; diff --git a/chimera/fallback.c b/chimera/fallback.c index fca3b94..f3f557f 100644 --- a/chimera/fallback.c +++ b/chimera/fallback.c @@ -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 char *fallback_resources[] = diff --git a/chimera/gui.c b/chimera/gui.c index 308eafe..0682fbc 100644 --- a/chimera/gui.c +++ b/chimera/gui.c @@ -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)); } - diff --git a/chimera/head.c b/chimera/head.c index 129dba0..372c8bb 100644 --- a/chimera/head.c +++ b/chimera/head.c @@ -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 ("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); } } diff --git a/chimera/io.c b/chimera/io.c index 105bfef..fcd53a6 100644 --- a/chimera/io.c +++ b/chimera/io.c @@ -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) ) ; } diff --git a/chimera/main.c b/chimera/main.c index 59c6fbe..f6c38ec 100644 --- a/chimera/main.c +++ b/chimera/main.c @@ -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); } diff --git a/chimera/request.c b/chimera/request.c index ff5e3ee..2adcd7a 100644 --- a/chimera/request.c +++ b/chimera/request.c @@ -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); diff --git a/chimera/source.c b/chimera/source.c index 6cf7936..c3b2c79 100644 --- a/chimera/source.c +++ b/chimera/source.c @@ -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; diff --git a/chimera/stack.c b/chimera/stack.c index 07330f1..3da712b 100644 --- a/chimera/stack.c +++ b/chimera/stack.c @@ -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; diff --git a/chimera/timeout.c b/chimera/timeout.c index 9255b68..3186867 100644 --- a/chimera/timeout.c +++ b/chimera/timeout.c @@ -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); } diff --git a/chimera/view.c b/chimera/view.c index 569af14..a0b5a95 100644 --- a/chimera/view.c +++ b/chimera/view.c @@ -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); diff --git a/common/dir.c b/common/dir.c index 15e3e3f..34b0cb9 100644 --- a/common/dir.c +++ b/common/dir.c @@ -82,7 +82,7 @@ char *cwd; strcat(r, c); } else r = MPStrDup(mp, c); - + for (p = r; *p != '\0'; ) { if (*p == '/') diff --git a/common/mempool.c b/common/mempool.c index 0583248..718b0f6 100644 --- a/common/mempool.c +++ b/common/mempool.c @@ -180,7 +180,7 @@ char *file; f->next = track_list; track_list = f; #endif - + return(mp); } diff --git a/common/mime.c b/common/mime.c index 103497a..a7a9241 100644 --- a/common/mime.c +++ b/common/mime.c @@ -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; } diff --git a/common/mime.h b/common/mime.h index 7168e5a..6926661 100644 --- a/common/mime.h +++ b/common/mime.h @@ -34,4 +34,3 @@ int MIMEFindData _ArgProto((MIMEHeader, char *, size_t, size_t *)); int MIMEWriteHeader _ArgProto((MIMEHeader, FILE *)); #endif - diff --git a/common/ml.c b/common/ml.c index d958579..cf6f98b 100644 --- a/common/ml.c +++ b/common/ml.c @@ -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)); } - diff --git a/common/uproc.c b/common/uproc.c index b6ae65a..bdf4e68 100644 --- a/common/uproc.c +++ b/common/uproc.c @@ -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); diff --git a/common/url.c b/common/url.c index 338a0a6..2cf458a 100644 --- a/common/url.c +++ b/common/url.c @@ -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); } diff --git a/common/url.h b/common/url.h index ffcff7f..7b2a9cf 100644 --- a/common/url.h +++ b/common/url.h @@ -58,4 +58,3 @@ int URLReadTranslations _ArgProto((GList, char *)); char *URLTranslate _ArgProto((MemPool, GList, char *)); #endif - diff --git a/debian/changelog b/debian/changelog index 8806aef..4e0474c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 15 Sep 2011 20:52:50 +0100 - + -- Mark Baker 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 Mon, 20 Oct 1997 00:14:15 +0100 diff --git a/debian/copyright b/debian/copyright index 0ec5e5b..0b73222 100644 --- a/debian/copyright +++ b/debian/copyright @@ -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 diff --git a/debian/postinst b/debian/postinst index c492b1f..f13e7ef 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,5 +1,5 @@ #!/bin/sh -set -e +set -e # Register in menu if [ "$1" = "configure" ] && [ -x "$(which update-menus 2>/dev/null)" ]; then diff --git a/doc/COPYRIGHT b/doc/COPYRIGHT index 2a8f2ed..e50e7c5 100644 --- a/doc/COPYRIGHT +++ b/doc/COPYRIGHT @@ -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 diff --git a/doc/LCOPYING b/doc/LCOPYING index 0b643ac..d94cf20 100644 --- a/doc/LCOPYING +++ b/doc/LCOPYING @@ -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! - diff --git a/html/css.c b/html/css.c index 6695a1b..9d3c1ee 100644 --- a/html/css.c +++ b/html/css.c @@ -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(); diff --git a/html/flow.c b/html/flow.c index 3655e58..99bc24b 100644 --- a/html/flow.c +++ b/html/flow.c @@ -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; } diff --git a/html/font.c b/html/font.c index 9aca923..4affa9d 100644 --- a/html/font.c +++ b/html/font.c @@ -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 */ diff --git a/html/form.c b/html/form.c index 24d0447..bc7ef13 100644 --- a/html/form.c +++ b/html/form.c @@ -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; } diff --git a/html/frame.c b/html/frame.c index 80b84e3..a55ef6d 100644 --- a/html/frame.c +++ b/html/frame.c @@ -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; diff --git a/html/hr.c b/html/hr.c index f55ba99..3ada17b 100644 --- a/html/hr.c +++ b/html/hr.c @@ -1,7 +1,7 @@ /* * hr.c * - * libhtml - HTML->X renderer + * libhtml - HTML->X renderer * * Copyright (c) 1995-1997, John Kilburg * diff --git a/html/html.c b/html/html.c index 3aad5aa..1ada6e9 100644 --- a/html/html.c +++ b/html/html.c @@ -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); diff --git a/html/html.h b/html/html.h index 355eb21..7dc4b65 100644 --- a/html/html.h +++ b/html/html.h @@ -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 */ diff --git a/html/htmltags.h b/html/htmltags.h index 0e53a9b..4c5b615 100644 --- a/html/htmltags.h +++ b/html/htmltags.h @@ -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 } }; diff --git a/html/inline.c b/html/inline.c index 4a1cb3b..70dc57e 100644 --- a/html/inline.c +++ b/html/inline.c @@ -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; diff --git a/html/layout.c b/html/layout.c index aa48723..5a626d2 100644 --- a/html/layout.c +++ b/html/layout.c @@ -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; diff --git a/html/list.c b/html/list.c index e57fd17..ffa58fa 100644 --- a/html/list.c +++ b/html/list.c @@ -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
    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
      has a TYPE attribute. + * Now see if said
        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); } diff --git a/html/load.c b/html/load.c index 7ad141c..fa0564b 100644 --- a/html/load.c +++ b/html/load.c @@ -1,7 +1,7 @@ /* * load.c * - * libhtml - HTML->X renderer + * libhtml - HTML->X renderer * * Copyright (c) 1996-1997, John Kilburg * @@ -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; diff --git a/html/map.c b/html/map.c index a6be063..83c4f39 100644 --- a/html/map.c +++ b/html/map.c @@ -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) diff --git a/html/misc.c b/html/misc.c index e32ca03..d8632b1 100644 --- a/html/misc.c +++ b/html/misc.c @@ -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; } - diff --git a/html/module.c b/html/module.c index b02c18c..8327cad 100644 --- a/html/module.c +++ b/html/module.c @@ -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); diff --git a/html/table.c b/html/table.c index 650e8a1..c4749fb 100644 --- a/html/table.c +++ b/html/table.c @@ -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)); } - diff --git a/html/text.c b/html/text.c index b376e00..3864317 100644 --- a/html/text.c +++ b/html/text.c @@ -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)); } } diff --git a/image/colorcube.c b/image/colorcube.c index 1d518ec..2f4526a 100644 --- a/image/colorcube.c +++ b/image/colorcube.c @@ -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; } - diff --git a/image/colorcube.h b/image/colorcube.h index 7bfb26d..2564299 100644 --- a/image/colorcube.h +++ b/image/colorcube.h @@ -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; diff --git a/image/dispdither.c b/image/dispdither.c index 83df627..0d2b85d 100644 --- a/image/dispdither.c +++ b/image/dispdither.c @@ -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( /************************************************************************/ - diff --git a/image/gif.c b/image/gif.c index bba7be0..dbf2955 100644 --- a/image/gif.c +++ b/image/gif.c @@ -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; } - - - - diff --git a/image/gifp.h b/image/gifp.h index 0c614c8..be34edd 100644 --- a/image/gifp.h +++ b/image/gifp.h @@ -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 - - diff --git a/image/image.c b/image/image.c index 7462198..c486cfb 100644 --- a/image/image.c +++ b/image/image.c @@ -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; } diff --git a/image/image_endian.h b/image/image_endian.h index e42d2f7..1f40412 100644 --- a/image/image_endian.h +++ b/image/image_endian.h @@ -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 * diff --git a/image/imagep.h b/image/imagep.h index 305b116..6576b58 100644 --- a/image/imagep.h +++ b/image/imagep.h @@ -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 diff --git a/image/jpeg.c b/image/jpeg.c index ef266c1..9120da4 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -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) diff --git a/image/new.c b/image/new.c index 2e9318e..1d3d41e 100644 --- a/image/new.c +++ b/image/new.c @@ -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); } diff --git a/image/png.c b/image/png.c index 0b20dce..60636b6 100644 --- a/image/png.c +++ b/image/png.c @@ -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); diff --git a/image/pnm.c b/image/pnm.c index 105b07b..6dc311b 100644 --- a/image/pnm.c +++ b/image/pnm.c @@ -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; } - diff --git a/image/xbm.c b/image/xbm.c index bde9ef1..ccd9659 100644 --- a/image/xbm.c +++ b/image/xbm.c @@ -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; diff --git a/image/xcolorcube.c b/image/xcolorcube.c index f09bb03..1c3c55a 100644 --- a/image/xcolorcube.c +++ b/image/xcolorcube.c @@ -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; diff --git a/mxw/AuthDialog.c b/mxw/AuthDialog.c index a1de560..df70a4b 100644 --- a/mxw/AuthDialog.c +++ b/mxw/AuthDialog.c @@ -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 #include -#include +#include #include #include @@ -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. */ diff --git a/mxw/AuthDialog.h b/mxw/AuthDialog.h index d6ee4be..f8cc466 100644 --- a/mxw/AuthDialog.h +++ b/mxw/AuthDialog.h @@ -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 diff --git a/mxw/AuthDialogP.h b/mxw/AuthDialogP.h index 8940bff..9ed720f 100644 --- a/mxw/AuthDialogP.h +++ b/mxw/AuthDialogP.h @@ -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 diff --git a/mxw/Imakefile b/mxw/Imakefile index 53e32ba..45d128c 100644 --- a/mxw/Imakefile +++ b/mxw/Imakefile @@ -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 diff --git a/mxw/MyDialog.c b/mxw/MyDialog.c index f237287..1ae97dd 100644 --- a/mxw/MyDialog.c +++ b/mxw/MyDialog.c @@ -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 #include -#include +#include #include #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); } diff --git a/mxw/MyDialog.h b/mxw/MyDialog.h index 0fbfdf7..53e9de4 100644 --- a/mxw/MyDialog.h +++ b/mxw/MyDialog.h @@ -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 diff --git a/mxw/MyDialogP.h b/mxw/MyDialogP.h index d9a64d7..9cf2846 100644 --- a/mxw/MyDialogP.h +++ b/mxw/MyDialogP.h @@ -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 diff --git a/mxw/TextField.h b/mxw/TextField.h index b039733..04f2880 100644 --- a/mxw/TextField.h +++ b/mxw/TextField.h @@ -31,7 +31,7 @@ #ifndef XtIsTextField #define XtIsTextField(w) XtIsSubclass((Widget)w, textfieldWidgetClass) -#endif +#endif /* Athena style resource names */ diff --git a/plain/plain.c b/plain/plain.c index 6b2f4af..a43fc0d 100644 --- a/plain/plain.c +++ b/plain/plain.c @@ -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) { diff --git a/port/getcwd.c b/port/getcwd.c index 99bc1b8..14567f9 100644 --- a/port/getcwd.c +++ b/port/getcwd.c @@ -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; } - diff --git a/port/port_after.h b/port/port_after.h index 6337c38..b765fe7 100644 --- a/port/port_after.h +++ b/port/port_after.h @@ -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 diff --git a/port/snprintf.c b/port/snprintf.c index 7c838e7..929fbff 100644 --- a/port/snprintf.c +++ b/port/snprintf.c @@ -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; } } - - diff --git a/port/strstr.c b/port/strstr.c index 4fd5e1b..21f2770 100644 --- a/port/strstr.c +++ b/port/strstr.c @@ -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 diff --git a/port/strtol.c b/port/strtol.c index 622d48c..d278d98 100644 --- a/port/strtol.c +++ b/port/strtol.c @@ -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 diff --git a/port/strtoul.c b/port/strtoul.c index 68c7ea2..24f9081 100644 --- a/port/strtoul.c +++ b/port/strtoul.c @@ -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') { diff --git a/proto/file.c b/proto/file.c index 28c5a1e..c1b7144 100644 --- a/proto/file.c +++ b/proto/file.c @@ -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, " <unknown>"); } 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] != '/') diff --git a/proto/ftp.c b/proto/ftp.c index b6e70dd..210f1d8 100644 --- a/proto/ftp.c +++ b/proto/ftp.c @@ -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); } - diff --git a/proto/http.c b/proto/http.c index bef8698..915dceb 100644 --- a/proto/http.c +++ b/proto/http.c @@ -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> 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)); diff --git a/proto/mailto.c b/proto/mailto.c index 8cabe1f..2e9b665 100644 --- a/proto/mailto.c +++ b/proto/mailto.c @@ -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, "\n"); strcat(f, "\n"); strcat(f, "\n\n\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; }