warpPointerForIndex:
Boolean
@@ -587,14 +587,14 @@ version of Mosaic to a 2.x version:
Back to top level Documentation
-Index
+Index
Last Modified: 9 July 1995
diff --git a/libXmx/Makefile.in b/libXmx/Makefile.in
index 3eba122..31fd9bb 100644
--- a/libXmx/Makefile.in
+++ b/libXmx/Makefile.in
@@ -1,7 +1,7 @@
# @configure_output@
# This file is used by Autoconf to make the real Makefile.
# DO NOT EDIT THIS FILE!
-# If you want to change something do it to the Makefile autoconf
+# If you want to change something do it to the Makefile autoconf
# creates. You should never have to edit this file.
CC= @CC@
diff --git a/libXmx/Xmx.c b/libXmx/Xmx.c
index 2dcb94a..17112ea 100644
--- a/libXmx/Xmx.c
+++ b/libXmx/Xmx.c
@@ -171,7 +171,7 @@ void
XmxAddEventHandler (Widget w, EventMask event_mask, XtEventHandler proc,
int client_data)
{
- XtAddEventHandler
+ XtAddEventHandler
(w, event_mask, False, proc, (XtPointer)_XmxMakeClientData (client_data));
return;
@@ -195,19 +195,19 @@ XmxRemoveEventHandler (Widget w, EventMask event_mask, XtEventHandler proc,
/* Adapted from Dan Heller's post in comp.windows.x.motif;
assumes BulletinBoard with one (centered) child. */
static void
-XmxCenteringResize
+XmxCenteringResize
(CompositeWidget w, XConfigureEvent *event, String args[], int *num_args)
{
WidgetList children;
int width = event->width;
int height = event->height;
- Dimension w_width, w_height;
-
+ Dimension w_width, w_height;
+
/* get handle to BulletinBoard's children and marginal spacing */
XtVaGetValues (w,
XmNchildren, &children,
NULL);
-
+
XtVaGetValues (children[0],
XmNheight, &w_height,
XmNwidth, &w_width,
@@ -216,7 +216,7 @@ XmxCenteringResize
XmNx, width/2 - w_width/2,
XmNy, height/2 - w_height/2,
NULL);
-
+
return;
}
@@ -257,7 +257,7 @@ void XmxManageRemanage (Widget w)
XtUnmanageChild (w);
XtManageChild (w);
#endif
-
+
if (XtIsManaged (w))
if (XtIsShell(w))
XRaiseWindow (XtDisplay (w), XtWindow (w));
@@ -297,7 +297,7 @@ Widget XmxMakePushButton (Widget parent, String name, XtCallbackProc cb,
}
Xmx_w = XtCreateManagedWidget ("pushbutton", xmPushButtonWidgetClass,
parent, Xmx_wargs, Xmx_n);
- XtAddCallback (Xmx_w, XmNactivateCallback, cb,
+ XtAddCallback (Xmx_w, XmNactivateCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
if (xmstr)
@@ -308,12 +308,12 @@ Widget XmxMakePushButton (Widget parent, String name, XtCallbackProc cb,
}
/* args work */
-Widget XmxMakeNamedPushButton (Widget parent, String name, String wname,
+Widget XmxMakeNamedPushButton (Widget parent, String name, String wname,
XtCallbackProc cb,
int cb_data)
{
XmString label;
-
+
if (name)
{
label = XmStringCreateLtoR (name, XmSTRING_DEFAULT_CHARSET);
@@ -321,7 +321,7 @@ Widget XmxMakeNamedPushButton (Widget parent, String name, String wname,
}
Xmx_w = XtCreateManagedWidget (wname, xmPushButtonWidgetClass,
parent, Xmx_wargs, Xmx_n);
- XtAddCallback (Xmx_w, XmNactivateCallback, cb,
+ XtAddCallback (Xmx_w, XmNactivateCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
if (name)
XmStringFree (label);
@@ -336,9 +336,9 @@ Widget XmxMakeBlankButton (Widget parent, XtCallbackProc cb,
{
Xmx_w = XtCreateManagedWidget ("blankbutton", xmPushButtonWidgetClass,
parent, Xmx_wargs, Xmx_n);
- XtAddCallback (Xmx_w, XmNactivateCallback, cb,
+ XtAddCallback (Xmx_w, XmNactivateCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
-
+
Xmx_n = 0;
return Xmx_w;
}
@@ -346,7 +346,7 @@ Widget XmxMakeBlankButton (Widget parent, XtCallbackProc cb,
/* ------------------------------- COMMAND -------------------------------- */
/* args work */
-Widget XmxMakeCommand
+Widget XmxMakeCommand
(Widget parent, String prompt, XtCallbackProc cb, int cb_data)
{
XmString xmstr = XmxMakeXmstrFromString (prompt);
@@ -354,8 +354,8 @@ Widget XmxMakeCommand
XmxSetArg (XmNpromptString, (XtArgVal)xmstr);
Xmx_w = XtCreateManagedWidget ("command", xmCommandWidgetClass, parent,
Xmx_wargs, Xmx_n);
- XtAddCallback
- (Xmx_w, XmNcommandEnteredCallback, cb,
+ XtAddCallback
+ (Xmx_w, XmNcommandEnteredCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
XmStringFree (xmstr);
@@ -376,7 +376,7 @@ Widget XmxMakeScrolledList
along with it... */
XtAddCallback (Xmx_w, XmNdefaultActionCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
-
+
Xmx_n = 0;
return Xmx_w;
}
@@ -433,7 +433,7 @@ Widget XmxMakeToggleButton (Widget parent, String name, XtCallbackProc cb,
("togglebutton", xmToggleButtonWidgetClass, parent, Xmx_wargs, Xmx_n);
/* Used to be XmNarmCallback --- probably not right. */
if (cb)
- XtAddCallback (Xmx_w, XmNvalueChangedCallback, cb,
+ XtAddCallback (Xmx_w, XmNvalueChangedCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
XmStringFree (label);
@@ -446,7 +446,7 @@ Widget XmxMakeToggleButton (Widget parent, String name, XtCallbackProc cb,
void XmxSetToggleButton (Widget button, int set_state)
{
assert (set_state == XmxSet || set_state == XmxUnset);
- XmToggleButtonSetState
+ XmToggleButtonSetState
(button, (set_state == XmxSet) ? True : False, False);
Xmx_n = 0;
@@ -478,10 +478,10 @@ Widget XmxMakeScale (Widget parent, XtCallbackProc cb, int cb_data,
Xmx_w = XtCreateManagedWidget ("scale", xmScaleWidgetClass, parent,
Xmx_wargs, Xmx_n);
- XtAddCallback
- (Xmx_w, XmNvalueChangedCallback, cb,
+ XtAddCallback
+ (Xmx_w, XmNvalueChangedCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
- XtAddCallback (Xmx_w, XmNdragCallback, cb,
+ XtAddCallback (Xmx_w, XmNdragCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
Xmx_n = 0;
@@ -573,7 +573,7 @@ void XmxSetOffsets (Widget w, int top, int bottom, int left, int right)
XmxSetArg (XmNleftOffset, (XtArgVal)left);
if (right != XmxNoOffset)
XmxSetArg (XmNrightOffset, (XtArgVal)right);
-
+
XmxSetValues (w);
Xmx_n = 0;
@@ -581,7 +581,7 @@ void XmxSetOffsets (Widget w, int top, int bottom, int left, int right)
}
/* args sent to w */
-void XmxSetConstraints (Widget w,
+void XmxSetConstraints (Widget w,
int top, int bottom, int left, int right,
Widget topw, Widget botw, Widget lefw, Widget rigw)
{
@@ -591,7 +591,7 @@ void XmxSetConstraints (Widget w,
if (topw)
XmxSetArg (XmNtopWidget, (XtArgVal)topw);
}
-
+
if (bottom != XmATTACH_NONE)
{
XmxSetArg (XmNbottomAttachment, (XtArgVal)bottom);
@@ -612,7 +612,7 @@ void XmxSetConstraints (Widget w,
if (rigw)
XmxSetArg (XmNrightWidget, (XtArgVal)rigw);
}
-
+
XmxSetValues (w);
Xmx_n = 0;
@@ -705,7 +705,7 @@ Widget XmxMakeCenteringBboard (Widget parent, XtAppContext app)
{
XtActionsRec rec;
- Xmx_w = XtCreateManagedWidget
+ Xmx_w = XtCreateManagedWidget
("bboard", xmBulletinBoardWidgetClass, parent, Xmx_wargs, Xmx_n);
/* Does this have to happen more than once? */
@@ -714,9 +714,9 @@ Widget XmxMakeCenteringBboard (Widget parent, XtAppContext app)
XtAppAddActions (app, &rec, 1);
/* This does, for sure... */
- XtOverrideTranslations
+ XtOverrideTranslations
(Xmx_w, XtParseTranslationTable (": resize()"));
-
+
Xmx_n = 0;
return Xmx_w;
}
@@ -830,9 +830,9 @@ Widget XmxMakeQuestionDialog (Widget parent, String question, String title,
Xmx_w = XmCreateQuestionDialog (parent, "question", Xmx_wargs, Xmx_n);
XtUnmanageChild (XmMessageBoxGetChild (Xmx_w, XmDIALOG_HELP_BUTTON));
- XtAddCallback (Xmx_w, XmNcancelCallback, cb,
+ XtAddCallback (Xmx_w, XmNcancelCallback, cb,
(XtPointer)_XmxMakeClientData (no_token));
- XtAddCallback (Xmx_w, XmNokCallback, cb,
+ XtAddCallback (Xmx_w, XmNokCallback, cb,
(XtPointer)_XmxMakeClientData (yes_token));
XmStringFree (message);
@@ -921,21 +921,21 @@ Widget XmxMakeFileSBDialog (Widget parent, String title, String selection_txt,
XmxSetArg (XmNdialogTitle, (XtArgVal)dialog_title);
/* Can't set width of box with XmNwidth here... why not? */
- /* this will cause the dialog to only resize if needed. That
+ /* this will cause the dialog to only resize if needed. That
way it won't be growing and shrinking all the time... very annoying. - DXP */
XmxSetArg (XmNresizePolicy, (XtArgVal)XmRESIZE_GROW);
/* Create the FileSelectionBox with OK and Cancel buttons. */
Xmx_w = XmCreateFileSelectionDialog (parent, "fsb", Xmx_wargs, Xmx_n);
XtUnmanageChild (XmFileSelectionBoxGetChild (Xmx_w, XmDIALOG_HELP_BUTTON));
- XtAddCallback (Xmx_w, XmNokCallback, cb,
+ XtAddCallback (Xmx_w, XmNokCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
- XtAddCallback (Xmx_w, XmNcancelCallback,
+ XtAddCallback (Xmx_w, XmNcancelCallback,
(XtCallbackProc)_XmxCancelCallback, 0);
/* Set selection label to specified selection_txt. */
Xmx_n = 0;
- _selection_label =
+ _selection_label =
XmFileSelectionBoxGetChild (Xmx_w, XmDIALOG_SELECTION_LABEL);
XmxSetArg (XmNlabelString, (XtArgVal)label);
XtSetValues (_selection_label, Xmx_wargs, Xmx_n);
@@ -977,7 +977,7 @@ XmxCallback(_XmxHelpTextCancelCallback)
}
/* args work */
-Widget XmxMakeHelpTextDialog
+Widget XmxMakeHelpTextDialog
(Widget parent, String str, String title, Widget *text_w)
{
Widget _box, _outer_frame, _form;
@@ -1013,17 +1013,17 @@ Widget XmxMakeHelpTextDialog
_sep = XmxMakeHorizontalSeparator (_form);
/* Make an OK button. */
- _buttons_form = XmxMakeFormAndOneButton
+ _buttons_form = XmxMakeFormAndOneButton
(_form, _XmxHelpTextCancelCallback, "OK", 0);
/* Constraints for _form. */
- XmxSetConstraints
- (XtParent (_scr_text), XmATTACH_FORM, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (XtParent (_scr_text), XmATTACH_FORM, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM, NULL, _sep, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_sep, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
NULL, _buttons_form, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_FORM,
NULL, NULL, NULL, NULL);
@@ -1082,7 +1082,7 @@ Widget XmxMakeHorizontalSpacer (Widget parent)
XmString label = XmStringCreateLtoR (" ", XmSTRING_DEFAULT_CHARSET);
XmxSetArg (XmNlabelString, (XtArgVal)label);
- Xmx_w = XtCreateManagedWidget ("label", xmLabelGadgetClass, parent,
+ Xmx_w = XtCreateManagedWidget ("label", xmLabelGadgetClass, parent,
Xmx_wargs, Xmx_n);
XmStringFree (label);
@@ -1113,7 +1113,7 @@ Widget XmxMakeScrolledText (Widget parent)
Xmx_wargs, Xmx_n);
XtManageChild (Xmx_w);
- /* Remember this returns the Text Widget, NOT the ScrolledWindow Widget,
+ /* Remember this returns the Text Widget, NOT the ScrolledWindow Widget,
which is what needs to be tied into a form. Use XtParent to get the
actual ScrolledWindow. */
Xmx_n = 0;
@@ -1165,7 +1165,7 @@ String XmxTextGetString (Widget text)
/* args do nothing */
void XmxAddCallbackToText (Widget text, XtCallbackProc cb, int cb_data)
{
- XtAddCallback (text, XmNactivateCallback, cb,
+ XtAddCallback (text, XmNactivateCallback, cb,
(XtPointer)_XmxMakeClientData (cb_data));
return;
}
@@ -1178,7 +1178,7 @@ void XmxAddCallbackToText (Widget text, XtCallbackProc cb, int cb_data)
#ifdef __sgi
/* args work */
Widget
-XmxMakeDrawingVolume
+XmxMakeDrawingVolume
(Widget parent, int width, int height,
GLXconfig *glxConfig,
XtCallbackProc redraw_cb, XtCallbackProc resize_cb,
@@ -1191,11 +1191,11 @@ XmxMakeDrawingVolume
Xmx_w = GlxCreateMDraw (parent, "drawingvolume", Xmx_wargs, Xmx_n);
XtManageChild (Xmx_w);
- XtAddCallback (Xmx_w, GlxNexposeCallback, redraw_cb,
+ XtAddCallback (Xmx_w, GlxNexposeCallback, redraw_cb,
(XtPointer)_XmxMakeClientData (0));
- XtAddCallback (Xmx_w, GlxNresizeCallback, resize_cb,
+ XtAddCallback (Xmx_w, GlxNresizeCallback, resize_cb,
(XtPointer)_XmxMakeClientData (0));
- XtAddCallback (Xmx_w, GlxNginitCallback, ginit_cb,
+ XtAddCallback (Xmx_w, GlxNginitCallback, ginit_cb,
(XtPointer)_XmxMakeClientData (0));
Xmx_n = 0;
@@ -1219,7 +1219,7 @@ void XmxInstallColormapsWithOverlay (Widget toplevel, Widget glw)
Window overlay, popup, underlay;
Arg args[5];
register int i=0;
-
+
i=0;
XtSetArg(args[i], GlxNoverlayWindow, &overlay); i++;
XtSetArg(args[i], GlxNpopupWindow, &popup); i++;
@@ -1244,7 +1244,7 @@ void XmxInstallColormapsWithOverlay (Widget toplevel, Widget glw)
windows[i] = XtWindow(glw); i++;
windows[i] = XtWindow(toplevel); i++;
XSetWMColormapWindows(XtDisplay(toplevel), XtWindow(toplevel), windows, i);
-
+
return;
}
@@ -1271,11 +1271,11 @@ XmxMakeDrawingVolume
("drawingvolume", glibWidgetClass, parent, Xmx_wargs, Xmx_n);
XtManageChild (Xmx_w);
- XtAddCallback (Xmx_w, XglNexposeCallback, redraw_cb,
+ XtAddCallback (Xmx_w, XglNexposeCallback, redraw_cb,
(XtPointer)_XmxMakeClientData (0));
- XtAddCallback (Xmx_w, XglNresizeCallback, resize_cb,
+ XtAddCallback (Xmx_w, XglNresizeCallback, resize_cb,
(XtPointer)_XmxMakeClientData (0));
- XtAddCallback (Xmx_w, XglNgconfigCallback, ginit_cb,
+ XtAddCallback (Xmx_w, XglNgconfigCallback, ginit_cb,
(XtPointer)_XmxMakeClientData (0));
Xmx_n = 0;
@@ -1363,7 +1363,7 @@ void XmxApplyPixmapToLabelWidget
/* ------------------------ DIALOG CONTROL BUTTONS ------------------------ */
/* args apply to form */
-Widget XmxMakeFormAndOneButton (Widget parent, XtCallbackProc cb,
+Widget XmxMakeFormAndOneButton (Widget parent, XtCallbackProc cb,
String name1, int cb_data1)
{
Widget _form, _button1;
@@ -1374,19 +1374,19 @@ Widget XmxMakeFormAndOneButton (Widget parent, XtCallbackProc cb,
_button1 = XmxMakePushButton (_form, name1, cb, cb_data1);
- XmxSetConstraints
+ XmxSetConstraints
(_button1, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
XmxSetPositions (_button1, XmxNoPosition, XmxNoPosition, 1, 2);
XmxSetOffsets (_button1, XmxNoOffset, XmxNoOffset, 8, 8);
-
+
Xmx_n = 0;
Xmx_w = _form;
return Xmx_w;
}
/* args apply to form */
-Widget XmxMakeFormAndTwoButtons
+Widget XmxMakeFormAndTwoButtons
(Widget parent, XtCallbackProc cb,
String name1, String name2,
int cb_data1, int cb_data2)
@@ -1400,17 +1400,17 @@ Widget XmxMakeFormAndTwoButtons
_button1 = XmxMakePushButton (_form, name1, cb, cb_data1);
_button2 = XmxMakePushButton (_form, name2, cb, cb_data2);
- XmxSetConstraints
+ XmxSetConstraints
(_button1, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button2, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
XmxSetPositions (_button1, XmxNoPosition, XmxNoPosition, 0, 1);
XmxSetPositions (_button2, XmxNoPosition, XmxNoPosition, 1, 2);
XmxSetOffsets (_button1, XmxNoOffset, XmxNoOffset, 8, 4);
XmxSetOffsets (_button2, XmxNoOffset, XmxNoOffset, 4, 8);
-
+
Xmx_n = 0;
Xmx_w = _form;
return Xmx_w;
@@ -1431,17 +1431,17 @@ Widget XmxMakeFormAndTwoButtonsSqueezed
_button1 = XmxMakePushButton (_form, name1, cb, cb_data1);
_button2 = XmxMakePushButton (_form, name2, cb, cb_data2);
- XmxSetConstraints
+ XmxSetConstraints
(_button1, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button2, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
XmxSetPositions (_button1, XmxNoPosition, XmxNoPosition, 1, 2);
XmxSetPositions (_button2, XmxNoPosition, XmxNoPosition, 3, 4);
XmxSetOffsets (_button1, XmxNoOffset, XmxNoOffset, 8, 4);
XmxSetOffsets (_button2, XmxNoOffset, XmxNoOffset, 4, 8);
-
+
Xmx_n = 0;
Xmx_w = _form;
return Xmx_w;
@@ -1463,13 +1463,13 @@ Widget XmxMakeFormAndThreeButtonsSqueezed
_button2 = XmxMakePushButton (_form, name2, cb, cb_data2);
_button3 = XmxMakePushButton (_form, name3, cb, cb_data3);
- XmxSetConstraints
+ XmxSetConstraints
(_button1, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button2, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button3, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
XmxSetPositions (_button1, XmxNoPosition, XmxNoPosition, 1, 2);
@@ -1478,7 +1478,7 @@ Widget XmxMakeFormAndThreeButtonsSqueezed
XmxSetOffsets (_button1, XmxNoOffset, XmxNoOffset, 8, 4);
XmxSetOffsets (_button2, XmxNoOffset, XmxNoOffset, 4, 4);
XmxSetOffsets (_button3, XmxNoOffset, XmxNoOffset, 4, 8);
-
+
Xmx_n = 0;
Xmx_w = _form;
return Xmx_w;
@@ -1500,13 +1500,13 @@ Widget XmxMakeFormAndThreeButtons
_button2 = XmxMakePushButton (_form, name2, cb, cb_data2);
_button3 = XmxMakePushButton (_form, name3, cb, cb_data3);
- XmxSetConstraints
+ XmxSetConstraints
(_button1, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button2, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button3, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
XmxSetPositions (_button1, XmxNoPosition, XmxNoPosition, 0, 1);
@@ -1515,14 +1515,14 @@ Widget XmxMakeFormAndThreeButtons
XmxSetOffsets (_button1, XmxNoOffset, XmxNoOffset, 8, 4);
XmxSetOffsets (_button2, XmxNoOffset, XmxNoOffset, 4, 4);
XmxSetOffsets (_button3, XmxNoOffset, XmxNoOffset, 4, 8);
-
+
Xmx_n = 0;
Xmx_w = _form;
return Xmx_w;
}
/* args apply to form */
-Widget XmxMakeFormAndFourButtons
+Widget XmxMakeFormAndFourButtons
(Widget parent, XtCallbackProc cb,
String name1, String name2, String name3, String name4,
int cb_data1, int cb_data2, int cb_data3, int cb_data4)
@@ -1538,16 +1538,16 @@ Widget XmxMakeFormAndFourButtons
_button3 = XmxMakePushButton (_form, name3, cb, cb_data3);
_button4 = XmxMakePushButton (_form, name4, cb, cb_data4);
- XmxSetConstraints
+ XmxSetConstraints
(_button1, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button2, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button3, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
- XmxSetConstraints
+ XmxSetConstraints
(_button4, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE,
NULL, NULL, NULL, NULL);
XmxSetPositions (_button1, XmxNoPosition, XmxNoPosition, 0, 1);
@@ -1558,14 +1558,14 @@ Widget XmxMakeFormAndFourButtons
XmxSetOffsets (_button2, XmxNoOffset, XmxNoOffset, 4, 4);
XmxSetOffsets (_button3, XmxNoOffset, XmxNoOffset, 4, 4);
XmxSetOffsets (_button4, XmxNoOffset, XmxNoOffset, 4, 8);
-
+
Xmx_n = 0;
Xmx_w = _form;
return Xmx_w;
}
/* args apply to form */
-Widget XmxMakeFormAndFiveButtons
+Widget XmxMakeFormAndFiveButtons
(Widget parent, XtCallbackProc cb,
String name1, String name2, String name3, String name4, String name5,
int cb_data1, int cb_data2, int cb_data3, int cb_data4, int cb_data5)
@@ -1607,7 +1607,7 @@ Widget XmxMakeFormAndFiveButtons
XmxSetOffsets (_button3, XmxNoOffset, XmxNoOffset, 4, 4);
XmxSetOffsets (_button4, XmxNoOffset, XmxNoOffset, 4, 4);
XmxSetOffsets (_button5, XmxNoOffset, XmxNoOffset, 4, 8);
-
+
Xmx_n = 0;
Xmx_w = _form;
return Xmx_w;
@@ -1621,7 +1621,7 @@ static void _XmxYesOrNoResponse (Widget w, int *answer, XmAnyCallbackStruct *cbs
*answer = 0;
}
-int XmxModalYesOrNo (Widget parent, XtAppContext app,
+int XmxModalYesOrNo (Widget parent, XtAppContext app,
char *questionstr, char *yesstr, char *nostr)
{
Widget dialog;
@@ -1634,7 +1634,7 @@ int XmxModalYesOrNo (Widget parent, XtAppContext app,
yes = XmStringCreateLtoR (yesstr, XmSTRING_DEFAULT_CHARSET);
no = XmStringCreateLtoR (nostr, XmSTRING_DEFAULT_CHARSET);
title = XmStringCreateLtoR ("Prompt", XmSTRING_DEFAULT_CHARSET);
-
+
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
XmxSetArg (XmNmessageString, (XtArgVal)question);
@@ -1644,11 +1644,11 @@ int XmxModalYesOrNo (Widget parent, XtAppContext app,
dialog = XmCreateQuestionDialog (parent, "question_dialog", Xmx_wargs, Xmx_n);
Xmx_n = 0;
-
+
XtUnmanageChild (XmMessageBoxGetChild (dialog, XmDIALOG_HELP_BUTTON));
- XtAddCallback (dialog, XmNokCallback,
+ XtAddCallback (dialog, XmNokCallback,
(XtCallbackProc)_XmxYesOrNoResponse, &answer);
- XtAddCallback (dialog, XmNcancelCallback,
+ XtAddCallback (dialog, XmNcancelCallback,
(XtCallbackProc)_XmxYesOrNoResponse, &answer);
XtManageChild (dialog);
@@ -1680,20 +1680,20 @@ int XmxModalYesOrNo (Widget parent, XtAppContext app,
#define XMX_NO_ANSWER "-*-no answer, dammit, but Xmx rules, yo yo yo-*-"
/*SWP -- 7/6/95*/
-static void _XmxActivate (Widget w, char **answer,
+static void _XmxActivate (Widget w, char **answer,
XmSelectionBoxCallbackStruct *cbs)
{
*answer = XMX_NO_ANSWER;
}
-static void _XmxPromptForStringResponse (Widget w, char **answer,
+static void _XmxPromptForStringResponse (Widget w, char **answer,
XmSelectionBoxCallbackStruct *cbs)
{
if (!XmStringGetLtoR (cbs->value, XmSTRING_DEFAULT_CHARSET, answer))
*answer = XMX_NO_ANSWER;
}
-static void _XmxPromptForStringCancel (Widget w, char **answer,
+static void _XmxPromptForStringCancel (Widget w, char **answer,
XmSelectionBoxCallbackStruct *cbs)
{
*answer = XMX_NO_ANSWER;
@@ -1701,7 +1701,7 @@ static void _XmxPromptForStringCancel (Widget w, char **answer,
/*SWP -- 7/4/95*/
-void XmxMakeInfoDialogWait (Widget parent, XtAppContext app,
+void XmxMakeInfoDialogWait (Widget parent, XtAppContext app,
char *infostr, char *titlestr, char *yesstr)
{
Widget dialog;
@@ -1711,7 +1711,7 @@ void XmxMakeInfoDialogWait (Widget parent, XtAppContext app,
info = XmStringCreateLtoR (infostr, XmSTRING_DEFAULT_CHARSET);
yes = XmStringCreateLtoR (yesstr, XmSTRING_DEFAULT_CHARSET);
title = XmStringCreateLtoR (titlestr, XmSTRING_DEFAULT_CHARSET);
-
+
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
XmxSetArg (XmNmessageString, (XtArgVal)info);
@@ -1724,7 +1724,7 @@ void XmxMakeInfoDialogWait (Widget parent, XtAppContext app,
XtUnmanageChild (XmMessageBoxGetChild (dialog, XmDIALOG_HELP_BUTTON));
XtUnmanageChild (XmMessageBoxGetChild (dialog, XmDIALOG_CANCEL_BUTTON));
- XtAddCallback (dialog, XmNokCallback,
+ XtAddCallback (dialog, XmNokCallback,
(XtCallbackProc)_XmxActivate, &answer);
XtManageChild (dialog);
@@ -1750,7 +1750,7 @@ void XmxMakeInfoDialogWait (Widget parent, XtAppContext app,
/*SWP -- 4/15/96*/
-void XmxMakeErrorDialogWait (Widget parent, XtAppContext app,
+void XmxMakeErrorDialogWait (Widget parent, XtAppContext app,
char *infostr, char *titlestr, char *yesstr)
{
Widget dialog;
@@ -1760,7 +1760,7 @@ void XmxMakeErrorDialogWait (Widget parent, XtAppContext app,
info = XmStringCreateLtoR (infostr, XmSTRING_DEFAULT_CHARSET);
yes = XmStringCreateLtoR (yesstr, XmSTRING_DEFAULT_CHARSET);
title = XmStringCreateLtoR (titlestr, XmSTRING_DEFAULT_CHARSET);
-
+
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
XmxSetArg (XmNmessageString, (XtArgVal)info);
@@ -1773,7 +1773,7 @@ void XmxMakeErrorDialogWait (Widget parent, XtAppContext app,
XtUnmanageChild (XmMessageBoxGetChild (dialog, XmDIALOG_HELP_BUTTON));
XtUnmanageChild (XmMessageBoxGetChild (dialog, XmDIALOG_CANCEL_BUTTON));
- XtAddCallback (dialog, XmNokCallback,
+ XtAddCallback (dialog, XmNokCallback,
(XtCallbackProc)_XmxActivate, &answer);
XtManageChild (dialog);
@@ -1798,7 +1798,7 @@ void XmxMakeErrorDialogWait (Widget parent, XtAppContext app,
}
-char *XmxModalPromptForString (Widget parent, XtAppContext app,
+char *XmxModalPromptForString (Widget parent, XtAppContext app,
char *questionstr, char *yesstr, char *nostr)
{
Widget dialog;
@@ -1811,7 +1811,7 @@ char *XmxModalPromptForString (Widget parent, XtAppContext app,
yes = XmStringCreateLtoR (yesstr, XmSTRING_DEFAULT_CHARSET);
no = XmStringCreateLtoR (nostr, XmSTRING_DEFAULT_CHARSET);
title = XmStringCreateLtoR ("Prompt", XmSTRING_DEFAULT_CHARSET);
-
+
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
XmxSetArg (XmNselectionLabelString, (XtArgVal)question);
@@ -1819,11 +1819,11 @@ char *XmxModalPromptForString (Widget parent, XtAppContext app,
XmxSetArg (XmNcancelLabelString, (XtArgVal)no);
dialog = XmCreatePromptDialog (parent, "question_dialog", Xmx_wargs, Xmx_n);
Xmx_n = 0;
-
+
XtUnmanageChild (XmSelectionBoxGetChild (dialog, XmDIALOG_HELP_BUTTON));
- XtAddCallback (dialog, XmNokCallback,
+ XtAddCallback (dialog, XmNokCallback,
(XtCallbackProc)_XmxPromptForStringResponse, &answer);
- XtAddCallback (dialog, XmNcancelCallback,
+ XtAddCallback (dialog, XmNcancelCallback,
(XtCallbackProc)_XmxPromptForStringCancel, &answer);
XtManageChild (dialog);
@@ -1860,38 +1860,38 @@ char *XmxModalPromptForString (Widget parent, XtAppContext app,
static char *_passwd = NULL;
-static void _XmxPromptForPasswordResponse (Widget w, char **answer,
+static void _XmxPromptForPasswordResponse (Widget w, char **answer,
XmSelectionBoxCallbackStruct *cbs)
{
if (!XmStringGetLtoR (cbs->value, XmSTRING_DEFAULT_CHARSET, answer))
*answer = XMX_NO_ANSWER;
}
-static void _XmxPromptForPasswordCancel (Widget w, char **answer,
+static void _XmxPromptForPasswordCancel (Widget w, char **answer,
XmSelectionBoxCallbackStruct *cbs)
{
*answer = XMX_NO_ANSWER;
}
-static void _XmxPromptForPasswordVerify (Widget text_w, XtPointer unused,
+static void _XmxPromptForPasswordVerify (Widget text_w, XtPointer unused,
XmTextVerifyCallbackStruct *cbs)
{
char *new;
int len;
-
- if (cbs->reason != XmCR_MODIFYING_TEXT_VALUE)
+
+ if (cbs->reason != XmCR_MODIFYING_TEXT_VALUE)
{
return;
}
- if (cbs->text->ptr == NULL)
+ if (cbs->text->ptr == NULL)
{ /* backspace */
cbs->doit = True;
if (_passwd && *_passwd)
{
int start;
char *tptr;
-
+
len = strlen(_passwd);
/* Find the start of the delete */
if (cbs->startPos < len)
@@ -1915,7 +1915,7 @@ static void _XmxPromptForPasswordVerify (Widget text_w, XtPointer unused,
strcat(_passwd, tptr);
}
}
- else if (cbs->text->length >= 1)
+ else if (cbs->text->length >= 1)
{
int i;
@@ -1962,7 +1962,7 @@ static void _XmxPromptForPasswordVerify (Widget text_w, XtPointer unused,
}
}
-char *XmxModalPromptForPassword (Widget parent, XtAppContext app,
+char *XmxModalPromptForPassword (Widget parent, XtAppContext app,
char *questionstr, char *yesstr, char *nostr)
{
Widget dialog;
@@ -1977,7 +1977,7 @@ char *XmxModalPromptForPassword (Widget parent, XtAppContext app,
yes = XmStringCreateLtoR (yesstr, XmSTRING_DEFAULT_CHARSET);
no = XmStringCreateLtoR (nostr, XmSTRING_DEFAULT_CHARSET);
title = XmStringCreateLtoR ("Prompt", XmSTRING_DEFAULT_CHARSET);
-
+
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
XmxSetArg (XmNselectionLabelString, (XtArgVal)question);
@@ -1985,14 +1985,14 @@ char *XmxModalPromptForPassword (Widget parent, XtAppContext app,
XmxSetArg (XmNcancelLabelString, (XtArgVal)no);
dialog = XmCreatePromptDialog (parent, "question_dialog", Xmx_wargs, Xmx_n);
Xmx_n = 0;
-
+
XtUnmanageChild (XmSelectionBoxGetChild (dialog, XmDIALOG_HELP_BUTTON));
XtAddCallback
(XmSelectionBoxGetChild (dialog, XmDIALOG_TEXT),
XmNmodifyVerifyCallback, (XtCallbackProc)_XmxPromptForPasswordVerify, 0);
- XtAddCallback (dialog, XmNokCallback,
+ XtAddCallback (dialog, XmNokCallback,
(XtCallbackProc)_XmxPromptForPasswordResponse, &answer);
- XtAddCallback (dialog, XmNcancelCallback,
+ XtAddCallback (dialog, XmNcancelCallback,
(XtCallbackProc)_XmxPromptForPasswordCancel, &answer);
XtManageChild (dialog);
diff --git a/libXmx/Xmx.h b/libXmx/Xmx.h
index 5b3b7ff..e537baf 100644
--- a/libXmx/Xmx.h
+++ b/libXmx/Xmx.h
@@ -248,14 +248,14 @@ extern Widget XmxMakeRadioBox (Widget);
extern Widget XmxMakeOptionBox (Widget);
extern Widget XmxMakeToggleButton (Widget, String, XtCallbackProc, int);
extern void XmxSetToggleButton (Widget button, int set_state);
-extern Widget XmxMakeScale (Widget, XtCallbackProc, int, String,
+extern Widget XmxMakeScale (Widget, XtCallbackProc, int, String,
int, int, int, int);
extern void XmxAdjustScale (Widget, int);
extern Widget XmxMakeFrame (Widget, int);
extern Widget XmxMakeForm (Widget);
extern void XmxSetPositions (Widget, int, int, int, int);
extern void XmxSetOffsets (Widget, int, int, int, int);
-extern void XmxSetConstraints (Widget, int, int, int, int, Widget, Widget,
+extern void XmxSetConstraints (Widget, int, int, int, int, Widget, Widget,
Widget, Widget);
extern Widget XmxMakeVerticalRowColumn (Widget);
extern Widget XmxMakeHorizontalRowColumn (Widget);
@@ -272,13 +272,13 @@ extern Widget XmxMakeNamedLabel (Widget, String, String);
extern Widget XmxMakeBlankLabel (Widget);
extern Widget XmxMakeErrorDialog (Widget, String, String);
extern Widget XmxMakeInfoDialog (Widget, String, String);
-extern Widget XmxMakeQuestionDialog (Widget, String, String, XtCallbackProc,
+extern Widget XmxMakeQuestionDialog (Widget, String, String, XtCallbackProc,
int, int);
extern XmString XmxMakeXmstrFromFile (String);
extern XmString XmxMakeXmstrFromString (String);
extern Widget XmxMakeBboardDialog (Widget, String);
extern Widget XmxMakeFormDialog (Widget, String);
-extern Widget XmxMakeFileSBDialog (Widget, String, String, XtCallbackProc,
+extern Widget XmxMakeFileSBDialog (Widget, String, String, XtCallbackProc,
int);
extern Widget XmxMakeHelpDialog (Widget, XmString, String);
extern Widget XmxMakeHelpTextDialog (Widget, String, String, Widget *);
@@ -298,7 +298,7 @@ extern void XmxAddCallbackToText (Widget, XtCallbackProc, int);
#if 0
#ifdef __sgi
-extern Widget XmxMakeDrawingVolume
+extern Widget XmxMakeDrawingVolume
(Widget, int, int, GLXconfig *, XtCallbackProc, XtCallbackProc,
XtCallbackProc);
extern void XmxInstallColormaps (Widget, Widget);
@@ -307,7 +307,7 @@ extern void XmxWinset (Widget);
#endif
#ifdef _IBMR2
-extern Widget XmxMakeDrawingVolume
+extern Widget XmxMakeDrawingVolume
(Widget, int, int, XtCallbackProc, XtCallbackProc,
XtCallbackProc);
extern void XmxInstallColormaps (Widget, Widget);
@@ -316,22 +316,22 @@ extern void XmxWinset (Widget);
#endif /* if 0 */
-extern void XmxApplyBitmapToLabelWidget (Widget, String, unsigned int,
+extern void XmxApplyBitmapToLabelWidget (Widget, String, unsigned int,
unsigned int);
extern Pixmap XmxCreatePixmapFromBitmap (Widget, String, unsigned int,
unsigned int);
extern void XmxApplyPixmapToLabelWidget (Widget, Pixmap);
extern Widget XmxMakeFormAndOneButton (Widget, XtCallbackProc, String, int);
-extern Widget XmxMakeFormAndTwoButtons (Widget, XtCallbackProc, String,
+extern Widget XmxMakeFormAndTwoButtons (Widget, XtCallbackProc, String,
String, int, int);
-extern Widget XmxMakeFormAndTwoButtonsSqueezed (Widget, XtCallbackProc, String,
+extern Widget XmxMakeFormAndTwoButtonsSqueezed (Widget, XtCallbackProc, String,
String, int, int);
-extern Widget XmxMakeFormAndThreeButtons (Widget, XtCallbackProc, String,
+extern Widget XmxMakeFormAndThreeButtons (Widget, XtCallbackProc, String,
String, String, int, int, int);
-extern Widget XmxMakeFormAndThreeButtonsSqueezed (Widget, XtCallbackProc, String,
+extern Widget XmxMakeFormAndThreeButtonsSqueezed (Widget, XtCallbackProc, String,
String, String, int, int, int);
-extern Widget XmxMakeFormAndFourButtons (Widget, XtCallbackProc, String,
+extern Widget XmxMakeFormAndFourButtons (Widget, XtCallbackProc, String,
String, String, String, int, int, int, int);
extern Widget XmxMakeFormAndFiveButtons (Widget, XtCallbackProc, String,
String, String, String, String,
@@ -340,11 +340,11 @@ extern Widget XmxMakeFormAndFiveButtons (Widget, XtCallbackProc, String,
extern int XmxModalYesOrNo (Widget parent, XtAppContext app,
char *questionstr, char *yesstr,
char *nostr);
-extern char *XmxModalPromptForString (Widget parent, XtAppContext app,
- char *questionstr, char *yesstr,
+extern char *XmxModalPromptForString (Widget parent, XtAppContext app,
+ char *questionstr, char *yesstr,
char *nostr);
-extern char *XmxModalPromptForPassword (Widget parent, XtAppContext app,
- char *questionstr, char *yesstr,
+extern char *XmxModalPromptForPassword (Widget parent, XtAppContext app,
+ char *questionstr, char *yesstr,
char *nostr);
/* Xmx2.c */
@@ -355,9 +355,9 @@ extern void XmxRSetOptionMenuHistory (XmxMenuRecord *, int);
extern void XmxRSetValues (XmxMenuRecord *, int);
extern Widget XmxRGetWidget (XmxMenuRecord *, int);
-extern XmxMenuRecord *XmxRMakeOptionMenu (Widget, String, XtCallbackProc,
+extern XmxMenuRecord *XmxRMakeOptionMenu (Widget, String, XtCallbackProc,
XmxOptionMenuStruct *);
-extern XmxMenuRecord *XmxRMakeToggleMenu (Widget, int, XtCallbackProc,
+extern XmxMenuRecord *XmxRMakeToggleMenu (Widget, int, XtCallbackProc,
XmxToggleMenuStruct *);
extern XmxMenuRecord *XmxRMakeMenubar (Widget, XmxMenubarStruct *);
diff --git a/libXmx/Xmx2.c b/libXmx/Xmx2.c
index 0f8115d..bc90127 100644
--- a/libXmx/Xmx2.c
+++ b/libXmx/Xmx2.c
@@ -61,7 +61,7 @@
/* ----------------------- _XmxMenuAddEntryToRecord ----------------------- */
/* Create a new MenuEntry and add it to the head of a MenuRecord list. */
-private void
+private void
_XmxMenuAddEntryToRecord (XmxMenuRecord *rec, Widget w, int token)
{
XmxMenuEntry *_ent;
@@ -138,7 +138,7 @@ XmxRSetSensitive (XmxMenuRecord *rec, int token, int state)
/* XtSetSensitive propagates down Widget hierarchy. */
if (_entry)
XtSetSensitive (_entry->w, (state == XmxSensitive) ? True : False);
-
+
return;
}
@@ -153,9 +153,9 @@ XmxRSetToggleState (XmxMenuRecord *rec, int token, int state)
assert (state == XmxSet || state == XmxUnset);
_entry = _XmxMenuGetEntryFromRecord (rec, XmxExtractToken (token));
if (_entry)
- XmToggleButtonGadgetSetState
+ XmToggleButtonGadgetSetState
(_entry->w, (state == XmxSet) ? True : False, False);
-
+
return;
}
@@ -344,8 +344,8 @@ XmxRMakeToggleMenu (Widget parent, int behavior, XtCallbackProc cb,
/* Possible deficiency: will not be able to grey out a submenu
(cascade button). */
-private void
-_XmxRCreateMenubar (Widget menu, XmxMenubarStruct *menulist,
+private void
+_XmxRCreateMenubar (Widget menu, XmxMenubarStruct *menulist,
XmxMenuRecord *rec)
{
int _i;
@@ -396,16 +396,16 @@ _XmxRCreateMenubar (Widget menu, XmxMenubarStruct *menulist,
XtAddCallback
(_buttons[_i - _separators], XmNvalueChangedCallback,
- menulist[_i].func,
+ menulist[_i].func,
(XtPointer)_XmxMakeClientData (menulist[_i].data));
/* Add thie button to the menu record. */
- _XmxMenuAddEntryToRecord
+ _XmxMenuAddEntryToRecord
(rec, _buttons[_i - _separators], menulist[_i].data);
}
else /* regular button */
{
- XmString xmstr =
+ XmString xmstr =
XmStringCreateLtoR
(menulist[_i].namestr, XmSTRING_DEFAULT_CHARSET);
XmxSetArg (XmNlabelString, (XtArgVal)xmstr);
@@ -413,13 +413,13 @@ _XmxRCreateMenubar (Widget menu, XmxMenubarStruct *menulist,
("pushbutton", xmPushButtonGadgetClass,
menu, Xmx_wargs, Xmx_n);
XmStringFree (xmstr);
- XtAddCallback
+ XtAddCallback
(_buttons[_i - _separators], XmNactivateCallback,
- menulist[_i].func,
+ menulist[_i].func,
(XtPointer)_XmxMakeClientData (menulist[_i].data));
/* Add thie button to the menu record. */
- _XmxMenuAddEntryToRecord
+ _XmxMenuAddEntryToRecord
(rec, _buttons[_i - _separators], menulist[_i].data);
}
}
diff --git a/libdtm/Makefile b/libdtm/Makefile
index 6a84169..4baa632 100644
--- a/libdtm/Makefile
+++ b/libdtm/Makefile
@@ -49,23 +49,23 @@ dtm_ ::
@echo Either set up the ARCH environment or specify a machine type
@echo " ex: make sun"
-solaris :
+solaris :
make internal "CC=$(CC)" "CFLAGS = -DSUN -DSOLARIS" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = /bin/true libdtm.a"
-solarisx86 :
+solarisx86 :
make internal "CC=$(CC)" "CFLAGS = -DSUN -DSOLARIS" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = /bin/true libdtm.a"
-alpha :
+alpha :
make internal "CFLAGS = -DOSF1 -target $(TARGET_ARCH:-%=%)" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
- "RANLIB_CMD = ranlib libdtm.a"
+ "RANLIB_CMD = ranlib libdtm.a"
linux :
make internal "CFLAGS = -DLINUX" \
@@ -74,7 +74,7 @@ linux :
"RANLIB_CMD = ranlib libdtm.a"
sun4 : sun
-sun :
+sun :
make internal "CFLAGS = -DSUN -target $(TARGET_ARCH:-%=%)" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
@@ -84,7 +84,7 @@ sun :
"OBJECTS = $(OBJ_SPEC) convert$(ARCH).o mdd$(ARCH).o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = ranlib libdtm$(ARCH).a"
-next :
+next :
make internal "CFLAGS = -DNEXT " \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
@@ -105,19 +105,19 @@ indy: $(OBJ) convert.o
"ARCHIVE = ar rv" \
"RANLIB_CMD = "
-cray :
+cray :
make internal "CFLAGS = -DCRAY" "CFT = cft77" \
"OBJECTS = $(OBJ) craycvt.o crayrtns.o" \
"ARCHIVE = bld q" \
"RANLIB_CMD = "
make libdtmf77.a "CFLAGS = -DCRAY" "CFT = cft77" \
"OBJECTS = $(OBJ) craycvt.o crayrtns.o sdsF.o" \
- "ARCHIVE = bld q"
-convex :
+ "ARCHIVE = bld q"
+convex :
make internal "CFLAGS = -DCONVEX -fi" \
"OBJECTS = $(OBJ) mdd.o convert.o" "ARCHIVE = ar rv" \
"RANLIB_CMD = ranlib libdtm.a"
-ibm :
+ibm :
make internal "CFLAGS = -DRS6000" "OBJECTS = $(OBJ) mdd.o convert.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = ranlib libdtm.a"
@@ -125,11 +125,11 @@ hp :
make internal "CFLAGS = -Aa -D_HPUX_SOURCE" "OBJECTS = $(OBJ) mdd.o convert.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = "
-dec :
+dec :
make internal "CFLAGS = -DDEC" "OBJECTS = $(OBJ) mdd.o deccvt.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = ar ts libdtm.a"
-vax :
+vax :
make internal "CFLAGS = -DVAX" "OBJECTS = $(OBJ) mdd.o vaxcvt.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = "
@@ -160,12 +160,12 @@ clean::
install::
-mv $(DIR)/lib/libdtm.a $(DIR)/lib/libdtm.bak
- cp *.a $(DIR)/lib
+ cp *.a $(DIR)/lib
-ranlib $(DIR)/lib/libdtm.a
-rm -f $(DIR)/include/dtm.h $(DIR)/include/sds.h
-rm -f $(DIR)/include/ris.h $(DIR)/include/db.h
-rm -f $(DIR)/include/mdd.h $(DIR)/include/sdl.h
-rm -f $(DIR)/include/debug.h $(DIR)/include/arch.h
- cp dtm.h debug.h sds.h ris.h db.h mdd.h sdl.h arch.h $(DIR)/include
+ cp dtm.h debug.h sds.h ris.h db.h mdd.h sdl.h arch.h $(DIR)/include
-include $(DEPENDS)
+include $(DEPENDS)
diff --git a/libdtm/Makefile.orig b/libdtm/Makefile.orig
index 6a84169..4baa632 100644
--- a/libdtm/Makefile.orig
+++ b/libdtm/Makefile.orig
@@ -49,23 +49,23 @@ dtm_ ::
@echo Either set up the ARCH environment or specify a machine type
@echo " ex: make sun"
-solaris :
+solaris :
make internal "CC=$(CC)" "CFLAGS = -DSUN -DSOLARIS" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = /bin/true libdtm.a"
-solarisx86 :
+solarisx86 :
make internal "CC=$(CC)" "CFLAGS = -DSUN -DSOLARIS" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = /bin/true libdtm.a"
-alpha :
+alpha :
make internal "CFLAGS = -DOSF1 -target $(TARGET_ARCH:-%=%)" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
- "RANLIB_CMD = ranlib libdtm.a"
+ "RANLIB_CMD = ranlib libdtm.a"
linux :
make internal "CFLAGS = -DLINUX" \
@@ -74,7 +74,7 @@ linux :
"RANLIB_CMD = ranlib libdtm.a"
sun4 : sun
-sun :
+sun :
make internal "CFLAGS = -DSUN -target $(TARGET_ARCH:-%=%)" \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
@@ -84,7 +84,7 @@ sun :
"OBJECTS = $(OBJ_SPEC) convert$(ARCH).o mdd$(ARCH).o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = ranlib libdtm$(ARCH).a"
-next :
+next :
make internal "CFLAGS = -DNEXT " \
"OBJECTS = $(OBJ) convert.o mdd.o" \
"ARCHIVE = ar rv" \
@@ -105,19 +105,19 @@ indy: $(OBJ) convert.o
"ARCHIVE = ar rv" \
"RANLIB_CMD = "
-cray :
+cray :
make internal "CFLAGS = -DCRAY" "CFT = cft77" \
"OBJECTS = $(OBJ) craycvt.o crayrtns.o" \
"ARCHIVE = bld q" \
"RANLIB_CMD = "
make libdtmf77.a "CFLAGS = -DCRAY" "CFT = cft77" \
"OBJECTS = $(OBJ) craycvt.o crayrtns.o sdsF.o" \
- "ARCHIVE = bld q"
-convex :
+ "ARCHIVE = bld q"
+convex :
make internal "CFLAGS = -DCONVEX -fi" \
"OBJECTS = $(OBJ) mdd.o convert.o" "ARCHIVE = ar rv" \
"RANLIB_CMD = ranlib libdtm.a"
-ibm :
+ibm :
make internal "CFLAGS = -DRS6000" "OBJECTS = $(OBJ) mdd.o convert.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = ranlib libdtm.a"
@@ -125,11 +125,11 @@ hp :
make internal "CFLAGS = -Aa -D_HPUX_SOURCE" "OBJECTS = $(OBJ) mdd.o convert.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = "
-dec :
+dec :
make internal "CFLAGS = -DDEC" "OBJECTS = $(OBJ) mdd.o deccvt.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = ar ts libdtm.a"
-vax :
+vax :
make internal "CFLAGS = -DVAX" "OBJECTS = $(OBJ) mdd.o vaxcvt.o" \
"ARCHIVE = ar rv" \
"RANLIB_CMD = "
@@ -160,12 +160,12 @@ clean::
install::
-mv $(DIR)/lib/libdtm.a $(DIR)/lib/libdtm.bak
- cp *.a $(DIR)/lib
+ cp *.a $(DIR)/lib
-ranlib $(DIR)/lib/libdtm.a
-rm -f $(DIR)/include/dtm.h $(DIR)/include/sds.h
-rm -f $(DIR)/include/ris.h $(DIR)/include/db.h
-rm -f $(DIR)/include/mdd.h $(DIR)/include/sdl.h
-rm -f $(DIR)/include/debug.h $(DIR)/include/arch.h
- cp dtm.h debug.h sds.h ris.h db.h mdd.h sdl.h arch.h $(DIR)/include
+ cp dtm.h debug.h sds.h ris.h db.h mdd.h sdl.h arch.h $(DIR)/include
-include $(DEPENDS)
+include $(DEPENDS)
diff --git a/libdtm/arch.h b/libdtm/arch.h
index ee1d0f0..87439c0 100644
--- a/libdtm/arch.h
+++ b/libdtm/arch.h
@@ -21,7 +21,7 @@
/*********************************************************************
**
-** $Header: /X11/mosaic/cvsroot/xmosaic3/libdtm/arch.h,v 1.5 1996/06/06 19:47:12 spowers Exp $
+** $Header: /X11/mosaic/cvsroot/xmosaic3/libdtm/arch.h,v 1.5 1996/06/06 19:47:12 spowers Exp $
**
**********************************************************************/
@@ -46,7 +46,7 @@
*
* Revision 1.7 92/04/30 20:27:05 jplevyak
* Changed Version to 2.3
- *
+ *
* Revision 1.6 1992/04/14 22:59:57 jefft
* included sys/limits.h instead of sys/limit.h
*
@@ -56,7 +56,7 @@
* Revision 1.4 92/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
- *
+ *
* Revision 1.3 1992/03/10 16:52:43 jefft
* modified convex define to __convex__
*
@@ -70,8 +70,8 @@
/*
The intent of this file is to provide a standard set of
- architecturally descriptive preprocessor definitions by
- examining the preprocessor identifiers that are defined
+ architecturally descriptive preprocessor definitions by
+ examining the preprocessor identifiers that are defined
in the native compiler running in the default mode.
Please feel free to add to or correct this file.
@@ -87,21 +87,21 @@
SUN - generally any machine by Sun Microsystems
SGI - Silicon Graphics
CRAY - Cray Research
- CONVEX - Convex
+ CONVEX - Convex
CM - Connection Machine
- IBM
- APPLE
- HP
+ IBM
+ APPLE
+ HP
DEC
COMMODORE
- General OS
- DOS
+ General OS
+ DOS
UNIX
MACOS
- AMIGA
- VMS
+ AMIGA
+ VMS
OS2
- General Processor
+ General Processor
SPARC
MIPS
68000
@@ -110,8 +110,8 @@
80386
VAX
PA - HP Percision Architecture
- RS6000
- Specific Interesting Qualities
+ RS6000
+ Specific Interesting Qualities
BIG_ENDIAN
LITTLE_ENDIAN
WORD_SIZE - values include 16, 32, 64 (bits)
@@ -121,12 +121,12 @@
( possible interesting definitions )
mc68k unix unixpc (hp 68k ?)
- mc68000
+ mc68000
_I386 i386 AIX _AIX (PS2 running AIX)
alliant (68000 unix)
- vax mc68k32 PORTAR (altos? 30068)
+ vax mc68k32 PORTAR (altos? 30068)
apollo aegis unix (??) (apollo)
- i80386 (compac?) BSD
+ i80386 (compac?) BSD
convex unix (32 bit)
__convex_c1__
__convex_c2__
@@ -196,7 +196,7 @@
# else
/* assume */
# define _ARCH_BIG_ENDIAN
-# define _ARCH_68000
+# define _ARCH_68000
# endif
#elif defined( NEXT )
# define _ARCH_NEXT
@@ -209,7 +209,7 @@
# define _ARCH_CRAY
# define _ARCH_UNIX
# define _ARCH_SYSV /* A rough approximation */
-# define _ARCH_BIG_ENDIAN /* ?? */
+# define _ARCH_BIG_ENDIAN /* ?? */
# define _ARCH_WORD_SIZE 64
#elif defined(vax)
# define _ARCH_DEC
@@ -230,7 +230,7 @@
#define _ARCH_WORD_SIZE 32
#define _ARCH_LITTLE_ENDIAN
#define _ARCH_PROTO
-#elif defined( _IBMR2 )
+#elif defined( _IBMR2 )
#define _ARCH_IBM
#define _ARCH_RS6000
#elif defined( AMIGA )
@@ -238,7 +238,7 @@
# define _ARCH_COMMODORE
# define _ARCH_AMIGA
# define _ARCH_BIG_ENDIAN
-# define _ARCH_68000
+# define _ARCH_68000
# define _ARCH_WORD_SIZE 32
#elif defined ( MS_DOS ) || defined(__TURBOC__)
# define _ARCH_MSDOS
@@ -256,14 +256,14 @@
#elif defined ( THINK_C ) || defined( applec )
# define _ARCH_APPLE
# define _ARCH_MACOS
-# define _ARCH_68000
+# define _ARCH_68000
# define _ARCH_BIG_ENDIAN
# define _ARCH_WORD_SIZE 32
# define _ARCH_PROTO
#elif defined( alliant )
/* ?? */
# define _ARCH_UNIX
-# define _ARCH_68000
+# define _ARCH_68000
# define _ARCH_BIG_ENDIAN
# define _ARCH_WORD_SIZE 32
#elif defined( __convex__ ) || defined( __convex_c1__ ) || defined( __convex_c2__ )
@@ -278,13 +278,13 @@
*/
#if !defined( _ARCH_UNIX ) && !defined( _ARCH_MSDOS ) && !defined( _ARCH_VMS ) \
&& !defined( _ARCH_MACOS ) && !defined( _ARCH_AMIGA ) && !defined( _ARCH_OS2)
-# if defined( unix )
+# if defined( unix )
# define _ARCH_UNIX
# endif
#endif
#if !defined( _ARCH_BSD ) && !defined( _ARCH_SYSV ) && defined( _ARCH_UNIX )
-# if defined( USG )
+# if defined( USG )
# define _ARCH_SYSV
# endif
#endif
@@ -294,7 +294,7 @@
|| defined( mc68020 ) || defined( mc68010 )
# define _ARCH_68000
# if !defined( _ARCH_BIG_ENDIAN )
-# define _ARCH_BIG_ENDIAN
+# define _ARCH_BIG_ENDIAN
# endif
# endif
#endif
diff --git a/libdtm/callback.c b/libdtm/callback.c
index 2d20574..474505a 100644
--- a/libdtm/callback.c
+++ b/libdtm/callback.c
@@ -51,7 +51,7 @@ static void DTMsigioHandler( sig, code, scp, addr )
char *addr;
#endif
{
- /*
+ /*
Unfortunately, not one of the parameters listed above
provides even the slightest help in determinine WHICH
port is now ready for input, and any system calls
@@ -68,7 +68,7 @@ static void DTMsigioHandler( sig, code, scp, addr )
if ( !DTMpt[i]->callback ) continue;
port = i;
dtm_map_port_external(&port);
-#if 0
+#if 0
if ((ready = DTMavailRead( port ))== DTMERROR) continue;
if ( ready == DTM_PORT_READY ) {
DBGMSG( "DTMsigioHandler calling user routine\n" );
@@ -99,7 +99,7 @@ int dtm_sigio( fd )
#endif
DTMerrno = DTMSOCK;
return DTMERROR;
- }
+ }
#ifdef __hpux
if (flags = ioctl( fd, FIOSSAIOSTAT, &sigio_on ) == -1 ) {
#else
@@ -107,7 +107,7 @@ int dtm_sigio( fd )
#endif
DTMerrno = DTMSOCK;
return DTMERROR;
- }
+ }
return DTM_OK;
}
@@ -117,7 +117,7 @@ int DTMreadReady( int port, void (*pfn)() )
int DTMreadReady( port, pfn )
int32 port;
void (*pfn)();
-#endif
+#endif
{
DTMPORT * pp;
@@ -136,14 +136,14 @@ int DTMreadReady( port, pfn )
if ( pp->porttype != INPORTTYPE ) {
DTMerrno = DTMBADPORT;
return DTMERROR;
- }
+ }
DBGMSG1( "DTMreadReady port has sockfd %d\n", pp->sockfd );
#ifndef _ARCH_MSDOS
if ( (int)signal( SIGIO, DTMsigioHandler) == -1 ) {
DBGMSG( "DTMreadReady signal failed\n" );
DTMerrno = DTMSOCK;
return DTMERROR;
- }
+ }
#endif
pp->callback = pfn;
{
@@ -151,12 +151,12 @@ int DTMreadReady( port, pfn )
if( dtm_sigio( pp->sockfd )== DTMERROR) {
DTMerrno = DTMSOCK;
return DTMERROR;
- }
+ }
FOR_EACH_IN_PORT( inp, pp ) {
if (dtm_sigio( inp->fd )== DTMERROR) {
DTMerrno = DTMSOCK;
return DTMERROR;
- }
+ }
}
}
return DTM_OK;
diff --git a/libdtm/convert.c b/libdtm/convert.c
index d59cb06..a4ba7ff 100644
--- a/libdtm/convert.c
+++ b/libdtm/convert.c
@@ -48,7 +48,7 @@
*
* Revision 1.3 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.2 1991/06/11 15:21:13 sreedhar
* disclaimer added
*
diff --git a/libdtm/craycvt.c b/libdtm/craycvt.c
index ccecf0e..15cc9d2 100644
--- a/libdtm/craycvt.c
+++ b/libdtm/craycvt.c
@@ -45,7 +45,7 @@
*
* Revision 1.4 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.3 1991/06/11 15:21:41 sreedhar
* disclaimer added
*
@@ -55,7 +55,7 @@
*
* Revision 1.1 90/11/08 16:29:13 jefft
* Initial revision
- *
+ *
#endif
diff --git a/libdtm/crayinit.f b/libdtm/crayinit.f
index e971025..1aa89e2 100644
--- a/libdtm/crayinit.f
+++ b/libdtm/crayinit.f
@@ -38,7 +38,7 @@ c Plugging DTM in...
c
c Revision 1.3 91/06/13 21:23:57 jefft
c added type of function to prevent returning of a float
-c
+c
c Revision 1.2 1991/06/11 15:21:54 sreedhar
c disclaimer added
c
diff --git a/libdtm/crayrtns.f b/libdtm/crayrtns.f
index fbc7bb4..feb4c15 100644
--- a/libdtm/crayrtns.f
+++ b/libdtm/crayrtns.f
@@ -38,7 +38,7 @@ c Plugging DTM in...
c
c Revision 1.4 91/06/11 15:21:47 sreedhar
c disclaimer added
-c
+c
c Revision 1.3 1991/05/16 04:40:13 jefft
c Fixed bugs in TRIPLET conversion
c
@@ -47,7 +47,7 @@ c Fixed bug in Cray floating point conversion routines.
c
c Revision 1.1 90/11/08 16:30:17 jefft
c Initial revision
-c
+c
diff --git a/libdtm/debug.h b/libdtm/debug.h
index d28b7b7..a5ae875 100644
--- a/libdtm/debug.h
+++ b/libdtm/debug.h
@@ -40,7 +40,7 @@
*
* Revision 1.8 92/04/30 20:27:05 jplevyak
* Changed Version to 2.3
- *
+ *
* Revision 1.7 1991/11/15 19:42:34 jplevyak
* Removed dependancy on dtmint.h
*
@@ -52,10 +52,10 @@
*
* Revision 1.4 91/09/26 20:13:12 jplevyak
* Changed to allow setting of debug flags at run time.
- *
+ *
* Revision 1.3 91/08/15 19:10:25 sreedhar
* Changes for logical portname version
- *
+ *
* Revision 1.2 1991/06/11 15:22:30 sreedhar
* disclaimer added
*
@@ -65,7 +65,7 @@
*/
#ifndef DEBUG_INC
-#define DEBUG_INC
+#define DEBUG_INC
#define DBGFLOW(s) if (uDTMdbg & DTM_DBG_MSG) fprintf(stderr, s)
diff --git a/libdtm/deccvt.c b/libdtm/deccvt.c
index 9ca7ed4..2524c64 100644
--- a/libdtm/deccvt.c
+++ b/libdtm/deccvt.c
@@ -45,7 +45,7 @@
*
* Revision 1.4 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.3 1992/04/03 18:25:50 jplevyak
* Fixed indice computation problem.
*
@@ -61,7 +61,7 @@
*
* Revision 1.1 90/11/08 16:40:06 jefft
* Initial revision
- *
+ *
#endif
@@ -92,14 +92,14 @@ static int dtm_short(mode, buf, size)
{
int nShorts, i;
DBGFLOW("# dtm_short called.\n");
-
+
nShorts = (mode == DTMLOCAL) ? (size / 2) : size;
if (buf)
for ( i = 0; i < nShorts ; i++ ) {
swap(*buf, *(buf+1));
- buf += 2;
+ buf += 2;
}
-
+
return ((mode == DTMLOCAL) ? (size / 2) : (size * 2));
}
diff --git a/libdtm/dtm.c b/libdtm/dtm.c
index a77f38d..90634de 100644
--- a/libdtm/dtm.c
+++ b/libdtm/dtm.c
@@ -64,7 +64,7 @@
*
* Revision 1.46 92/05/05 22:27:50 jplevyak
* Corrected X interface code.
- *
+ *
* Revision 1.45 1992/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
*
@@ -81,7 +81,7 @@
*
* Revision 1.41 92/03/18 22:25:44 jplevyak
* Fix DTMEOF bug with absolute addressed.
- *
+ *
* Revision 1.40 1992/03/16 20:38:36 creiman
* Added #include "arch.h"
*
@@ -119,7 +119,7 @@
*
* Revision 1.29 92/01/25 14:44:04 jplevyak
* Fixed minor bug with DTM_ASYNC and another in AvailWrite
- *
+ *
* Revision 1.28 1992/01/14 19:40:09 creiman
* #ifndef macintosh for accept_read_connections call to dtm_sigio
*
@@ -170,7 +170,7 @@
*
* Revision 1.13 91/10/14 16:46:18 jplevyak
* Added loop for detecting dropped connections during beginRead.
- *
+ *
* Revision 1.12 1991/10/11 20:21:50 jplevyak
* Fixed bug with multiple senders one receiver.
* Added function DTMcheckRoute.
@@ -182,7 +182,7 @@
* Revision 1.10 91/09/26 20:22:43 jplevyak
* First stage of reorganization. Use external/internal port mapping.
* Use repackaged dtm_get_nlist and select_one. Fix bugs with availWrite.
- *
+ *
* Revision 1.9 1991/09/13 17:34:10 sreedhar
* changes for DTMSYNC, DTMNOSYNC quality of service
*
@@ -204,7 +204,7 @@
*
* Revision 1.1 90/11/08 16:12:20 jefft
* Initial revision
- *
+ *
*/
/*
@@ -216,33 +216,33 @@
3. Sender awaits "ack from seq start" from the receiver.
Receipt of ack by sender guarantees the sender that
- receiver will definitely accept at least the first user message
+ receiver will definitely accept at least the first user message
sent by the sender. Sender can then send as many user messages
as it wants to ( they would be accepted by receiver ).
- 4. Sender sends the user's header message and user data messages.
+ 4. Sender sends the user's header message and user data messages.
- 3. Receiver will keep accepting user messages on current
+ 3. Receiver will keep accepting user messages on current
connection unless a new connection request is received, which
would be accepted after bumping the current connection.
4. Sender would send "Messages over" message after it sends all user
messages. Receiver would accept same.
- Graphic picture
+ Graphic picture
Sender Receiver
- Connect request
- -------------->
+ Connect request
+ -------------->
Sequence starts |
--------------> |
|
Ack for seq start |
<---------------- |
- |
- User header |
+ |
+ User header |
--------------> |
| --> a sequence of
| BEGINWRITE,
@@ -263,13 +263,13 @@
...............
- A "sequence starts" message can be sent in availWrite or
- beginWrite.
+ A "sequence starts" message can be sent in availWrite or
+ beginWrite.
When no "Ack for header" is received or a write fails.
Note that the "ack for header", "message over" and "sequence starts"
- messages are called called "ack" in DTM terminology ( send_ack,
+ messages are called called "ack" in DTM terminology ( send_ack,
recv_ack calls used for all these ).
*/
@@ -438,12 +438,12 @@ static int make_out_connections( pp )
FOR_EACH_OUT_PORT( pcur, pp ) {
if( pcur->connfd == DTM_NO_CONNECTION) {
- if( dtm_connect( &pcur->sockaddr, &pcur->connfd )
+ if( dtm_connect( &pcur->sockaddr, &pcur->connfd )
== DTMERROR ) {
DBGFLOW( "make_out_connections: dtm_connect fails \n" );
return DTMERROR;
}
- }
+ }
}
return DTM_OK;
}
@@ -457,7 +457,7 @@ static int clear_write_flags(DTMPORT *pp )
#else
static int clear_write_flags( pp )
DTMPORT *pp;
-#endif
+#endif
{
Outport * pcur;
@@ -471,7 +471,7 @@ static int clear_write_flags( pp )
/*
verify_out_connections()
Ensure that their is a connection on each out port.
-*/
+*/
#ifdef DTM_PROTOTYPES
static int verify_out_connections(DTMPORT *pp )
#else
@@ -485,7 +485,7 @@ static int verify_out_connections( pp )
if( pcur->connfd == DTM_NO_CONNECTION) {
DTMerrno = DTMPORTINIT;
return DTMERROR;
- }
+ }
}
return DTM_OK;
}
@@ -510,7 +510,7 @@ static int check_header_write_ack( pp )
if ( pcur->connfd == DTM_NO_CONNECTION ) continue;
if( !( pcur->availwrite ) ) {
int32 tmp;
- if( (pp->qservice == DTM_SYNC) || ((pp->qservice == DTM_ASYNC) &&
+ if( (pp->qservice == DTM_SYNC) || ((pp->qservice == DTM_ASYNC) &&
(dtm_select( pcur->connfd, &tmp, 0 ) == TRUE && tmp >= 4))) {
do {
int temp;
@@ -524,7 +524,7 @@ static int check_header_write_ack( pp )
*/
}
} while ( dtm_select( pcur->connfd, &tmp, 0 ) == TRUE &&
- tmp >= 4);
+ tmp >= 4);
pcur->availwrite = TRUE;
}
}
@@ -546,7 +546,7 @@ static int check_header_write_ack( pp )
static void make_write_iov(IOV_BUF *iov,int fStartSeq,int fEndSeq,char *hdr,
int hdrsize,VOIDPTR data,int datasize )
#else
-static void make_write_iov( iov, fStartSeq, fEndSeq, hdr, hdrsize,
+static void make_write_iov( iov, fStartSeq, fEndSeq, hdr, hdrsize,
data, datasize )
IOV_BUF *iov;
int fStartSeq;
@@ -567,7 +567,7 @@ static void make_write_iov( iov, fStartSeq, fEndSeq, hdr, hdrsize,
if ( fStartSeq ) {
DBGMSG( "make_write_iov: making start seq\n" );
- iov->rts_data = DTM_RTS;
+ iov->rts_data = DTM_RTS;
STDINT( iov->rts_data );
iov->iovec[ i ].iov_base = (char *)&iov->rts_data ;
#define SEQ_START_LEN 4
@@ -581,7 +581,7 @@ static void make_write_iov( iov, fStartSeq, fEndSeq, hdr, hdrsize,
if ( hdrsize != 0 ) {
DBGMSG( "make_write_iov: making header\n" );
iov->hdr_size = hdrsize ;
- STDINT( iov->hdr_size );
+ STDINT( iov->hdr_size );
iov->iovec[ i ].iov_base = (char *)&iov->hdr_size ;
iov->iovec[ i ].iov_len = 4 ;
i += 1 ;
@@ -612,8 +612,8 @@ static void make_write_iov( iov, fStartSeq, fEndSeq, hdr, hdrsize,
DBGMSG( "make_write_iov: making endseq\n" );
iov->end_data = DTM_EOT ;
STDINT( iov->end_data );
- iov->iovec[ i ].iov_base = (char *)&iov->end_data ;
- iov->iovec[ i ].iov_len = 4 ;
+ iov->iovec[ i ].iov_base = (char *)&iov->end_data ;
+ iov->iovec[ i ].iov_len = 4 ;
i += 1 ;
iov->iovsize += 4;
}
@@ -646,27 +646,27 @@ static int writev_buffer( pp, iov_buf, fStartSeq )
if ( fStartSeq ) {
if (pcur->availwrite || pcur->seqstart ) {
- DBGMSG1( "writev: dropping start seq = %x\n",
+ DBGMSG1( "writev: dropping start seq = %x\n",
(pcur->availwrite?1:0) | (pcur->seqstart?10:0));
/* we have already sent the sequence start, skip it */
iov++;
iovsize -= SEQ_START_LEN;
iovlen -= 1;
- }
- pcur->seqstart = TRUE;
+ }
+ pcur->seqstart = TRUE;
}
DBGMSG1( "writev_buffer: iovlen = %d\n", iovlen );
DBGMSG1( "writev_buffer: iovsize = %d\n", iovsize );
DBGMSG1( "writev_buffer: ptr iov = %X\n", iov );
DBGMSG1( "writev_buffer: first ptr word = %X\n", iov[0].iov_base );
- DBGMSG1( "writev_buffer: first word = %d\n",
+ DBGMSG1( "writev_buffer: first word = %d\n",
*(int *)((iov[0]).iov_base));
status = dtm_writev_buffer( pcur->connfd, iov, iovlen, iovsize,
NULL, 0);
- DBGINT( "writev_buffer - status = %d\n", status);
+ DBGINT( "writev_buffer - status = %d\n", status);
- if( status < 0 ) {
+ if( status < 0 ) {
DBGINT( "dtm_writev_buffer - errno = %d\n", errno );
if( DTMerrno == DTMEOF ) {
CHECK_ERR( destroy_out_port( pp, &pcur ));
@@ -702,16 +702,16 @@ static int32 select_one( connfd )
FD_SET( connfd, &readmask );
#ifdef __hpux
- ret = select( FD_SETSIZE, (int *)&readmask, (int *)0, (int *)0,
+ ret = select( FD_SETSIZE, (int *)&readmask, (int *)0, (int *)0,
#else
- ret = select( FD_SETSIZE, &readmask, (fd_set *)0, (fd_set *)0,
+ ret = select( FD_SETSIZE, &readmask, (fd_set *)0, (fd_set *)0,
#endif
- &timeout );
+ &timeout );
if ( ret > 0 ) {
int32 count;
ioctl( connfd, FIONREAD, &count );
DBGMSG1( "select_one: got count = %d\n", count );
- ret = count;
+ ret = count;
}
return ret;
}
@@ -735,11 +735,11 @@ static int select_one_connection( connfd )
FD_SET( connfd, &readmask );
#ifdef __hpux
- return select( FD_SETSIZE, (int *)&readmask, (int *)0, (int *)0,
+ return select( FD_SETSIZE, (int *)&readmask, (int *)0, (int *)0,
#else
- return select( FD_SETSIZE, &readmask, (fd_set *)0, (fd_set *)0,
+ return select( FD_SETSIZE, &readmask, (fd_set *)0, (fd_set *)0,
#endif
- &timeout );
+ &timeout );
}
/*
@@ -749,15 +749,15 @@ static int select_one_connection( connfd )
#ifdef DTM_PROTOTYPES
static Inport * new_in_port(DTMPORT *pp,int fd )
#else
-static Inport * new_in_port( pp, fd )
+static Inport * new_in_port( pp, fd )
DTMPORT * pp;
int fd;
-#endif
+#endif
{
Inport * inp;
if ( (inp = (Inport *) malloc( sizeof(Inport) )) == NULL ) {
- DTMerrno = DTMMEM;
+ DTMerrno = DTMMEM;
return (Inport *) DTMERROR;
}
memset(inp,0,sizeof(Inport));
@@ -775,14 +775,14 @@ static Inport * new_in_port( pp, fd )
#ifdef PUT_NEW_IN_PORTS_AT_END
{
Inport * endp;
- endp = pp->in;
- if ( endp == NULL )
+ endp = pp->in;
+ if ( endp == NULL )
pp->in = inp;
else {
while ( endp->next != NULL ) endp = endp->next;
endp->next = inp;
- }
- }
+ }
+ }
#else
inp->next = pp->in;
pp->in = inp;
@@ -794,8 +794,8 @@ static Inport * new_in_port( pp, fd )
void dtm_handle_in( caddr_t client_data, int * fd, void * id)
#else
void dtm_handle_in( client_data, fd, id )
- caddr_t client_data;
- int * fd;
+ caddr_t client_data;
+ int * fd;
void * id;
#endif
{
@@ -812,10 +812,10 @@ void dtm_handle_in( client_data, fd, id )
dtm_set_Xcallback
This function may seem a little strange, after all why have a variable
- (pp->XaddInput) which has only one valid value (XtAddInput).
- The problem is that we don't want to include the X libraries
- unless we have to. By using this variable which is only set
- if the function that will cause this function to get called
+ (pp->XaddInput) which has only one valid value (XtAddInput).
+ The problem is that we don't want to include the X libraries
+ unless we have to. By using this variable which is only set
+ if the function that will cause this function to get called
is included... which causes the inclusion of the X libraries, we
avoid the undefined external error.
*/
@@ -835,7 +835,7 @@ void dtm_set_Xcallback( pp, inp )
/* you didn't see this */
int p; for ( p = 0; p < DTMptCount ; p++ ) if ( pp == DTMpt[p] ) break;
if ( pp->porttype == INPORTTYPE && pp->XaddInput ) {
- inp->XinputId = pp->XaddInput( inp->fd, XtInputReadMask,
+ inp->XinputId = pp->XaddInput( inp->fd, XtInputReadMask,
dtm_handle_in, (caddr_t) p);
}
}
@@ -855,7 +855,7 @@ int dtm_accept_read_connections(DTMPORT *pp,int fWait )
#else
int dtm_accept_read_connections( pp, fWait )
DTMPORT * pp;
- int fWait;
+ int fWait;
#endif
{
struct timeval timeout ;
@@ -878,16 +878,16 @@ int dtm_accept_read_connections( pp, fWait )
/* No connection yet, await one and accept */
- DBGINT( "dtm_accept_read_connection: pp -> sockfd = %d\n",
+ DBGINT( "dtm_accept_read_connection: pp -> sockfd = %d\n",
pp -> sockfd );
- if( (fd = dtm_accept( pp->sockfd, &pp->sockaddr, fWait ? &timeout : 0))
+ if( (fd = dtm_accept( pp->sockfd, &pp->sockaddr, fWait ? &timeout : 0))
== DTMERROR ) {
if ( !fWait ) return DTM_OK;
DTMerrno = DTMTIMEOUT ;
return DTMERROR;
}
DBGINT( "dtm_accept_read_connection: got fd = %d\n", fd );
- CHECK_ERR( inp = new_in_port( pp, fd ));
+ CHECK_ERR( inp = new_in_port( pp, fd ));
#ifndef _ARCH_MACOS
if ( pp->callback ) dtm_sigio( fd );
if ( pp->Xcallback ) dtm_set_Xcallback( pp, inp );
@@ -904,13 +904,13 @@ int dtm_accept_read_connections( pp, fWait )
/*
DTMselectRead()
- Function to test
- a) for existence of a new connection or a new
+ Function to test
+ a) for existence of a new connection or a new
message header to be read on a set of DTM ports OR
- b) for whether data is available to be read on a
+ b) for whether data is available to be read on a
set of sockets.
- Return values :
+ Return values :
DTM_PORT_READY if at least a DTM port or
socket has something to be
read.
@@ -920,7 +920,7 @@ int dtm_accept_read_connections( pp, fWait )
error.
Each port has status field. Possible values
- for status field are -
+ for status field are -
DTM_PORT_READY something available to be read.
DTM_PORT_NOT_READY nothing available to be read.
@@ -963,14 +963,14 @@ int DTMselectRead( dtmset, dtmnum, sockset, socknum, period )
/* Set up DTM ports to be selected on */
for( p1 = dtmset, index = 0 ; index < dtmnum ; index++, p1++ ) {
- reg DTMPORT *pp ;
- int port_internal;
+ reg DTMPORT *pp ;
+ int port_internal;
reg Inport *inp;
- /* Select status is error if port entry is
- not initialised.
+ /* Select status is error if port entry is
+ not initialised.
*/
- if( (port_internal = dtm_map_port_internal( p1->port ))
+ if( (port_internal = dtm_map_port_internal( p1->port ))
== DTMERROR ) {
p1->status = DTMERROR ;
continue ;
@@ -981,11 +981,11 @@ int DTMselectRead( dtmset, dtmnum, sockset, socknum, period )
/* look for new connection request */
- FD_SET( pp -> sockfd, fchk );
+ FD_SET( pp -> sockfd, fchk );
/* look for data in existing connection (if it exists) */
FOR_EACH_IN_PORT( inp, pp ) {
- FD_SET( inp->fd, fchk );
+ FD_SET( inp->fd, fchk );
}
p1->status = DTM_PORT_NOT_READY ;
}
@@ -994,21 +994,21 @@ int DTMselectRead( dtmset, dtmnum, sockset, socknum, period )
for( p2 = sockset, index = 0 ; index < socknum ; index++, p2++ ) {
FD_SET( p2 -> sockfd, fchk );
- p2 -> status = DTM_PORT_NOT_READY ;
- }
+ p2 -> status = DTM_PORT_NOT_READY ;
+ }
#ifdef __hpux
- nf = select( FD_SETSIZE, (int *)fchk, (int *)0, (int *)0,
+ nf = select( FD_SETSIZE, (int *)fchk, (int *)0, (int *)0,
#else
- nf = select( FD_SETSIZE, fchk, (fd_set *)0, (fd_set *)0,
+ nf = select( FD_SETSIZE, fchk, (fd_set *)0, (fd_set *)0,
#endif
period < 0 ? NULL : &timeout );
- /* Select returns error */
+ /* Select returns error */
- if( nf < 0 ) {
- DBGINT( "DTMselectRead: select error %d \n", errno );
- DTMerrno = DTMSELECT ;
- return DTMERROR ;
+ if( nf < 0 ) {
+ DBGINT( "DTMselectRead: select error %d \n", errno );
+ DTMerrno = DTMSELECT ;
+ return DTMERROR ;
}
/* None of the DTM ports or sockets have anything to be read */
@@ -1016,7 +1016,7 @@ int DTMselectRead( dtmset, dtmnum, sockset, socknum, period )
if( nf == 0 ) {
DBGFLOW( "DTMselectRead: Nothing to read\n" );
return DTM_PORT_NOT_READY ;
- }
+ }
/* Check whether any DTM port has something to be read */
@@ -1027,14 +1027,14 @@ int DTMselectRead( dtmset, dtmnum, sockset, socknum, period )
if ((port_internal= dtm_map_port_internal( p1->port )) == DTMERROR)
continue;
-
+
pp = DTMpt[ port_internal ];
if (pp->porttype == INPORTTYPE) {
fNewConnections = fNewConnections ||
(select_one_connection( pp->sockfd ) > 0);
p1->status = DTM_PORT_NOT_READY;
} else {
- if (select_one_connection( pp->sockfd ) > 0)
+ if (select_one_connection( pp->sockfd ) > 0)
fReady = p1->status = DTM_PORT_READY;
else p1->status = DTM_PORT_NOT_READY;
continue;
@@ -1049,7 +1049,7 @@ int DTMselectRead( dtmset, dtmnum, sockset, socknum, period )
continue;
}
p1->status = DTM_PORT_READY;
- }
+ }
inp = inp->next;
}
if ( p1->status == DTM_PORT_READY ) fReady = DTM_PORT_READY;
@@ -1058,14 +1058,14 @@ int DTMselectRead( dtmset, dtmnum, sockset, socknum, period )
/* Check whether any socket has something to be read */
for( p2 = sockset, index = 0 ; index < socknum ; index++, p2++ ) {
- p2 -> status = FD_ISSET( p2 -> sockfd, fchk ) ?
+ p2 -> status = FD_ISSET( p2 -> sockfd, fchk ) ?
DTM_PORT_READY : DTM_PORT_NOT_READY ;
if ( p2->status == DTM_PORT_READY ) fReady = DTM_PORT_READY;
}
DBGFLOW( "DTMselectRead done loop\n" );
- } while (!fReady && (fNewConnections || fFalsePositive));
+ } while (!fReady && (fNewConnections || fFalsePositive));
return fReady ;
}
@@ -1076,7 +1076,7 @@ static Inport * inc_in_port(DTMPORT *pp,Inport *inp )
static Inport * inc_in_port( pp, inp )
DTMPORT * pp;
Inport * inp;
-#endif
+#endif
{
if ( inp == NULL || inp->next == NULL )
return pp->in;
@@ -1089,7 +1089,7 @@ static void inc_nextToRead(DTMPORT *pp )
static void inc_nextToRead( pp )
DTMPORT * pp;
#endif
-{
+{
pp->nextToRead = inc_in_port( pp, pp->nextToRead );
}
@@ -1106,7 +1106,7 @@ int dtm_destroy_in_port( inp, pp )
if ( pp->Xcallback ) pp->XremoveInput( inp->XinputId );
close( inp->fd );
-
+
if ( pp->nextToRead == inp )
inc_nextToRead( pp );
if ( pp->nextToRead == inp )
@@ -1136,7 +1136,7 @@ int dtm_destroy_in_port( inp, pp )
return DTM_OK;
}
-
+
/*
send_cts()
@@ -1148,7 +1148,7 @@ static int send_cts(DTMPORT *pp,int fWait )
static int send_cts( pp, fWait )
DTMPORT * pp;
int fWait;
-#endif
+#endif
{
Inport * inp = pp->nextToRead;
Inport * endp;
@@ -1157,7 +1157,7 @@ static int send_cts( pp, fWait )
DBGMSG( "send_cts: <[\n" );
/*
- If we have no ports return OK
+ If we have no ports return OK
*/
if ( inp == NULL ) inp = pp->in;
if ( inp == NULL ) return DTM_OK;
@@ -1171,7 +1171,7 @@ static int send_cts( pp, fWait )
if ( inp == endp ) {
if ( !fWait ) return DTM_OK;
else break;
- }
+ }
}
pp->nextToRead = inp;
@@ -1186,7 +1186,7 @@ static int send_cts( pp, fWait )
if ( !inp->fCTSsent && ((fWait && (iSent == 1 )) ||
(dtm_select( inp->fd, &tmp, 0 ) == TRUE && tmp >= 4))) {
if ( dtm_send_ack( inp->fd, DTM_CTS ) == DTMERROR) {
- CHECK_ERR( dtm_destroy_in_port( inp, pp ));
+ CHECK_ERR( dtm_destroy_in_port( inp, pp ));
/*
Never hurts to start at the top.
*/
@@ -1202,9 +1202,9 @@ static int send_cts( pp, fWait )
iSent = 0;
continue;
}
- inp->fCTSsent = TRUE;
+ inp->fCTSsent = TRUE;
inp->blocklen = DTM_NEW_DATASET;
- }
+ }
inp = inc_in_port( pp, inp );
}
DBGMSG( "send_cts: ]>\n" );
@@ -1216,7 +1216,7 @@ static int accept_one_header(DTMPORT *pp,void *header,int size )
#else
static int accept_one_header( pp, header, size )
DTMPORT * pp;
- void * header;
+ void * header;
int size;
#endif
{
@@ -1227,23 +1227,23 @@ static int accept_one_header( pp, header, size )
if ( inp == NULL || !inp->fCTSsent || inp->fGotHeader ) {
DTMerrno = DTMCALL;
return DTMERROR;
- }
+ }
DBGMSG1( "Accepting RTS on %d\n", inp->fd );
if (dtm_recv_ack( inp->fd, &ack ) == DTMERROR ) {
- dtm_destroy_in_port( inp, pp );
+ dtm_destroy_in_port( inp, pp );
return DTMERROR;
}
if( ack != DTM_RTS ) {
DTMerrno = DTMBADACK;
DBGMSG1( "Something other than RTS received %d\n", ack );
- dtm_destroy_in_port( inp, pp );
+ dtm_destroy_in_port( inp, pp );
return DTMERROR;
}
#if 0
/* There are no header ack */
if ( dtm_send_ack( inp->fd, DTM_CTS ) == DTMERROR) {
- dtm_destroy_in_port( inp, pp );
+ dtm_destroy_in_port( inp, pp );
return DTMERROR;
}
#endif
@@ -1262,7 +1262,7 @@ static int accept_one_header( pp, header, size )
/*
DTMcheckRoute()
Check whether new routing information has come in.
- Returns:
+ Returns:
*/
#ifdef DTM_PROTOTYPES
int DTMcheckRoute(int port )
@@ -1289,16 +1289,16 @@ int DTMcheckRoute( port )
Function to test for existence of a new connection or
a new message header to be read on a given DTM port.
- Return values : TRUE if either new connection
- request or something new
+ Return values : TRUE if either new connection
+ request or something new
to be read is available on
given port.
- DTMERROR on select error.
+ DTMERROR on select error.
FALSE otherwise.
Notes :
- DTMavailRead is basically call to DTMselectRead for
+ DTMavailRead is basically call to DTMselectRead for
given port with 0 timeout.
*/
#ifdef DTM_PROTOTYPES
@@ -1318,7 +1318,7 @@ int DTMavailRead( p )
DTMerrno = DTMNOERR;
/* Note: the port here is an external port since that
- is what selectRead expects
+ is what selectRead expects
*/
dtmnum = 1 ;
dtmset.port = p ;
@@ -1331,7 +1331,7 @@ int DTMavailRead( p )
DBGMSG1( "DTMavailRead send_cts returned error %d\n", DTMerrno );
if ( DTMerrno == DTMEOF ) fAnyReady = FALSE ;
else return DTMERROR;
- }
+ }
}
DBGMSG( "DTMavailRead done\n" );
return fAnyReady;
@@ -1386,7 +1386,7 @@ int DTMgetConnectionCount(port, n_connections)
message is read.
Return values : >= 0 on success.
- DTMERROR on some error.
+ DTMERROR on some error.
*/
#ifdef DTM_PROTOTYPES
int DTMbeginRead(int p,VOIDPTR header,int size )
@@ -1406,8 +1406,8 @@ int DTMbeginRead( p, header, size )
CHECK_ERR( p = dtm_map_port_internal( p ));
pp = DTMpt[p];
-
- while ( TRUE ) {
+
+ while ( TRUE ) {
CHECK_ERR( dtm_accept_read_connections( pp, DTM_WAIT));
if ( send_cts( pp, DTM_WAIT ) == DTMERROR) {
if ( DTMerrno == DTMEOF ) continue;
@@ -1415,8 +1415,8 @@ int DTMbeginRead( p, header, size )
}
if ( pp->nextToRead == NULL ) continue;
DBGFLOW( "DTMbeginRead before accept_one_header.\n" );
- if (( count = accept_one_header( pp, header, size )) == DTMERROR ) {
- if ( DTMerrno == DTMEOF ) continue;
+ if (( count = accept_one_header( pp, header, size )) == DTMERROR ) {
+ if ( DTMerrno == DTMEOF ) continue;
return DTMERROR;
}
break;
@@ -1428,7 +1428,7 @@ int DTMbeginRead( p, header, size )
/*
DTMreadDataset()
- Function to read user messages.
+ Function to read user messages.
Return values : number of bytes read, on success
DTMERROR on error
@@ -1466,7 +1466,7 @@ int DTMreadDataset(p, ds, size, type)
/* fill buffer from network */
/*
- Assume that the caller has checked for EOT
+ Assume that the caller has checked for EOT
*/
CHECK_ERR( size = dtm_read_buffer( inp->fd, &inp->blocklen, ds, size));
@@ -1512,22 +1512,22 @@ int DTMendRead( p )
dtm_discard, DISCARDSIZE) > 0 );
inp->fCTSsent = FALSE;
inp->fGotHeader = FALSE;
- return DTM_OK ;
+ return DTM_OK ;
}
/*
Function to combine reading of header/data.
-
+
Return values : number of bytes read, on success
- DTMERROR on error
+ DTMERROR on error
Notes : This function is really there for completeness
sake ( it complements DTMwriteMsg ). It is not
very clear how a user can use it effectively
( since he has to know data size beforehand,
in which case he need not have a header ).
-
- Hence, implementation of this function is to
+
+ Hence, implementation of this function is to
just call beginRead, readDataset and endRead
in that order.
*/
@@ -1565,7 +1565,7 @@ int DTMreadMsg( p, hdr, hdrsize, data, datasize, datatype )
Return values : TRUE if subsequent write will
succeed.
- FALSE subsequent write will wait/fail.
+ FALSE subsequent write will wait/fail.
DTMERROR if port is not initialised or
server ( UDP/TCP ) port not
yet acquired etc.
@@ -1603,12 +1603,12 @@ int DTMavailWrite( port )
err_count = 0 ;
rstatus = DTM_PORT_READY ;
- FOR_EACH_OUT_PORT( pcur, pp ) {
+ FOR_EACH_OUT_PORT( pcur, pp ) {
/* Connect to all new active sockets */
if( pcur->connfd == DTM_NO_CONNECTION ) {
- if( dtm_quick_connect( &pcur->sockaddr, &pcur->connfd )
+ if( dtm_quick_connect( &pcur->sockaddr, &pcur->connfd )
== DTMERROR ) {
++err_count ;
continue ;
@@ -1628,14 +1628,14 @@ int DTMavailWrite( port )
/* send RTS to new sockets */
if( dtm_send_ack( pcur->connfd, DTM_RTS ) == DTMERROR ) {
- if( DTMerrno == DTMEOF )
+ if( DTMerrno == DTMEOF )
CHECK_ERR( destroy_out_port( pp, &pcur ));
++err_count ;
continue ;
- }
+ }
pcur->seqstart = TRUE ;
}
-
+
nf = select_one( pcur->connfd );
if( nf < 0 ) {
@@ -1648,10 +1648,10 @@ int DTMavailWrite( port )
/* No ack yet */
if( nf == 0 ) {
- if( pp->qservice == DTM_SYNC )
+ if( pp->qservice == DTM_SYNC )
rstatus = DTM_PORT_NOT_READY ;
continue ;
- }
+ }
/* Receive ack */
@@ -1661,7 +1661,7 @@ int DTMavailWrite( port )
CHECK_ERR( destroy_out_port( pp, &pcur ));
++err_count ;
continue ;
- }
+ }
/* port is available for write */
@@ -1674,7 +1674,7 @@ int DTMavailWrite( port )
At some future point we may want to send the status
of err_count to the server.
*/
- pp->fLastWasSuccessfulAvailWrite = ( err_count == 0 )
+ pp->fLastWasSuccessfulAvailWrite = ( err_count == 0 )
&& ( rstatus == DTM_PORT_READY );
return ( err_count != 0 ) ? DTM_PORT_NOT_READY : rstatus ;
}
@@ -1688,7 +1688,7 @@ int DTMavailWrite( port )
int DTMbeginWrite(int port,VOIDPTR header,int size )
#else
int DTMbeginWrite( port, header, size )
- int port ;
+ int port ;
VOIDPTR header;
int size ;
#endif
@@ -1702,8 +1702,8 @@ int DTMbeginWrite( port, header, size )
if ( pp->fDiscard ) {
CHECK_ERR( dtm_check_server( pp, DTM_DONT_WAIT ));
if ( pp->fDiscard ) return DTM_OK;
- }
- if ( !pp->fLastWasSuccessfulAvailWrite )
+ }
+ if ( !pp->fLastWasSuccessfulAvailWrite )
CHECK_ERR( dtm_check_server( pp, DTM_WAIT ));
CHECK_ERR( make_out_connections( pp ));
make_write_iov( &iov_buf, START_SEQ, NO_END_SEQ, header, size, NULL, 0 );
@@ -1734,7 +1734,7 @@ int DTMwriteDataset(p, ds, size, type)
IOV_BUF iov_buf;
CHECK_ERR( p = dtm_map_port_internal( p ));
- pp = DTMpt[p];
+ pp = DTMpt[p];
if ( pp->fDiscard ) return DTM_OK;
CHECK_ERR( verify_out_connections( pp ));
size = (*DTMconvertRtns[(int)type]) ( DTMSTD, ds, size );
@@ -1760,12 +1760,12 @@ int DTMendWrite( port )
reg Outport * pcur ;
CHECK_ERR( port = dtm_map_port_internal( port ));
- pp = DTMpt[port];
+ pp = DTMpt[port];
/*
Check for endWrite before begin
*/
- FOR_EACH_OUT_PORT( pcur, pp ) {
- if( pcur->connfd == DTM_NO_CONNECTION ) continue;
+ FOR_EACH_OUT_PORT( pcur, pp ) {
+ if( pcur->connfd == DTM_NO_CONNECTION ) continue;
if ((pp->qservice == DTM_SYNC && !pcur->availwrite) ||
!pcur->seqstart ) {
DTMerrno = DTMCALL;
@@ -1774,7 +1774,7 @@ int DTMendWrite( port )
}
if ( pp->fDiscard ) return DTM_OK;
CHECK_ERR( verify_out_connections( pp ));
- make_write_iov( &iov_buf, NO_START_SEQ, END_SEQ, NULL, 0, NULL, 0 );
+ make_write_iov( &iov_buf, NO_START_SEQ, END_SEQ, NULL, 0, NULL, 0 );
CHECK_ERR( writev_buffer( pp, &iov_buf, NO_START_SEQ ));
CHECK_ERR( clear_write_flags( pp ));
return DTM_OK;
@@ -1820,8 +1820,8 @@ int DTMwriteMsg( p, hdr, hdrsize, data, datasize, datatype )
if ( pp->fDiscard ) {
CHECK_ERR( dtm_check_server( pp, DTM_DONT_WAIT ));
if ( pp->fDiscard ) return DTM_OK;
- }
- if ( !pp->fLastWasSuccessfulAvailWrite )
+ }
+ if ( !pp->fLastWasSuccessfulAvailWrite )
CHECK_ERR( dtm_check_server( pp, DTM_WAIT ));
CHECK_ERR( make_out_connections( pp ));
CHECK_ERR( verify_out_connections( pp ));
diff --git a/libdtm/dtm.h b/libdtm/dtm.h
index 20ed8d2..7f6aa34 100644
--- a/libdtm/dtm.h
+++ b/libdtm/dtm.h
@@ -21,7 +21,7 @@
/*************************************************************************
**
-** dtm.h -
+** dtm.h -
**
*************************************************************************/
@@ -40,7 +40,7 @@
*
* Revision 1.32 92/05/06 16:40:17 jefft
* Modified prototype on DTMaddInput
- *
+ *
* Revision 1.31 1992/04/30 20:27:05 jplevyak
* Changed Version to 2.3
*
@@ -50,7 +50,7 @@
*
* Revision 1.29 92/03/20 21:14:40 jplevyak
* Add DTMgetPortAddr and remove DTMgetPortName
- *
+ *
* Revision 1.28 1992/03/13 18:20:31 jefft
* dtm.h depended on TRUE being defined before it was included. This word
* TRUE was changed to 1 and FALSE to 0
@@ -63,23 +63,23 @@
*
* Revision 1.25 92/02/18 14:02:36 jplevyak
* Added prototype for DTMaddInPortSocket.
- *
+ *
* Revision 1.24 92/01/30 19:28:24 jplevyak
* add prototypes
- *
+ *
* Revision 1.23 1992/01/02 16:31:56 dweber
* Reorganized the DTM class and MSG class
*
* Revision 1.22 91/12/13 22:34:48 jefft
* Removed DTMtitle and DTMtype constants. Added dtm_(sg)et_address macros.
* Added MSG(sg)etString macros.
- *
+ *
* Revision 1.21 91/12/13 15:37:55 dweber
* Fixed DTMHL bugs and re-ordered some macros for clarification
- *
+ *
* Revision 1.20 91/12/12 22:55:27 jefft
* Add numbers to the comments beside the DTM errors
- *
+ *
* Revision 1.19 1991/12/10 22:15:56 jefft
* fixed DTMgetAddress macro (it was calling dtm_set_char).
*
@@ -96,7 +96,7 @@
* Revision 1.15 91/10/11 20:23:31 jplevyak
* Added prototype for DTMcheckRoute,
* Changed DTMSYNC, DTMNOSYNC to DTM_SYNC, DTM_ASYNC.
- *
+ *
* Revision 1.14 1991/10/10 14:23:43 jplevyak
* All prototypes are now included and tested.
*
@@ -105,10 +105,10 @@
*
* Revision 1.12 91/09/18 15:27:54 jplevyak
* Added extern definition for DTMinit()
- *
+ *
* Revision 1.11 91/09/13 17:36:05 sreedhar
* DTMSYNC, DTMNOSYNC added
- *
+ *
* Revision 1.10 1991/09/13 15:31:45 jefft
* fixed DTMHL macro, it should not have taken an arguement.
*
@@ -136,7 +136,7 @@
*
* Revision 1.1 90/11/08 16:31:19 jefft
* Initial revision
- *
+ *
*/
@@ -153,7 +153,7 @@
#define DTM_PROTOTYPES
#define DTM_PROTO(x) x
#else
-#define DTM_PROTO(x) ()
+#define DTM_PROTO(x) ()
#endif
/* DTM constants */
@@ -220,7 +220,7 @@ typedef enum {
NOTE: the strings that describe the errors in DTMerr
are located in fatal.c. Any changes to this list
must be accompanied by a corresponding change there.
-*/
+*/
#define DTMERROR -1
#define DTM_OK DTMNOERR
@@ -282,21 +282,21 @@ extern int DTMreadDataset DTM_PROTO(( int p, VOIDPTR ds, int size, DTMTYPE type)
extern int DTMwriteDataset DTM_PROTO(( int p, VOIDPTR ds, int size, DTMTYPE type));
extern int DTMendRead DTM_PROTO(( int port ));
extern int DTMendWrite DTM_PROTO(( int port ));
-extern int DTMreadMsg DTM_PROTO(( int p, char *hdr, int hdrsize,
+extern int DTMreadMsg DTM_PROTO(( int p, char *hdr, int hdrsize,
VOIDPTR data, int datasize, int datatype ));
extern int DTMdestroyPort DTM_PROTO(( int port));
extern char *DTMerrmsg();
extern int DTMgetPortAddr DTM_PROTO(( int port, char * addr, int length ));
extern int DTMgetReturnPortName DTM_PROTO(( int port, char *** addrs,
int * n_addrs));
-extern int DTMselectRead DTM_PROTO(( Dtm_set *dtmset, int dtmnum,
+extern int DTMselectRead DTM_PROTO(( Dtm_set *dtmset, int dtmnum,
Sock_set *sockset, int socknum, int period ));
-extern void DTMsetGroup DTM_PROTO(( char * header, DTMCMD cmd, char * parent,
+extern void DTMsetGroup DTM_PROTO(( char * header, DTMCMD cmd, char * parent,
char * self ));
-extern int DTMgetGroup DTM_PROTO(( char * header, DTMCMD cmd, char * parent,
+extern int DTMgetGroup DTM_PROTO(( char * header, DTMCMD cmd, char * parent,
char * self ));
extern int DTMsendRoute DTM_PROTO(( int fd, char * sendto_addr, int addcount,
- char **add_addresses, int delcount,
+ char **add_addresses, int delcount,
char **del_addresses ));
extern int DTMcheckRoute DTM_PROTO(( int port ));
/* Not implemented Yet */
diff --git a/libdtm/dtmf77.c b/libdtm/dtmf77.c
index bd9165b..01211f4 100644
--- a/libdtm/dtmf77.c
+++ b/libdtm/dtmf77.c
@@ -39,7 +39,7 @@
*
* Revision 1.7 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.6 1992/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
@@ -58,7 +58,7 @@
*
* Revision 1.1 90/11/08 16:31:46 jefft
* Initial revision
- *
+ *
#endif
@@ -112,7 +112,7 @@ int DTMGPA(p, s, len)
int *p, *len;
_fcd s;
#endif
-{
+{
char portaddr[128];
@@ -120,7 +120,7 @@ int DTMGPA(p, s, len)
return DTMERROR;
if (strlen(portaddr) > *len) {
- strncpy(_fcdtocp(s), portaddr, *len);
+ strncpy(_fcdtocp(s), portaddr, *len);
return DTMERROR;
}
@@ -204,7 +204,7 @@ int DTMBW(p, header, size)
len = _fcdlen(header);
strncpy(buffer, _fcdtocp(header), len);
buffer[len] = '\0';
-
+
return DTMbeginWrite(*p, buffer, len+1);
}
diff --git a/libdtm/dtminit.c b/libdtm/dtminit.c
index b241c67..dc27c81 100644
--- a/libdtm/dtminit.c
+++ b/libdtm/dtminit.c
@@ -59,7 +59,7 @@
*
* Revision 1.33 92/05/05 22:27:50 jplevyak
* Corrected X interface code.
- *
+ *
* Revision 1.32 1992/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
*
@@ -71,7 +71,7 @@
*
* Revision 1.29 92/03/20 21:14:40 jplevyak
* Remove comments about DTMgetPortName
- *
+ *
* Revision 1.28 1992/03/16 20:38:36 creiman
* Added #include "arch.h"
*
@@ -99,7 +99,7 @@
*
* Revision 1.20 91/11/22 21:31:00 jplevyak
* Added initialization for fDiscard (fGotList and fLastWasSuccessfull...)
- *
+ *
* Revision 1.19 1991/10/29 22:05:53 sreedhar
* for CONVEX
*
@@ -120,17 +120,17 @@
* Major reorganization. Dynamically allocate port table. Encode a
* key in the external ports to detect stale ports. Rename and
* comment functions.
- *
+ *
* Revision 1.13 91/09/18 15:28:11 jplevyak
* Added some external definitions for shared functions.
- *
+ *
* Revision 1.12 91/09/16 11:25:37 jplevyak
* Fix bug, use of uninitialized register variable in function
* DTMdestroyPort
- *
+ *
* Revision 1.11 91/09/13 20:09:31 sreedhar
* supporting :9900, absence of env variable
- *
+ *
* Revision 1.10 1991/09/13 18:57:13 sreedhar
* removed DTMinit() fn., added qservice in some places
*
@@ -151,13 +151,13 @@
*
* Revision 1.3 91/01/09 14:10:04 jefft
* Now ignoring SIGPIPE signals.
- *
+ *
* Revision 1.2 90/11/21 10:53:08 jefft
* Modified DTMgetPortAddr to return IP address instead of hostname.
- *
+ *
* Revision 1.1 90/11/08 16:21:54 jefft
* Initial revision
- *
+ *
*/
#include "arch.h"
@@ -185,11 +185,11 @@
/*
CONTENTS
- STATIC
+ STATIC
init_port() - initialize DTM port.
grow_ports() - enlarge the DTM port table
- initialize() - initialize DTM library
+ initialize() - initialize DTM library
get_init_port() - find a new port and initialize it
set_out_port_address() - set a physical out port adress
free_port() - free the internal port structure
@@ -205,7 +205,7 @@
DTMmakeInPort() - make a DTM input port
DTMmakeOutPort() - make a DTM output port
DTMdestroyPort() - close and free a DTM port
- DTMgetPortAddr() - returns the main port address
+ DTMgetPortAddr() - returns the main port address
END CONTENTS */
@@ -273,7 +273,7 @@ static int init_port( port, porttype, qservice )
/* Output port data init */
- pp->out = NULL ;
+ pp->out = NULL ;
pp->fLastWasSuccessfulAvailWrite = FALSE;
pp->fGotList = FALSE;
pp->fDiscard = FALSE;
@@ -287,7 +287,7 @@ static int init_port( port, porttype, qservice )
*/
static int grow_ports( VOID )
{
- if ( ( DTMpt = (DTMPORT **) realloc( (void *) DTMpt, (DTMptCount +
+ if ( ( DTMpt = (DTMPORT **) realloc( (void *) DTMpt, (DTMptCount +
DTM_PORTS_GROW) * sizeof(DTMPORT))) == NULL ) {
DTMerrno = DTMMEM;
DTMERR("initialize: insufficient memory for port table.");
@@ -310,7 +310,7 @@ static int grow_ports( VOID )
Initailized DTM by allocating memory for dtm_discard
and DTMpt ( the port table ).
*/
-static int initialize( VOID )
+static int initialize( VOID )
{
/* get the debug option flag */
if ( getenv( "DTMDEBUG" ) ) uDTMdbg = -1;
@@ -358,7 +358,7 @@ static int get_init_port( portname, porttype, qservice )
/* check for library initialization */
if( !DTM_INITIALIZED ) CHECK_ERR( initialize());
-
+
/* find first open DTM port */
while ( tries-- ) {
for (port=0; port < DTMptCount; port+=1) {
@@ -366,7 +366,7 @@ static int get_init_port( portname, porttype, qservice )
CHECK_ERR(init_port( port, porttype, qservice ));
strncpy( DTMpt[port]->portname, portname, (PNAMELEN - 1) );
DTMpt[ port ]->portname[ PNAMELEN - 1 ] = '\0' ;
- DTMpt[ port ]->key = DTMportSequenceNumber++;
+ DTMpt[ port ]->key = DTMportSequenceNumber++;
return port;
}
}
@@ -394,18 +394,18 @@ static int set_out_port_address( port, addr )
Port aPort ;
Outport *outp ;
- DBGINT( "set_out_port_address: Physical TCP portname - %x ",
+ DBGINT( "set_out_port_address: Physical TCP portname - %x ",
ntohl( addr.sin_addr.s_addr ));
DBGINT( "%d\n", ntohs( addr.sin_port ));
aPort.portid = addr.sin_port ;
- aPort.nethostid = addr.sin_addr.s_addr ;
+ aPort.nethostid = addr.sin_addr.s_addr ;
CHECK_ERR( outp = dtm_new_out_port( &aPort ));
- DTMpt[port]->out = outp ;
+ DTMpt[port]->out = outp ;
return DTM_OK;
-}
+}
#ifdef DTM_PROTOTYPES
static int free_port(int port )
@@ -414,15 +414,15 @@ static int free_port( port )
int port;
#endif
{
- Outport * outport = DTMpt[ port ]->out;
+ Outport * outport = DTMpt[ port ]->out;
Outport * tempPort;
- int returnValue = DTM_OK;
+ int returnValue = DTM_OK;
while ( outport != NULL ) {
tempPort = outport->next;
#ifdef FREE_RETURNS_INT
if ( free( outport ) != 0 ) {
- DTMerrno = DTMCORPT;
+ DTMerrno = DTMCORPT;
returnValue = DTMERROR;
break;
}
@@ -430,10 +430,10 @@ static int free_port( port )
free( outport );
#endif
outport = tempPort;
- }
+ }
#ifdef FREE_RETURNS_INT
if ( free( DTMpt[ port ] ) != 0 ) {
- DTMerrno = DTMCORPT;
+ DTMerrno = DTMCORPT;
returnValue = DTMERROR;
}
#else
@@ -455,14 +455,14 @@ static int register_port(int port )
#else
static int register_port( port )
int port;
-#endif
+#endif
{
int fd ;
S_ADDR addr ;
char *naddr ;
CHECK_ERR( naddr = dtm_get_naddr( &addr, &fd ));
- if(dtm_nsend_sockaddr(fd, naddr, dtm_get_refname(), DTMpt[port]->portname,
+ if(dtm_nsend_sockaddr(fd, naddr, dtm_get_refname(), DTMpt[port]->portname,
&DTMpt[ port ]->sockaddr ) < 0 ) {
DTMdestroyPort( DTMpt[port]->sockfd ) ;
DTMerrno = DTMTIMEOUT;
@@ -495,15 +495,15 @@ int dtm_map_port_internal( port )
if ( ( thePort ) >= DTMptCount ) {
DTMerrno = DTMBADPORT;
- return DTMERROR;
+ return DTMERROR;
}
if ( DTMpt[ thePort ] == NULL ) {
DTMerrno = DTMBADPORT;
- return DTMERROR;
+ return DTMERROR;
}
if ( ( port >> DTM_PORT_KEY_SHIFT ) != DTMpt[ thePort ]->key ) {
DTMerrno = DTMBADPORT;
- return DTMERROR;
+ return DTMERROR;
}
return thePort;
}
@@ -515,7 +515,7 @@ void dtm_map_port_external( port )
int32 *port;
#endif
{
- *port = *port | (DTMpt[ *port ]->key << DTM_PORT_KEY_SHIFT);
+ *port = *port | (DTMpt[ *port ]->key << DTM_PORT_KEY_SHIFT);
}
@@ -544,11 +544,11 @@ int DTMmakeInPort(portname, qservice )
CHECK_ERR(port = get_init_port(portname, INPORTTYPE, qservice ));
DBGMSG2("DTMmakeInPort port %d addr %X\n", port, DTMpt[port] );
- CHECK_ERR(dtm_init_sockaddr( &DTMpt[ port ]->sockaddr,
+ CHECK_ERR(dtm_init_sockaddr( &DTMpt[ port ]->sockaddr,
DTMpt[ port ]->portname, &fLogicalName ));
DTMpt[port]->fLogical = fLogicalName;
- if ((DTMpt[port]->sockfd = dtm_socket_init( &DTMpt[port]->sockaddr,
+ if ((DTMpt[port]->sockfd = dtm_socket_init( &DTMpt[port]->sockaddr,
INPORTTYPE, fLogicalName )) == DTMERROR ) {
free_port(port);
return DTMERROR ;
@@ -564,7 +564,7 @@ int DTMmakeInPort(portname, qservice )
/*
- DTMmakeOutPort()
+ DTMmakeOutPort()
Create and initialze a new port.
portname may be a logical or a physical port.
qservice is reserved for future use.
@@ -576,7 +576,7 @@ int DTMmakeOutPort(char *portname,int qservice )
int DTMmakeOutPort(portname, qservice )
char *portname;
int qservice ;
-#endif
+#endif
{
int port;
int fLogicalName = TRUE;
@@ -585,10 +585,10 @@ int DTMmakeOutPort(portname, qservice )
DBGFLOW("DTMmakeOutPort called.\n");
CHECK_ERR( (port = get_init_port( portname, OUTPORTTYPE, qservice)));
- CHECK_ERR((dtm_init_sockaddr(&addr, DTMpt[port]->portname,&fLogicalName)));
+ CHECK_ERR((dtm_init_sockaddr(&addr, DTMpt[port]->portname,&fLogicalName)));
DTMpt[port]->fLogical = fLogicalName;
- if( !fLogicalName ) CHECK_ERR( set_out_port_address( port, addr ));
+ if( !fLogicalName ) CHECK_ERR( set_out_port_address( port, addr ));
if( (DTMpt[port] -> sockfd = dtm_socket_init( &DTMpt[port] -> sockaddr,
OUTPORTTYPE, fLogicalName )) == DTMERROR ) {
@@ -614,7 +614,7 @@ int DTMdestroyPort(int port)
#else
int DTMdestroyPort(port)
int port;
-#endif
+#endif
{
reg DTMPORT *pp ;
@@ -634,7 +634,7 @@ int DTMdestroyPort(port)
if( pp -> porttype == INPORTTYPE ) {
register Inport *pcur ;
- FOR_EACH_IN_PORT( pcur, pp ) {
+ FOR_EACH_IN_PORT( pcur, pp ) {
if( pcur->fd != DTM_NO_CONNECTION ) {
if ( pp->Xcallback ) pp->XremoveInput( pcur->XinputId );
close( pcur->fd ) ;
@@ -643,11 +643,11 @@ int DTMdestroyPort(port)
} else {
register Outport *pcur ;
- FOR_EACH_OUT_PORT( pcur, pp ) {
+ FOR_EACH_OUT_PORT( pcur, pp ) {
if( pcur->connfd != DTM_NO_CONNECTION ) close( pcur->connfd ) ;
}
}
-
+
/* free space allocated for port */
free_port( port );
@@ -686,7 +686,7 @@ int DTMgetPortAddr(port, addr, length)
sprintf(pnum, ":%d", ntohs( DTMpt[port]->sockaddr.sin_port ) );
if ( strlen( pnum ) + strlen( addr ) + 1 > length ) {
DTMerrno = DTMBUFOVR;
- return DTMERROR;
+ return DTMERROR;
}
strcat(addr, pnum);
@@ -704,7 +704,7 @@ static char * dtm_addr_to_a( addr )
uint32 hnum = addr.sin_addr.s_addr;
unsigned char * p_hnum = (unsigned char *) &hnum;
- sprintf(addr_buf, "%d.%d.%d.%d:%d",
+ sprintf(addr_buf, "%d.%d.%d.%d:%d",
p_hnum[0], p_hnum[1], p_hnum[2], p_hnum[3], ntohs( addr.sin_port ));
return addr_buf;
}
diff --git a/libdtm/dtmint.h b/libdtm/dtmint.h
index 1f6a80d..c40f4fc 100644
--- a/libdtm/dtmint.h
+++ b/libdtm/dtmint.h
@@ -37,7 +37,7 @@
*
* Revision 1.28 92/05/05 22:27:50 jplevyak
* Corrected X interface code.
- *
+ *
* Revision 1.27 1992/04/30 20:27:05 jplevyak
* Changed Version to 2.3
*
@@ -62,13 +62,13 @@
*
* Revision 1.20 92/02/27 23:59:56 jplevyak
* Fixup prototype problems.
- *
+ *
* Revision 1.19 1992/01/30 19:28:50 jplevyak
* Add support for c++ type external definitions.
*
* Revision 1.18 92/01/24 18:45:50 jefft
* Removed prototypes for dtm_set_ and dtm_get_, added them to dtm.h
- *
+ *
* Revision 1.17 1991/12/16 19:44:04 jefft
* Fixed bug with defining of NULL macro
*
@@ -97,13 +97,13 @@
* Major reorganization. Made this file compatible with dtm.h. Moved
* redundant out. Added several configuration parameters, added
* prototypes for internally global functions.
- *
+ *
* Revision 1.9 91/09/18 15:28:50 jplevyak
* Added some external definitions for shared functions.
- *
+ *
* Revision 1.8 91/09/13 17:37:37 sreedhar
* MAX132 instead of MAXBUFSIZE
- *
+ *
* Revision 1.7 1991/08/15 19:10:53 sreedhar
* Changes for logical portname version
*
@@ -121,10 +121,10 @@
*
* Revision 1.2 90/11/21 12:35:44 jefft
* Removed trailing comma from DTM error enum type.
- *
+ *
* Revision 1.1 90/11/08 16:32:03 jefft
* Initial revision
- *
+ *
*/
@@ -147,7 +147,7 @@
#endif
/* Added to shut up the SGI compiler which quotes ANSI regulations at
- you.
+ you.
*/
#ifdef DTM_PROTOTYPES
struct sockaddr;
@@ -163,7 +163,7 @@ struct iovec;
#define INIT(x)
#endif
-#define reg register
+#define reg register
/*
@@ -261,7 +261,7 @@ struct iovec;
*/
#define MAX132 132 /* max space of 132 */
#define SEP " " /* blank as separator */
-#define COLON ":" /* colon as separator */
+#define COLON ":" /* colon as separator */
#ifndef NULL
# if defined( _STDC_ ) || defined( __STDC__ )
@@ -272,33 +272,33 @@ struct iovec;
#endif
#define FOR_EACH_OUT_PORT( pcur, pp ) \
- for ( pcur = pp->out; pcur != NULL ; pcur = pcur->next )
+ for ( pcur = pp->out; pcur != NULL ; pcur = pcur->next )
#define FOR_EACH_IN_PORT( inp, pp ) \
for ( inp = pp->in; inp != NULL ; inp = inp->next )
-/*
- PORT STRUCTURES
+/*
+ PORT STRUCTURES
*/
typedef struct sockaddr_in S_ADDR;
-typedef struct Port
+typedef struct Port
{
uint32 nethostid ;
uint16 portid ;
} Port ;
-typedef struct Outport
+typedef struct Outport
{
S_ADDR sockaddr ; /* Socket family, netid/hostid, portid */
- int32 connfd ; /* connection fd */
- int availwrite ; /* port availability for write */
- int seqstart ; /* "Sequence start" message sent or not */
- struct Outport * next; /* link to next outport */
+ int32 connfd ; /* connection fd */
+ int availwrite ; /* port availability for write */
+ int seqstart ; /* "Sequence start" message sent or not */
+ struct Outport * next; /* link to next outport */
} Outport ;
-#define DTM_NEW_DATASET -1
+#define DTM_NEW_DATASET -1
typedef struct Inport {
int32 fd; /* connection fds */
int32 blocklen; /* records no. of bytes read */
@@ -315,27 +315,27 @@ typedef struct Inport {
to restore the assertion
#endif
#endif
- XtInputId XinputId;
+ XtInputId XinputId;
#else
int XinputId;
#endif
struct Inport * next;
} Inport;
-typedef struct
+typedef struct
{
- S_ADDR sockaddr ;
+ S_ADDR sockaddr ;
/* Socket family, netid/hostid, portid */
- int32 sockfd ; /* Main socket of port
+ int32 sockfd ; /* Main socket of port
Outport - UDP socket
Inport - TCP socket
*/
#ifdef _XtIntrinsic_h
- XtInputId XinputId;
+ XtInputId XinputId;
#else
int XinputId;
#endif
-
+
int fLogical;
char portname[ PNAMELEN ] ; /* Logical portname */
@@ -375,11 +375,11 @@ typedef struct
GLOBAL VARIABLES
*/
-#define DTM_INITIALIZED (DTMpt != NULL)
+#define DTM_INITIALIZED (DTMpt != NULL)
#define DTM_PORTS_INITIAL 20
#define DTM_PORTS_GROW 20
global DTMPORT **DTMpt INIT( NULL );
-global int32 DTMptCount INIT( 0 );
+global int32 DTMptCount INIT( 0 );
global int32 DTMportSequenceNumber INIT( 1 );
#ifdef _ARCH_MSDOS
@@ -420,7 +420,7 @@ extern int dtm_nsend_sockaddr DTM_PROTO(( int fd, char * sendto_addr,
char * refname, char * portname, S_ADDR * sockaddr ));
extern Outport * dtm_new_out_port DTM_PROTO(( Port * port ));
#define DTM_PORT_MASK 0xFFFF
-#define DTM_PORT_KEY_SHIFT 16
+#define DTM_PORT_KEY_SHIFT 16
extern int dtm_map_port_internal DTM_PROTO(( int32 port ));
extern void dtm_map_port_external DTM_PROTO(( int32 * port ));
#define DTM_WAIT TRUE
@@ -433,26 +433,26 @@ extern int dtm_destroy_in_port DTM_PROTO(( Inport * inp, DTMPORT * pp ));
extern int dtm_writev_buffer DTM_PROTO(( int fd, struct iovec *iov,
int32 iovlen, int32 iovsize,
struct sockaddr * addr, int addrlen ));
-extern int dtm_read_buffer DTM_PROTO(( int d, int32 * blocklen,
+extern int dtm_read_buffer DTM_PROTO(( int d, int32 * blocklen,
void * buffer, int length ));
-extern int dtm_recv_header DTM_PROTO((int fd , void * header,
+extern int dtm_recv_header DTM_PROTO((int fd , void * header,
int length));
extern int dtm_read_header DTM_PROTO((int fd , void * header,
int length));
-extern int dtm_parse_ipaddr DTM_PROTO(( char * source,
+extern int dtm_parse_ipaddr DTM_PROTO(( char * source,
unsigned long * dest ));
extern int dtm_quick_select DTM_PROTO(( int socket, int32 * count ));
-extern int dtm_select DTM_PROTO(( int fd, int32 * count,
+extern int dtm_select DTM_PROTO(( int fd, int32 * count,
int32 time ));
-extern int dtm_accept DTM_PROTO(( int fd, S_ADDR * sn,
+extern int dtm_accept DTM_PROTO(( int fd, S_ADDR * sn,
struct timeval * timeout ));
extern int dtm_connect DTM_PROTO(( S_ADDR * sn, int * sockret ));
extern int dtm_quick_connect DTM_PROTO(( S_ADDR * sn, int * sockret ));
-extern int dmt_end_connect DTM_PROTO(( int32 socket ));
+extern int dmt_end_connect DTM_PROTO(( int32 socket ));
extern unsigned long dtm_get_ipaddr DTM_PROTO(( char * ipaddrstr ));
-extern int dtm_socket_init DTM_PROTO(( S_ADDR * sockaddr, int porttype,
+extern int dtm_socket_init DTM_PROTO(( S_ADDR * sockaddr, int porttype,
int fLogicalName ));
-extern int dtm_init_sockaddr DTM_PROTO(( S_ADDR * sockaddr,
+extern int dtm_init_sockaddr DTM_PROTO(( S_ADDR * sockaddr,
char * portname,
int * pfLogicalName ));
extern int dtm_ninit DTM_PROTO(( void ));
@@ -463,13 +463,13 @@ extern char * dtm_find_tag DTM_PROTO(( char *, char *));
extern int dtm_accept_read_connections DTM_PROTO(( DTMPORT *pp,int fWait ));
extern void dtm_set_Xcallback DTM_PROTO(( DTMPORT *pp, Inport * inp ));
#ifdef _XtIntrinsic_h
-extern void dtm_handle_in DTM_PROTO(( caddr_t client_data,
+extern void dtm_handle_in DTM_PROTO(( caddr_t client_data,
int * fd, XtInputId * in ));
#else
-extern void dtm_handle_in DTM_PROTO(( caddr_t client_data,
+extern void dtm_handle_in DTM_PROTO(( caddr_t client_data,
int * fd, void * in ));
#endif
-
+
#ifdef __cplusplus
};
#endif
diff --git a/libdtm/dtmmisc.c b/libdtm/dtmmisc.c
index 08dd506..b4f675b 100644
--- a/libdtm/dtmmisc.c
+++ b/libdtm/dtmmisc.c
@@ -48,7 +48,7 @@
*
* Revision 1.8 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.7 1992/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
@@ -58,7 +58,7 @@
*
* Revision 1.5 91/09/26 20:24:21 jplevyak
* Added debug.h as include file.
- *
+ *
* Revision 1.4 1991/06/11 15:19:36 sreedhar
* disclaimer added
*
@@ -70,7 +70,7 @@
*
* Revision 1.1 90/11/08 16:32:18 jefft
* Initial revision
- *
+ *
#endif
*/
@@ -341,7 +341,7 @@ int DTMgetGroup(h, cmd, parent, self)
}
else
*parent = '\0';
-
+
h = strchr(h, ' ')+1;
/* get self name */
diff --git a/libdtm/dtmnserv.c b/libdtm/dtmnserv.c
index 5e40291..1f3016f 100644
--- a/libdtm/dtmnserv.c
+++ b/libdtm/dtmnserv.c
@@ -53,7 +53,7 @@
*
* Revision 1.19 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
#endif
*/
@@ -76,7 +76,7 @@
#endif
#if !defined _ARCH_MACOS & !defined NEXT
-# ifdef CONVEX
+# ifdef CONVEX
# include
# else
# include
@@ -96,7 +96,7 @@ static void del_nlist DTM_PROTO(( DTMPORT *pp, int count ));
static void add_nlist DTM_PROTO(( DTMPORT *pp, int count ));
-/*
+/*
Function to initialise self's reference name from environment
variable passed by nameserver.
@@ -105,7 +105,7 @@ static void add_nlist DTM_PROTO(( DTMPORT *pp, int count ));
Notes : Environment variable - DTM_REFNAME
*/
-
+
#ifdef DTM_PROTOTYPES
static int init_refname(char *refname,int len )
#else
@@ -163,11 +163,11 @@ void dtm_display_buf( outp, portname )
DBGINT( "dtm_display_buf: Logical port %s\n", portname );
while ( outp != NULL );
{
- DBGINT( "dtm_display_buf: Nethostid = %x\n",
+ DBGINT( "dtm_display_buf: Nethostid = %x\n",
ntohl( outp -> sockaddr.sin_addr.s_addr) );
- DBGINT( "dtm_display_buf: Portid = %d\n",
+ DBGINT( "dtm_display_buf: Portid = %d\n",
ntohs( outp -> sockaddr.sin_port) );
- outp = outp->next;
+ outp = outp->next;
}
}
@@ -182,7 +182,7 @@ Outport * dtm_new_out_port(Port *port )
Outport * dtm_new_out_port( port )
Port * port;
#endif
-{
+{
Outport * p;
if ( (p = (Outport *) malloc( sizeof( Outport ))) == NULL ) {
@@ -226,8 +226,8 @@ static void del_nlist( pp, count )
outpLast = NULL;
for ( outp = pp->out ; outp != NULL ; outp = outpNext ) {
outpNext = outp->next;
- if ((outp->sockaddr.sin_port == port.portid ) &&
- (outp-> sockaddr.sin_addr.s_addr == port.nethostid)) {
+ if ((outp->sockaddr.sin_port == port.portid ) &&
+ (outp-> sockaddr.sin_addr.s_addr == port.nethostid)) {
if ( outpLast==NULL ) pp->out = outp->next;
else outpLast->next = outp->next;
free( outp );
@@ -276,9 +276,9 @@ int dtm_check_server( pp, fWait )
int addcount;
/* If it is not a logical port is is not listed with the server */
-
+
if ( !pp->fLogical ) return DTM_OK;
-
+
/* Check for new or first routing list */
fWait = fWait && (pp->out == NULL);
@@ -301,11 +301,11 @@ int dtm_check_server( pp, fWait )
/* Ack the route message */
#if 0
- CHECK_ERR( dtm_nsend_ackroute( portname ));
+ CHECK_ERR( dtm_nsend_ackroute( portname ));
#endif
/* Process the routing message */
-
+
{
char * msg_type = strtok( mbuf, SEP );
if (!strcmp( msg_type, MROUTEID)) {
@@ -318,7 +318,7 @@ int dtm_check_server( pp, fWait )
return addcount;
} else if ( !strcmp( msg_type, MDISCARD ) ) {
pp->fDiscard = atoi( strtok( NULL, SEP));
- }
+ }
}
}
return 0;
diff --git a/libdtm/dtmnserv.h b/libdtm/dtmnserv.h
index 00b2cd2..6fce7af 100644
--- a/libdtm/dtmnserv.h
+++ b/libdtm/dtmnserv.h
@@ -34,17 +34,17 @@
*
* Revision 1.5 92/04/30 20:27:05 jplevyak
* Changed Version to 2.3
- *
+ *
*/
/*
- Purpose : Header file for name server interaction
+ Purpose : Header file for name server interaction
Notes :
- Message format:
+ Message format:
- Portid - nethostid:portid
+ Portid - nethostid:portid
Header - opcode
DTM to nameserver
@@ -52,7 +52,7 @@
Send message length.
Mreg - Header refname portname Portid
- Mackroute - Header refname portname
+ Mackroute - Header refname portname
Nameserver to DTM
@@ -65,11 +65,11 @@
Nethostid is in dotted decimal notation of internet.
*/
-#define MREGID "REGISTER"
+#define MREGID "REGISTER"
#define MREG "%s %s %s %s:%d"
-#define MROUTEID "ROUTE"
+#define MROUTEID "ROUTE"
#define MROUTE "%s %d %d" /* %s:%d %s:%d .... */
-#define MACKROUTEID "ROUTE_ACK"
-#define MACKROUTE "%s %s %s"
+#define MACKROUTEID "ROUTE_ACK"
+#define MACKROUTE "%s %s %s"
#define MDISCARDID "DISCARD"
#define MDISCARD "%s %d"
diff --git a/libdtm/fatal.c b/libdtm/fatal.c
index cdba445..36964aa 100644
--- a/libdtm/fatal.c
+++ b/libdtm/fatal.c
@@ -48,7 +48,7 @@
*
* Revision 1.8 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.7 1992/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
@@ -64,10 +64,10 @@
* Added several new errors, changed the DTMerrmsg function to detect
* and return 'unknown error:' errors. Generally encorporated the
* good features of sherr (from the libtest directory).
- *
+ *
* Revision 1.3 91/06/25 20:13:28 creiman
* Removed varargs and dtm_fatal.
- *
+ *
* Revision 1.2 1991/06/11 15:19:57 sreedhar
* disclaimer added
*
@@ -133,11 +133,11 @@ char *DTMerrmsg(quiet)
int quiet;
#endif
{
- char * strUnknown = "unknown error: %d";
+ char * strUnknown = "unknown error: %d";
char strOut[60];
char * strErr;
- if ( DTMerrno < (sizeof(err_msg)/sizeof(char *)))
+ if ( DTMerrno < (sizeof(err_msg)/sizeof(char *)))
strErr = err_msg[(int)DTMerrno];
else {
sprintf( strOut, strUnknown, DTMerrno);
@@ -145,7 +145,7 @@ char *DTMerrmsg(quiet)
}
if (!quiet)
- fprintf(stderr, "\nDTMerrno = %d: %s\n", DTMerrno,
+ fprintf(stderr, "\nDTMerrno = %d: %s\n", DTMerrno,
strErr);
return strErr;
}
diff --git a/libdtm/mdd.c b/libdtm/mdd.c
index 8239455..6f1cc6e 100644
--- a/libdtm/mdd.c
+++ b/libdtm/mdd.c
@@ -22,7 +22,7 @@
/************************************************************************
**
** mdd.c - Multi-Dimensional Data set routines
-**
+**
*************************************************************************/
/*********************************************************************
@@ -53,7 +53,7 @@
*
* Revision 1.5 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.4 1992/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
@@ -185,7 +185,7 @@ int MDDgetMinMax(h, min, max)
h = strchr(h, ' ') + 1;
*max = (float)atof(h);
-
+
return 0;
}
diff --git a/libdtm/mdd.h b/libdtm/mdd.h
index 1167b0f..6cdb9c1 100644
--- a/libdtm/mdd.h
+++ b/libdtm/mdd.h
@@ -43,7 +43,7 @@
*
* Revision 1.4 92/04/30 20:27:05 jplevyak
* Changed Version to 2.3
- *
+ *
* Revision 1.3 1992/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
diff --git a/libdtm/ninit.c b/libdtm/ninit.c
index c1b9a96..9455a0c 100644
--- a/libdtm/ninit.c
+++ b/libdtm/ninit.c
@@ -47,14 +47,14 @@
*
* Revision 1.7 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
#endif
*/
/*
Purpose : Functions to initialise name server address, fd and to
- to return it.
+ to return it.
*/
#include
@@ -74,10 +74,10 @@
static struct sockaddr_in nsaddr ; /* name server's address */
static int nssockfd = -1 ; /* name server's socket */
-static char nameserver[ MAX132 ] ;
- /*
+static char nameserver[ MAX132 ] ;
+ /*
name server address -
- dotted decimal: port number
+ dotted decimal: port number
*/
/*
@@ -87,10 +87,10 @@ static char nameserver[ MAX132 ] ;
Return values : DTMERROR on error.
DTM_OK on success.
Notes :
- Environment variable format :
-
+ Environment variable format :
+
DTM_NAMESERVER=nethostid:portid
-
+
e.g. DTM_NAMESERVER=141.142.221.66:9900
*/
#ifdef DTM_PROTOTYPES
@@ -107,10 +107,10 @@ int dtm_ninit()
DTMERR( "dtm_ninit: Env not setup" );
return DTMERROR ;
}
-
+
/* Initialise name server's address, used in send() */
- strncpy( nameserver, p, MAX132 );
+ strncpy( nameserver, p, MAX132 );
DBGINT( "dtm_ninit: Nameserver is %s\n", nameserver );
@@ -126,11 +126,11 @@ int dtm_ninit()
*portstr++ = '\0';
- nsaddr.sin_addr.s_addr = inet_addr( p ) ;
+ nsaddr.sin_addr.s_addr = inet_addr( p ) ;
nsaddr.sin_port = (unsigned short)atol( portstr ) ;
DBGMSG1("dtm_ninit: Nethostid = %x\n", ntohl( nsaddr.sin_addr.s_addr) );
- DBGMSG1("dtm_ninit: Portid = %d\n", ntohs( nsaddr.sin_port) );
+ DBGMSG1("dtm_ninit: Portid = %d\n", ntohs( nsaddr.sin_port) );
}
/* Acquire socket to be used for sending to name server */
diff --git a/libdtm/nmsg.c b/libdtm/nmsg.c
index aa72f83..71dbef5 100644
--- a/libdtm/nmsg.c
+++ b/libdtm/nmsg.c
@@ -53,7 +53,7 @@
*
* Revision 1.15 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
#endif
*/
@@ -124,7 +124,7 @@ static int dtm_send_control( fd, msg, msize, sendto_addr )
sendaddr[ MAX132 - 1 ] = '\0' ;
sockaddr.sin_family = AF_INET ;
- CHECK_ERR( dtm_init_sockaddr( &sockaddr, sendaddr, &fLogical));
+ CHECK_ERR( dtm_init_sockaddr( &sockaddr, sendaddr, &fLogical));
/* Prepare iovec and send message length */
@@ -138,10 +138,10 @@ static int dtm_send_control( fd, msg, msize, sendto_addr )
{
DBGFLOW( "dtm_send_control: message length send error\n" );
return status ;
- }
+ }
/* Prepare iovec and send message */
-
+
iov[ 0 ].iov_base = msg ;
iov[ 0 ].iov_len = msize ;
@@ -168,10 +168,10 @@ int DTMsendDiscard( fd, sendto_addr, set_or_clear )
sprintf( mbuf, MDISCARD, MROUTEID, set_or_clear );
- DBGFLOW( "DTMsendDiscard: Message:- " );
+ DBGFLOW( "DTMsendDiscard: Message:- " );
DBGFLOW( mbuf ); DBGFLOW( "\n" );
- return dtm_send_control( fd, mbuf, (strlen( mbuf ) + 1), sendto_addr );
+ return dtm_send_control( fd, mbuf, (strlen( mbuf ) + 1), sendto_addr );
}
/*
@@ -193,8 +193,8 @@ int DTMsendDiscard( fd, sendto_addr, set_or_clear )
int DTMsendRoute(int fd,char *sendto_addr,int addcount,char **add_addresses,
int delcount, char **del_addresses )
#else
-int DTMsendRoute( fd, sendto_addr, addcount, add_addresses,
- delcount, del_addresses )
+int DTMsendRoute( fd, sendto_addr, addcount, add_addresses,
+ delcount, del_addresses )
int fd; /* output socket */
char *sendto_addr; /* destination address addr:port number */
int addcount; /* number of addresses to connect to */
@@ -212,18 +212,18 @@ int DTMsendRoute( fd, sendto_addr, addcount, add_addresses,
sprintf( mbuf, MROUTE, MROUTEID, delcount, addcount ) ;
while( delcount-- ) {
strncat( mbuf, " ", (MAX132-1));
- strncat( mbuf, del_addresses[ delcount ], (MAX132 - 1));
+ strncat( mbuf, del_addresses[ delcount ], (MAX132 - 1));
}
while( addcount-- ) {
strncat( mbuf, " ", (MAX132-1));
- strncat( mbuf, add_addresses[ addcount ], (MAX132 - 1));
+ strncat( mbuf, add_addresses[ addcount ], (MAX132 - 1));
}
- mbuf[ MAX132 - 1 ] = '\0' ;
+ mbuf[ MAX132 - 1 ] = '\0' ;
- DBGFLOW( "DTMsendRoute: Message:- " );
+ DBGFLOW( "DTMsendRoute: Message:- " );
DBGFLOW( mbuf ); DBGFLOW( "\n" );
- return dtm_send_control( fd, mbuf, (strlen( mbuf ) + 1), sendto_addr );
+ return dtm_send_control( fd, mbuf, (strlen( mbuf ) + 1), sendto_addr );
}
/*
@@ -254,10 +254,10 @@ int dtm_nsend_ackroute( portname )
sprintf( mbuf, MACKROUTE, MACKROUTEID, refname, portname );
mbuf[ MAX132 - 1 ] = '\0' ;
- DBGFLOW( "dtm_nsend_ackroute: Message:- " );
+ DBGFLOW( "dtm_nsend_ackroute: Message:- " );
DBGFLOW( mbuf ); DBGFLOW( "\n" );
- return dtm_send_control( fd, mbuf, (strlen( mbuf ) + 1), sendto_addr );
+ return dtm_send_control( fd, mbuf, (strlen( mbuf ) + 1), sendto_addr );
}
/*
@@ -326,7 +326,7 @@ int DTMrecvRegistration(fd, buffer, len)
messages and sending routing messages.
*/
-
+
#ifdef DTM_PROTOTYPES
int DTMmakeNameServerPort(char *portid)
#else
@@ -335,7 +335,7 @@ int DTMmakeNameServerPort(portid)
#endif
{
struct sockaddr_in saddr;
-
+
saddr.sin_family = AF_INET;
saddr.sin_addr.s_addr = htonl(0);
diff --git a/libdtm/ris.c b/libdtm/ris.c
index 65e7bfb..75536a6 100644
--- a/libdtm/ris.c
+++ b/libdtm/ris.c
@@ -47,7 +47,7 @@
*
* Revision 1.9 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.8 1992/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
@@ -57,13 +57,13 @@
*
* Revision 1.6 92/01/24 19:12:55 dweber
* *** empty log message ***
- *
+ *
* Revision 1.5 91/11/04 12:57:55 dweber
* Deleted (via comments) superfluous functions. Later to be removed.
- *
+ *
* Revision 1.4 91/09/26 20:26:11 jplevyak
* Use dtminit.h for access to internally global functions.
- *
+ *
* Revision 1.3 1991/06/11 15:21:05 sreedhar
* disclaimer added
*
diff --git a/libdtm/ris.h b/libdtm/ris.h
index a91ea49..652f1a7 100644
--- a/libdtm/ris.h
+++ b/libdtm/ris.h
@@ -34,29 +34,29 @@
*
* Revision 1.11 92/04/30 20:27:05 jplevyak
* Changed Version to 2.3
- *
+ *
* Revision 1.10 1992/02/21 13:48:04 dweber
* Fixed prototyping problem in RISgetType.
*
* Revision 1.9 92/02/18 16:22:04 dweber
* Added functions for setting/getting associated palette names.
* (RISsetPaletteName and RISgetPaletteName)
- *
+ *
* Revision 1.8 92/01/24 19:12:55 dweber
* *** empty log message ***
- *
+ *
* Revision 1.7 91/11/18 11:48:57 dweber
* Returned the RISsize definition and changed PALsize to PALelements for same reason
- *
+ *
* Revision 1.6 91/11/04 15:06:08 dweber
* Added PAL size commands
- *
+ *
* Revision 1.5 91/11/04 12:58:36 dweber
* Added RIS types and removed 8/24 bit distinction from class level.
- *
+ *
* Revision 1.4 91/09/10 15:07:32 jefft
* cleaned-up message class macros.
- *
+ *
* Revision 1.3 1991/06/11 15:23:04 sreedhar
* disclaimer added
*
@@ -65,7 +65,7 @@
*
* Revision 1.1 90/11/08 16:38:04 jefft
* Initial revision
- *
+ *
*/
diff --git a/libdtm/rwrtns.c b/libdtm/rwrtns.c
index 85d9c99..3ea068a 100644
--- a/libdtm/rwrtns.c
+++ b/libdtm/rwrtns.c
@@ -69,7 +69,7 @@
*
* Revision 1.19 92/05/14 19:27:48 jefft
* modified dtm_recv_reliable
- *
+ *
* Revision 1.18 1992/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
*
@@ -82,7 +82,7 @@
* Revision 1.15 92/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
- *
+ *
* Revision 1.14 1992/03/02 18:29:41 jplevyak
* Fixed bug in EAGAIN handling.
*
@@ -103,7 +103,7 @@
*
* Revision 1.7 91/08/20 15:56:06 sreedhar
* Removed unused functions - dtm_write_buffer, dtm_send, dtm_recv
- *
+ *
* Revision 1.6 1991/08/15 18:56:52 sreedhar
* Changes for logical portname version
*
@@ -159,8 +159,8 @@
CONTENTS
- dtm_read_buffer() - attempts to fill the next dtm buffer.
- dtm_recv_header() - Function to read header and return size.
+ dtm_read_buffer() - attempts to fill the next dtm buffer.
+ dtm_recv_header() - Function to read header and return size.
dtm_recv_ack() - receive message ackowledgement
tm_send_ack() - send message acknowledgement
dtm_writev_buffer() - sends the buffers to receiving process.
@@ -200,7 +200,7 @@ static int ready_bytes( d, length )
fd_set mask;
struct timeval timeout ;
-
+
/* set the select timeout value */
timeout.tv_sec = 2;
timeout.tv_usec = 0;
@@ -235,7 +235,7 @@ static int ready_bytes( d, length )
}
}
-
+
/*
Reliably read from a port in the face of signals and other
@@ -288,7 +288,7 @@ int dtm_recv_reliable( d, buffer, length )
}
/*
- * dtm_read_buffer() - attempts to fill the next dtm buffer. The
+ * dtm_read_buffer() - attempts to fill the next dtm buffer. The
* blocklen variable must be set to DTM_NEW_DATASET after each dataset
* to force recv_buffer to move the next dataset.
*/
@@ -307,8 +307,8 @@ int dtm_read_buffer(d, blocklen, buffer, length)
DBGMSG1("dtm_recv_buffer: attempting to read %d bytes.\n", length);
DBGMSG1("dtm_recv_buffer: initial blocklen = %d\n", *blocklen);
- /* if block length is DTM_NEW_DATASET this is a new dataset
- * get initial block count
+ /* if block length is DTM_NEW_DATASET this is a new dataset
+ * get initial block count
*/
if (*blocklen == DTM_NEW_DATASET) {
CHECK_ERR(dtm_recv_reliable(d, (char *)blocklen, 4));
@@ -320,8 +320,8 @@ int dtm_read_buffer(d, blocklen, buffer, length)
while (TRUE) {
/* if block length is 0, because last call to fill_buffer hit
- * the EOS or because this dataset is zero length, return 0
- * to indicate the end of dataset.
+ * the EOS or because this dataset is zero length, return 0
+ * to indicate the end of dataset.
*/
if (*blocklen == 0)
return 0;
@@ -335,7 +335,7 @@ int dtm_read_buffer(d, blocklen, buffer, length)
/* decrement block length, if 0 get next block length */
*blocklen -= (length - count);
- if (*blocklen == 0)
+ if (*blocklen == 0)
*blocklen = DTM_NEW_DATASET;
/* if block length is 0 now, the EOS will be returned on */
@@ -362,7 +362,7 @@ int dtm_read_buffer(d, blocklen, buffer, length)
DBGINT("blocklen = %d\n", *blocklen);
/* if block length is 0 now, the correct count will be */
- /* returned now, and EOS on the next call to fill_buffer */
+ /* returned now, and EOS on the next call to fill_buffer */
if (*blocklen == 0)
return count;
@@ -411,9 +411,9 @@ int dtm_read_header( fd, buf, buflen )
/*
dtm_recv_header()
- Function to read header and return size.
+ Function to read header and return size.
- Notes : If buffer is too small, dump remainder of header
+ Notes : If buffer is too small, dump remainder of header
and return error.
Actually, this is function to read length of data and
then to receive that much data - the data is called header
@@ -437,7 +437,7 @@ int dtm_recv_header( d, header, length )
DBGMSG1("dtm_recv_header: buf length = %d.\n", length);
/* get header length */
-
+
if( (readcnt = recvfrom(d, (char *)&headerlen, 4, 0, ( struct sockaddr *)&from,
( int *)&fromlen)) != 4) {
/* somehow hit EOF, return DTMEOF instead */
@@ -460,19 +460,19 @@ int dtm_recv_header( d, header, length )
return DTMERROR;
}
}
- }
+ }
LOCALINT(headerlen);
DBGMSG("dtm_recv_header: got length.\n");
- /* read the header */
+ /* read the header */
readcnt = (length > headerlen) ? headerlen : length ;
header = (void *) (((char *) header) + readcnt);
while(readcnt) {
- if( (tmp = recvfrom(d, ((char *)header) - readcnt, readcnt, 0,
- ( struct sockaddr *)&from, ( int *)&fromlen)) > 0)
+ if( (tmp = recvfrom(d, ((char *)header) - readcnt, readcnt, 0,
+ ( struct sockaddr *)&from, ( int *)&fromlen)) > 0)
readcnt -= tmp;
else {
DTMerrno = DTMREAD;
@@ -480,24 +480,24 @@ int dtm_recv_header( d, header, length )
}
}
- /* check for header greater than buffer size provided */
+ /* check for header greater than buffer size provided */
- if( length >= headerlen )
+ if( length >= headerlen )
return headerlen;
else {
/* discard remaining header */
readcnt = headerlen - length;
while (readcnt) {
- if ((tmp = recvfrom(d, dtm_discard, readcnt, 0,
- (struct sockaddr *)&from, (int *)&fromlen)) > 0)
+ if ((tmp = recvfrom(d, dtm_discard, readcnt, 0,
+ (struct sockaddr *)&from, (int *)&fromlen)) > 0)
readcnt -= tmp;
else {
DTMerrno = DTMREAD;
return DTMERROR;
}
}
-
+
DTMerrno = DTMHEADER;
return DTMERROR;
}
@@ -508,7 +508,7 @@ int dtm_recv_header( d, header, length )
Notes : Berkeley implementation returns 0 from recv
if socket connection breaks while waiting in
- recv system call. System V returns -1 and
+ recv system call. System V returns -1 and
ECONNRESET in errno for same error.
For historical reasons, DTMEOF is returned when
@@ -532,16 +532,16 @@ int dtm_recv_ack( d, ack )
if( (tmp = recv( d, (char *)ack, 4, 0 )) != 4 ) {
DBGINT( "Recv_ack errno = %d\n", errno ) ;
- if( tmp == 0 )
+ if( tmp == 0 )
/* Courtesy Berkeley */
DTMerrno = DTMEOF ;
else {
- if( errno == ECONNRESET )
+ if( errno == ECONNRESET )
/* Courtesy system V */
DTMerrno = DTMEOF;
- else
+ else
DTMerrno = DTMREAD;
}
return DTMERROR;
@@ -636,7 +636,7 @@ int dtm_writev_failed( fd, msgbuf, tmp )
for ( i = 0; i < msgbuf->msg_iovlen; i++ ) {
done -= iov[i].iov_len;
if ( done > 0 ) continue;
- if ( dtm_send_some( fd, iov[i].iov_base + done + iov[i].iov_len,
+ if ( dtm_send_some( fd, iov[i].iov_base + done + iov[i].iov_len,
(- done )) == DTMERROR )
return DTMERROR;
done = 0;
@@ -664,17 +664,17 @@ int dtm_writev_buffer( fd, iov, iovlen, iovsize, addr, addrlen )
int todo;
DBGINT("# dtm_writev_buffer called, fd %d.\n", fd );
-
- msgbuf.msg_name = (caddr_t)addr ;
+
+ msgbuf.msg_name = (caddr_t)addr ;
msgbuf.msg_namelen = addrlen ;
msgbuf.msg_iov = iov ;
msgbuf.msg_iovlen = iovlen ;
msgbuf.msg_accrights = 0 ;
- if( (tmp = sendmsg( fd, &msgbuf, 0 )) != iovsize )
+ if( (tmp = sendmsg( fd, &msgbuf, 0 )) != iovsize )
return dtm_writev_failed( fd, &msgbuf, tmp );
DBGINT( "dtm_writev_buffer tmp = %d\n", tmp );
-
+
return DTM_OK ;
}
diff --git a/libdtm/sdl.c b/libdtm/sdl.c
index 8100b54..2ae21ab 100644
--- a/libdtm/sdl.c
+++ b/libdtm/sdl.c
@@ -22,7 +22,7 @@
/************************************************************************
**
** sdl.c - Surface Description Language
-**
+**
*************************************************************************/
/*
@@ -43,20 +43,20 @@
*
* Revision 1.9 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.8 1992/04/06 15:58:56 jplevyak
* Fixed levels of indirection on some arguments for non-prototype
* machines.
*
* Revision 1.7 92/04/03 12:39:33 dweber
* Fixed SDLbounds bug.
- *
+ *
* Revision 1.6 92/04/03 12:33:10 dweber
* Added bounding box functions.
- *
+ *
* Revision 1.5 91/09/10 15:09:00 jefft
* I removed all functionality from this file, HA!
- *
+ *
* Revision 1.4 1991/07/18 16:29:15 jefft
* corrected the spelling of "primitive"
*
@@ -68,7 +68,7 @@
*
* Revision 1.1 90/11/08 16:38:33 jefft
* Initial revision
- *
+ *
*/
diff --git a/libdtm/sdl.h b/libdtm/sdl.h
index fd39c2e..5c1dc77 100644
--- a/libdtm/sdl.h
+++ b/libdtm/sdl.h
@@ -22,7 +22,7 @@
/**************************************************************************
**
** Surface Description Language include file - contains constants used
-** with the SDL header type.
+** with the SDL header type.
**
**
**
@@ -46,13 +46,13 @@
*
* Revision 1.13 92/04/30 20:27:05 jplevyak
* Changed Version to 2.3
- *
+ *
* Revision 1.12 1992/04/03 12:39:42 dweber
* Fixed SDLbounds bug.
*
* Revision 1.11 92/04/03 12:33:23 dweber
* Added bounding box functions.
- *
+ *
* Revision 1.10 1992/02/25 20:36:35 dweber
* Fixed another prototyping clash, SDLgetPrimitive.
*
@@ -64,10 +64,10 @@
*
* Revision 1.7 91/11/01 10:10:28 dweber
* Added SDLtristrip
- *
+ *
* Revision 1.6 91/09/10 15:07:55 jefft
* cleaned-up message class macros.
- *
+ *
* Revision 1.5 1991/07/25 22:22:27 jefft
* Added transformation triplet enum types
*
@@ -83,7 +83,7 @@
*
* Revision 1.1 90/11/08 16:38:51 jefft
* Initial revision
- *
+ *
*/
#ifndef SDL_INC
diff --git a/libdtm/sds.c b/libdtm/sds.c
index 19a74b3..8896f77 100644
--- a/libdtm/sds.c
+++ b/libdtm/sds.c
@@ -22,7 +22,7 @@
/************************************************************************
**
** sds.c - Scientific Data Set utility routines.
-**
+**
*************************************************************************/
/*
#ifdef RCSLOG
@@ -47,7 +47,7 @@
*
* Revision 1.12 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.11 1992/03/16 20:39:10 creiman
* Changed declaration of SDSgetMinMax to match prototype. (Changed doubles
* to floats)
@@ -67,22 +67,22 @@
*
* Revision 1.7 91/12/18 02:42:41 dweber
* Oops. Guess I forgot to change getRanks name.
- *
+ *
* Revision 1.6 1991/12/18 02:41:53 dweber
* Added SDSgetRank
*
* Revision 1.5 91/12/09 12:12:27 dweber
* Deleted the function SDSconvert
- *
+ *
* Revision 1.4 91/09/26 20:20:52 jplevyak
* Minor header file reorganization.
- *
+ *
* Revision 1.3 91/09/13 18:01:21 jplevyak
* Fixed minor bug w/extra argument in call.
- *
+ *
* Revision 1.2 91/06/11 15:20:50 sreedhar
* disclaimer added
- *
+ *
* Revision 1.1 1990/11/08 16:39:09 jefft
* Initial revision
*
@@ -213,7 +213,7 @@ int SDSgetMinMax(h, min, max)
h = strchr(h, ' ') + 1;
*max = (float)atof(h);
-
+
return 0;
}
diff --git a/libdtm/sds.h b/libdtm/sds.h
index 084ca0c..968eac4 100644
--- a/libdtm/sds.h
+++ b/libdtm/sds.h
@@ -41,7 +41,7 @@
*
* Revision 1.8 92/04/30 20:27:37 jplevyak
* Changed Version to 2.3
- *
+ *
* Revision 1.7 1992/03/16 21:03:18 creiman
* Changed SDSsetMinMax prototype to use floats. NOT related to the change in
* sds.c for SDSgetMinMax. This is getting confusing...
@@ -55,10 +55,10 @@
*
* Revision 1.4 92/01/24 19:13:51 dweber
* Added header lenght macros
- *
+ *
* Revision 1.3 91/09/10 15:07:10 jefft
* cleaned-up message class macros.
- *
+ *
* Revision 1.2 1991/06/11 15:22:52 sreedhar
* disclaimer added
*
@@ -97,7 +97,7 @@ extern "C" {
#endif
extern void SDSsetDimensions DTM_PROTO(( char* h, int rank, int *dims ));
-extern int SDSgetDimensions DTM_PROTO(( char* h, int * rank, int* dims,
+extern int SDSgetDimensions DTM_PROTO(( char* h, int * rank, int* dims,
int len ));
extern int SDSgetRank DTM_PROTO(( char* h, int * rank ));
extern int SDSnumElements DTM_PROTO(( int rank, int *dims ));
diff --git a/libdtm/sdsF.c b/libdtm/sdsF.c
index 5add5d9..6d00697 100644
--- a/libdtm/sdsF.c
+++ b/libdtm/sdsF.c
@@ -44,7 +44,7 @@
*
* Revision 1.5 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
#endif
diff --git a/libdtm/socket.c b/libdtm/socket.c
index 0be964a..5d92ded 100644
--- a/libdtm/socket.c
+++ b/libdtm/socket.c
@@ -52,14 +52,14 @@
*
* Revision 1.28 92/04/30 20:25:27 jplevyak
* Changed Version to 2.3.
- *
+ *
* Revision 1.27 1992/04/06 15:58:49 jplevyak
* Fixed minor problems for machines little Endian machines.
*
* Revision 1.26 92/03/10 22:07:10 jplevyak
* Added changed for PC/MAC from Quincey Koziol (koziol@ncsa.uiuc.edu)
* with modification.
- *
+ *
* Revision 1.25 1992/02/28 03:40:24 jplevyak
* int/long confict fix (no diff on workstations)
* ,
@@ -100,13 +100,13 @@
*
* Revision 1.14 91/09/26 20:21:55 jplevyak
* Cosmetics
- *
+ *
* Revision 1.13 91/09/18 15:33:08 jplevyak
* Added additional parameter to dtm_socket_init
- *
+ *
* Revision 1.12 91/09/13 20:28:52 sreedhar
* accept :9900 change
- *
+ *
* Revision 1.11 1991/09/13 20:13:35 sreedhar
* take current host as default
*
@@ -131,14 +131,14 @@
*
* Revision 1.3 90/11/21 12:43:15 jefft
* Fixed portibility problem with dtm_get_ipaddr.
- *
+ *
* Revision 1.2 90/11/21 10:54:18 jefft
* Added new routine, dtm_get_ipaddr. It returns an ascii string of the
* current hosts IP address.
- *
+ *
* Revision 1.1 90/11/08 16:39:40 jefft
* Initial revision
- *
+ *
*/
/*
@@ -197,7 +197,7 @@ static int buf_size = DTM_BUFF_SIZE;
/*
dtm_parse_ipaddr()
Check whetherer given address string is in dotted
- decimal notation and if so, to return the address in network byte
+ decimal notation and if so, to return the address in network byte
order.
Return values : TRUE, if in dotted decimal notation.
@@ -282,9 +282,9 @@ int dtm_select( s, count, time )
FD_SET( s, &filedes );
#ifdef __hpux
- if( (*count = select( 32, (int *)&filedes, (int *)NULL, (int *)NULL,
+ if( (*count = select( 32, (int *)&filedes, (int *)NULL, (int *)NULL,
#else
- if( (*count = select( 32, &filedes, (fd_set *)NULL, (fd_set *)NULL,
+ if( (*count = select( 32, &filedes, (fd_set *)NULL, (fd_set *)NULL,
#endif
&timeout ) )) {
ioctl( s, FIONREAD, count );
@@ -312,8 +312,8 @@ int dtm_accept( s, sn, timeout )
DBGFLOW( "dtm_accept called.\n");
DBGMSG1( "dtm_accept: sockfd = %d\n", s );
- /*
- Await connect for specified time period only.
+ /*
+ Await connect for specified time period only.
if timeout == NULL, it means just goahead and accept,
else wait for specified period and accept only if
@@ -321,12 +321,12 @@ int dtm_accept( s, sn, timeout )
*/
if ( timeout ) {
- fd_set readmask ;
+ fd_set readmask ;
fd_set *fchk = &readmask ;
int nf ;
FD_ZERO( fchk );
- FD_SET( s, fchk );
+ FD_SET( s, fchk );
#ifdef __hpux
nf = select( FD_SETSIZE, (int *)fchk, (int *)0, (int *)0, timeout );
@@ -337,7 +337,7 @@ int dtm_accept( s, sn, timeout )
DBGINT( "dtm_accept: select errno %d\n", errno );
DTMerrno = DTMSELECT ;
return DTMERROR ;
- }
+ }
if ( nf == 0 ) {
/* No connect request in specified time */
@@ -376,9 +376,9 @@ int dtm_connect(sn, s)
int refusedcount = 0;
DBGFLOW("dtm_connect called.\n");
- DBGINT( "dtm_connect: s_addr = %x\n",
+ DBGINT( "dtm_connect: s_addr = %x\n",
ntohl( sn -> sin_addr.s_addr ) );
- DBGINT( "dtm_connect: sin_port = %d\n",
+ DBGINT( "dtm_connect: sin_port = %d\n",
ntohs( sn -> sin_port ));
while (TRUE) {
@@ -411,7 +411,7 @@ int dtm_connect(sn, s)
/* connect complete, set working socket to original socket */
*s = d;
setsockopt(*s, IPPROTO_TCP, TCP_NODELAY, (char *)&d, sizeof d);
- setsockopt(*s, SOL_SOCKET, SO_SNDBUF, (char *)&buf_size,
+ setsockopt(*s, SOL_SOCKET, SO_SNDBUF, (char *)&buf_size,
sizeof(int));
return DTM_OK;
}
@@ -492,11 +492,11 @@ int dtm_end_connect(s)
/*
- Return values :
+ Return values :
On success,
Direct - host address in network byte order.
- Indirect - *ipaddr has host address in dotted
- decimal notation.
+ Indirect - *ipaddr has host address in dotted
+ decimal notation.
On error, 0.
Notes:
@@ -553,7 +553,7 @@ unsigned long dtm_get_ipaddr( ipaddrstr )
}
DBGINT( "dtm_get_ipaddr: dotted decimal address = '%s'\n", ipaddrstr );
- return inet_addr( ipaddrstr ) ;
+ return inet_addr( ipaddrstr ) ;
}
/*
@@ -576,17 +576,17 @@ int dtm_socket_init( sockaddr, porttype, fLogicalName )
int sockaddrsize = sizeof (struct sockaddr_in);
char buf[128];
- DBGMSG1( "dtm_socket_init: sockaddr -> s_addr = %x\n",
+ DBGMSG1( "dtm_socket_init: sockaddr -> s_addr = %x\n",
ntohl( sockaddr -> sin_addr.s_addr) );
- DBGMSG1( "dtm_socket_init: sockaddr -> sin_port = %d\n",
+ DBGMSG1( "dtm_socket_init: sockaddr -> sin_port = %d\n",
ntohs( sockaddr -> sin_port) );
- sockaddr -> sin_family = AF_INET ;
+ sockaddr -> sin_family = AF_INET ;
if ( fLogicalName ) {
- /*
- Logical name had been supplied for makeport.
+ /*
+ Logical name had been supplied for makeport.
Assign port from system ( sin_port = 0 ), and accept
- from all network interfaces for multi-homed host
+ from all network interfaces for multi-homed host
( INADDR_ANY ).
*/
sockaddr -> sin_addr.s_addr = htonl( INADDR_ANY );
@@ -606,7 +606,7 @@ int dtm_socket_init( sockaddr, porttype, fLogicalName )
}
if( (sockfd = socket( sockaddr -> sin_family, type, protocol )) < 0 ) {
- DTMerrno = DTMSOCK ;
+ DTMerrno = DTMSOCK ;
DBGINT( "dtm_socket_init: socket create error %d", errno );
return DTMERROR ;
}
@@ -623,27 +623,27 @@ int dtm_socket_init( sockaddr, porttype, fLogicalName )
DBGFLOW( "dtm_socket_init: Before bind\n" );
DBGINT( "dtm_socket_init: sockfd = %d\n", sockfd );
- DBGINT( "dtm_socket_init: sockaddr -> family = %d\n",
+ DBGINT( "dtm_socket_init: sockaddr -> family = %d\n",
sockaddr -> sin_family );
- DBGINT( "dtm_socket_init: sockaddr -> s_addr = %x\n",
+ DBGINT( "dtm_socket_init: sockaddr -> s_addr = %x\n",
ntohl( sockaddr -> sin_addr.s_addr) );
- DBGINT( "dtm_socket_init: sockaddr -> sin_port = %d\n",
+ DBGINT( "dtm_socket_init: sockaddr -> sin_port = %d\n",
ntohs( sockaddr -> sin_port) );
- if( bind( sockfd, (struct sockaddr *)sockaddr,
+ if( bind( sockfd, (struct sockaddr *)sockaddr,
sizeof( struct sockaddr_in ) ) < 0 ) {
DTMerrno = DTMSOCK ;
- DBGMSG1( "dtm_socket_init: could not bind to sockaddr, errno = %d\n",
+ DBGMSG1( "dtm_socket_init: could not bind to sockaddr, errno = %d\n",
errno );
return DTMERROR;
}
/* Listen at socket for TCP port, buffer for 5 pending connections */
- if( porttype == INPORTTYPE )
+ if( porttype == INPORTTYPE )
listen( sockfd, 5 );
- /*
+ /*
Get the actual assigned (port) address ( netid/hostid/portid )
- netid/hostid from dtm_get_ipaddr(),portid from getsockname().
@@ -667,9 +667,9 @@ int dtm_socket_init( sockaddr, porttype, fLogicalName )
}
DBGFLOW( "dtm_socket_init: Verify nethostid/portid\n" );
- DBGINT( "dtm_socket_init: Nethostid = %x\n",
- ntohl( sockaddr -> sin_addr.s_addr ) );
- DBGINT( "dtm_socket_init: Portid = %d \n",
+ DBGINT( "dtm_socket_init: Nethostid = %x\n",
+ ntohl( sockaddr -> sin_addr.s_addr ) );
+ DBGINT( "dtm_socket_init: Portid = %d \n",
ntohs( sockaddr -> sin_port ) );
DBGINT( "dtm_socket_init: exit sockfd = %d\n", sockfd );
@@ -719,7 +719,7 @@ int dtm_init_sockaddr( sockaddr, portname, pfLogicalName )
DBGFLOW( "dtm_init_sockaddr called\n" );
if( lportname[0] == ':' ) {
- host = NULL ;
+ host = NULL ;
port = lportname + 1;
} else {
if( (port = strchr( lportname, ':' )) == NULL ) {
@@ -728,7 +728,7 @@ int dtm_init_sockaddr( sockaddr, portname, pfLogicalName )
sockaddr -> sin_port = htons( 0 );
sockaddr -> sin_addr.s_addr = htonl(0);
*pfLogicalName = TRUE;
- DBGINT( "dtm_init_sockaddr: sin_port = %d\n",
+ DBGINT( "dtm_init_sockaddr: sin_port = %d\n",
ntohs( sockaddr->sin_port ));
return DTM_OK;
}
@@ -737,15 +737,15 @@ int dtm_init_sockaddr( sockaddr, portname, pfLogicalName )
}
*pfLogicalName = FALSE;
- /*
- Physical format - hostname is either in dotted decimal
+ /*
+ Physical format - hostname is either in dotted decimal
notation ( call ipaddr() ) or direct or missing.
*/
if( host == NULL ) {
gethostname( hostname, sizeof hostname );
host = hostname ;
- }
+ }
DBGINT( "dtm_init_sockaddr: host %s\n", host );
DBGINT( "dtm_init_sockaddr: port %s\n", port );
@@ -768,7 +768,7 @@ int dtm_init_sockaddr( sockaddr, portname, pfLogicalName )
/* Fill in port id */
sockaddr -> sin_port = htons((unsigned short)atol( port ));
- DBGINT( "dtm_init_sockaddr: nethostid = %x\n",
+ DBGINT( "dtm_init_sockaddr: nethostid = %x\n",
ntohl( sockaddr -> sin_addr.s_addr ));
DBGINT( "dtm_init_sockaddr: portid = %d\n", ntohs( sockaddr -> sin_port) );
diff --git a/libdtm/srv.h b/libdtm/srv.h
index 20d1f2b..723d71e 100644
--- a/libdtm/srv.h
+++ b/libdtm/srv.h
@@ -17,11 +17,11 @@
#define SRV_FUNC_LOCK_REQUEST 7
/**************************************************************
- *
+ *
* for a connect message:
* SRVclass SRVid SRV_FUNC_CONNECT SRVInPort SRVVString SRVnumber
* for a disconnect message:
- * SRVclass SRVid SRV_FUNC_DISCONNECT SRVInPort
+ * SRVclass SRVid SRV_FUNC_DISCONNECT SRVInPort
* for a lock:
* SRVclass SRVid SRV_FUNC_LOCK SRVLock
* for a lock:
@@ -31,7 +31,7 @@
* for a user leaving:
* SRVclass SRVid SRV_FUNC_REMOVE_USER SRVInPort
*/
-
+
/* SRVsetClass(char *header,char *title) */
/* SRVcompareClass(char *header,char *title, int maxTitleLength) */
diff --git a/libdtm/text.h b/libdtm/text.h
index 5c96b4c..1aab963 100644
--- a/libdtm/text.h
+++ b/libdtm/text.h
@@ -47,7 +47,7 @@
/* TXTsetReplaceAll(char *header) */
/* Boolean TXTshouldReplaceAll(char *header,int garbage) */
#define TXTsetReplaceAll(h) dtm_set_int(h,TXTra,1)
-#define TXTshouldReplaceAll(h,i) (dtm_get_int(h,TXTra,&(i)) == -1)?0:1
+#define TXTshouldReplaceAll(h,i) (dtm_get_int(h,TXTra,&(i)) == -1)?0:1
/* TXTsetDimension(char *header,int numBytes) */
/* TXTgetDimension(char *header,int &numBytes) */
diff --git a/libdtm/uio.h b/libdtm/uio.h
index 445a843..ebf78ad 100644
--- a/libdtm/uio.h
+++ b/libdtm/uio.h
@@ -21,7 +21,7 @@
/*********************************************************************
**
-* $Header: /X11/mosaic/cvsroot/xmosaic3/libdtm/uio.h,v 1.3 1995/01/12 02:33:40 spowers Exp $
+* $Header: /X11/mosaic/cvsroot/xmosaic3/libdtm/uio.h,v 1.3 1995/01/12 02:33:40 spowers Exp $
**
**********************************************************************/
@@ -34,7 +34,7 @@
*
* Revision 1.2 92/04/30 20:27:37 jplevyak
* Changed Version to 2.3
- *
+ *
* Revision 1.1 1992/03/06 22:51:22 jplevyak
* Initial revision
*
diff --git a/libdtm/vaxcvt.c b/libdtm/vaxcvt.c
index a31c178..6427923 100644
--- a/libdtm/vaxcvt.c
+++ b/libdtm/vaxcvt.c
@@ -298,7 +298,7 @@ int size;
}
else if (c1 & 0x60) { /* denormalized value */
register int shft;
-
+
shft = (c1 & 0x40) ? 1 : 2; /* shift needed to normalize */
/* shift mantissa */
/* note last bit of exp set to 1 implicitly */
@@ -533,7 +533,7 @@ int size;
}
else if (c1 & 0x0c) { /* denormalized value */
register int shft;
-
+
shft = (c1 & 0x08) ? 1 : 2; /* shift needed to normalize */
/* shift mantissa */
/* note last bit of exp set to 1 implicitly */
diff --git a/libdtm/x.c b/libdtm/x.c
index efa73f0..341c9ea 100644
--- a/libdtm/x.c
+++ b/libdtm/x.c
@@ -43,7 +43,7 @@
*
* Revision 1.4 92/05/05 22:27:50 jplevyak
* Corrected X interface code.
- *
+ *
* Revision 1.3 1992/05/04 22:05:55 jplevyak
* Declare DTMaddInput external
*
@@ -121,12 +121,12 @@ void dtm_handle_new_out( client_data, fd, id )
automatically handled.
*/
#ifdef DTM_PROTOTYPES
-int DTMaddInput( int p_ext, caddr_t condition,
+int DTMaddInput( int p_ext, caddr_t condition,
XtInputCallbackProc proc, caddr_t client_data )
#else
int DTMaddInput( p_ext, condition, proc, client_data )
int p_ext;
- caddr_t condition;
+ caddr_t condition;
XtInputCallbackProc proc;
caddr_t client_data;
#endif
@@ -148,14 +148,14 @@ int DTMaddInput( p_ext, condition, proc, client_data )
/*
Set up callback for new connections
*/
- XtAddInput( pp->sockfd, XtInputReadMask, dtm_handle_new_in,
+ XtAddInput( pp->sockfd, XtInputReadMask, dtm_handle_new_in,
(caddr_t) p );
FOR_EACH_IN_PORT( inp, pp ) {
- inp->XinputId = XtAddInput( inp->fd, XtInputReadMask,
+ inp->XinputId = XtAddInput( inp->fd, XtInputReadMask,
dtm_handle_in, (caddr_t) p );
}
} else {
- XtAddInput( pp->sockfd, XtInputReadMask, dtm_handle_new_out,
+ XtAddInput( pp->sockfd, XtInputReadMask, dtm_handle_new_out,
(caddr_t) p );
}
return DTM_OK;
diff --git a/libhtmlw/DrawingArea.c b/libhtmlw/DrawingArea.c
index 5326afa..0f4d14a 100644
--- a/libhtmlw/DrawingArea.c
+++ b/libhtmlw/DrawingArea.c
@@ -1,7 +1,7 @@
-/*
+/*
* A minimalistic constraint widget
*
- * Sun Sep 12 20:03:49 GMT 1993 Gustaf Neumann
+ * Sun Sep 12 20:03:49 GMT 1993 Gustaf Neumann
*/
#include "../config.h"
#ifndef MOTIF
@@ -70,7 +70,7 @@ DrawingAreaClassRec drawingAreaClassRec = {
{ /* constraint_class fields */
/* subresourses */ NULL,
/* subresource_count */ 0,
- /* constraint_size */ 0,
+ /* constraint_size */ 0,
/* initialize */ NULL, /*ConstraintInitialize,*/
/* destroy */ NULL,
/* set_values */ NULL, /*ConstraintSetValues,*/
@@ -157,9 +157,9 @@ static Boolean ConstraintSetValues(current, request, new, args, num_args)
Cardinal *num_args;
{
/*
- register DrawingAreaConstraints cfc =
+ register DrawingAreaConstraints cfc =
(DrawingAreaConstraints) current->core.constraints;
- register DrawingAreaConstraints nfc =
+ register DrawingAreaConstraints nfc =
(DrawingAreaConstraints) new->core.constraints;
*/
return( FALSE );
@@ -184,7 +184,7 @@ static XtGeometryResult PreferredGeometry( widget, request, reply )
{
/*
DrawingAreaWidget w = (DrawingAreaWidget)widget;
- */
+ */
return XtGeometryNo;
}
diff --git a/libhtmlw/DrawingArea.h b/libhtmlw/DrawingArea.h
index 2d8938f..50a7ff8 100644
--- a/libhtmlw/DrawingArea.h
+++ b/libhtmlw/DrawingArea.h
@@ -31,5 +31,5 @@ typedef struct _DrawingAreaClassRec *DrawingAreaWidgetClass;
typedef struct _DrawingAreaRec *DrawingAreaWidget;
extern WidgetClass drawingAreaWidgetClass;
-
+
#endif /* _XawDrawingArea_h */
diff --git a/libhtmlw/HTML-PSformat.c b/libhtmlw/HTML-PSformat.c
index 1997239..571402b 100644
--- a/libhtmlw/HTML-PSformat.c
+++ b/libhtmlw/HTML-PSformat.c
@@ -3,7 +3,7 @@
* Purpose: to parse Hypertext widget contents into appropriate PostScript
*
* Author: Ameet A. Raval & Frans van Hoesel & Andrew Ford
- * (aar@gfdl.gov & hoesel@chem.rug.nl).
+ * (aar@gfdl.gov & hoesel@chem.rug.nl).
* send bugreports to hoesel@chem.rug.nl
*
* Institution: for Ameet A. Raval:
@@ -24,7 +24,7 @@
* Montpelier, Bristol, BS6 5HR, GB
* E-mail: andrew@icarus.demon.co.uk
*
- * Date: 1 aug 1993
+ * Date: 1 aug 1993
* Modification: 8 nov 1993
* o added support for bold/italics courier
* o removed unused or no longer needed stuff
@@ -49,8 +49,8 @@
* WE MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
* ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
* WARRANTY. WE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE
- * USERS OF THIS SOFTWARE.
- *
+ * USERS OF THIS SOFTWARE.
+ *
* pieces of code are taken from xvps by kind
* permission of John Bradley.
*
@@ -121,7 +121,7 @@ extern int SwapElements();
PSprintf("%s\n", txt[i]) ; \
} \
}
-
+
/* STREQ tests whether two strings are equal. */
#define STREQ(a, b) (strcmp((a), (b)) == 0)
@@ -165,7 +165,7 @@ PAGE_DIMENS_T;
PAGE_DIMENS_T page_dimens;
PAGE_DIMENS_T a4_page_dimens = {
297 * MM,
- 210 * MM,
+ 210 * MM,
20 * MM,
20 * MM,
20 * MM,
@@ -201,7 +201,7 @@ extern Colormap installed_cmap;
* screen
*
*/
-static float
+static float
GetDpi(HTMLWidget hw)
{
Screen *s = XtScreen(hw);
@@ -228,17 +228,17 @@ GetDpi(HTMLWidget hw)
* in this call, otherwise it returns EOF (just as printf does)
*
*/
-static int
+static int
PSprintf(char *format, ...)
{
int len;
char *s;
va_list args;
- if (PS_size - PS_len < 1024)
+ if (PS_size - PS_len < 1024)
{
PS_size += 1024;
- if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
+ if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -254,7 +254,7 @@ PSprintf(char *format, ...)
/* this is a hack to make it work on systems were vsprintf(s,...)
* returns s, instead of the len.
*/
- if (len != EOF && len != 0)
+ if (len != EOF && len != 0)
PS_len += strlen(PS_string+PS_len);
va_end(args);
return(len);
@@ -270,13 +270,13 @@ PSprintf(char *format, ...)
* PSprintf).
*
*/
-static int
+static int
PShex(unsigned char val, int flush)
{
static unsigned char hexline[80];
static char digit[] = "0123456789abcdef";
- if (!flush)
+ if (!flush)
{
hexline[PS_hexi++] = (char) digit[((unsigned) val >>
(unsigned) 4) & (unsigned) 0x0f];
@@ -287,7 +287,7 @@ PShex(unsigned char val, int flush)
/* Changed from ">78" to ">77" on advice of
debra@info.win.tue.nl (Paul De Bra). */
- if ((flush && PS_hexi) || (PS_hexi>77))
+ if ((flush && PS_hexi) || (PS_hexi>77))
{
hexline[PS_hexi] = '\0';
PS_hexi=0;
@@ -306,13 +306,13 @@ PShex(unsigned char val, int flush)
*
*/
static void
-PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
+PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
{
PS_fontstyle fn;
int style, size;
int fs;
- static PS_fontstyle fontstyle[17] =
+ static PS_fontstyle fontstyle[17] =
{
RF, IF, BF, FF, BF, BF, BF, BF, BF,
BF, IF, FF, FF, FB, FI, FB, FI
@@ -323,7 +323,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
/* fontsizes as set in gui.c and in HTML.c (listing font is only
* defined in HTML.c)
*/
- static int fontsizes[4][3][17] =
+ static int fontsizes[4][3][17] =
{
/* times font sizes */
{
@@ -351,7 +351,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
}
};
- /* next is for each fontfamily the ascent value as given by the
+ /* next is for each fontfamily the ascent value as given by the
* medium sized bold x-font (the regular font has the same
* ascent value for both the medium and the large size Century
* font).
@@ -446,12 +446,12 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
/* check size, by looking at the size of the regular font */
size = 1;
- if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
+ if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
{
/* large font */
size = 2;
}
- else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
+ else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
{
/* small font */
size = 0;
@@ -460,7 +460,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
fs = fontsizes[fontfamily][size][style];
PS_fontascent = fontascent[fontfamily][size][style];
- if (fn != PS_oldfn || fs != PS_oldfs)
+ if (fn != PS_oldfn || fs != PS_oldfs)
{
PSprintf( "%2s %d SF\n", fnchar[fn], fs);
PS_oldfn=fn, PS_oldfs=fs;
@@ -475,26 +475,26 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
* Any accumulated footnotes are output and the outstanding footnote count
* reset to zero. Footnotes are preceded by a footnote rule and each footnote
* is consists of a raised mark and the footnote text (i.e. the url). The mark
- * is in a smaller font than the text. The ideas are filched from LaTeX.
+ * is in a smaller font than the text. The ideas are filched from LaTeX.
*/
static void
PSshowpage(void)
{
PSprintf("restore\n");
- if (n_saved_ftns > 0)
+ if (n_saved_ftns > 0)
{
int i;
- PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
+ PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
page_dimens.left_margin,
(page_dimens.bot_margin + (footnote_ptsize * n_saved_ftns) + 4),
(page_dimens.text_width * 0.4));
- for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
+ for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
{
- PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
+ PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
page_dimens.left_margin,
page_dimens.bot_margin + 5 + (n_saved_ftns - 1) * footnote_ptsize,
- (0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
+ (0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
footnote_ptsize, footnotes[i]);
}
PSprintf("grestore\n");
@@ -512,10 +512,10 @@ PSshowpage(void)
*
*/
static void
-PSnewpage(void)
+PSnewpage(void)
{
PS_curr_page++;
-
+
/* the PostScript reference Manual states that the Page: Tag
should have a label and a ordinal; otherwise programs like
psutils fail -gustaf */
@@ -534,7 +534,7 @@ PSnewpage(void)
* PSinit_latin1 - handle ISO encoding
*
* print out initializing PostScript text for ISO Latin1 font encoding
- * This code is copied from the Idraw program (from Stanford's InterViews
+ * This code is copied from the Idraw program (from Stanford's InterViews
* package), courtesy of Steinar Kjaernsr|d, steinar@ifi.uio.no
*
*/
@@ -595,7 +595,7 @@ PSinit_latin1(void)
*
*/
static void
-PSinit(void)
+PSinit(void)
{
PS_size = PS_len = PS_offset = PS_hexi = PS_page_offset = 0;
PS_start_y = 0;
@@ -637,8 +637,8 @@ PSinit(void)
* title title of document
* date date modified/printed
*/
-static void
-PSheader(char *title, int font, char *url, char *time_str)
+static void
+PSheader(char *title, int font, char *url, char *time_str)
{
static char *notitle="Untitled";
int set_to_null=0;
@@ -680,7 +680,7 @@ PSheader(char *title, int font, char *url, char *time_str)
time_t clock = time(NULL);
#if !defined(VMS) || defined (__DECC)
- strftime(time_buf, sizeof(time_buf),
+ strftime(time_buf, sizeof(time_buf),
"Printed %a %b %e %T %Y", localtime(&clock));
#else
sprintf(time_buf,"Printed %s",asctime(localtime(&clock)));
@@ -732,16 +732,16 @@ PSheader(char *title, int font, char *url, char *time_str)
PSprintf("/title (%s) D\n", title);
PSprintf("/date (%s) D\n", time_str);
PSconst_out(txt);
-
+
/* Output the newpage definition. */
-
+
PSprintf("/NP {");
- if (HTML_Print_Headers)
+ if (HTML_Print_Headers)
{
PSprintf("gsave 0.4 setlinewidth\n");
- PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
+ PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
page_dimens.left_margin,
- (page_dimens.bot_margin + page_dimens.text_height),
+ (page_dimens.bot_margin + page_dimens.text_height),
page_dimens.text_width);
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke\n",
page_dimens.left_margin, page_dimens.bot_margin,
@@ -751,7 +751,7 @@ PSheader(char *title, int font, char *url, char *time_str)
(page_dimens.bot_margin + page_dimens.text_height + 6), title);
PSprintf(" nstr cvs dup stringwidth pop pgno stringwidth pop add\n");
PSprintf(" %.2f E sub %.2f M pgno S S\n",
- (page_dimens.left_margin + page_dimens.text_width),
+ (page_dimens.left_margin + page_dimens.text_width),
(page_dimens.bot_margin + page_dimens.text_height + 6));
PSprintf(" BF 10 SF %.2f %.2f M (%s) S\n",
page_dimens.left_margin, page_dimens.bot_margin - 12, url);
@@ -760,11 +760,11 @@ PSheader(char *title, int font, char *url, char *time_str)
page_dimens.bot_margin - 12);
}
PSprintf(" %.2f %.2f translate %.5f %.5f scale } D\n",
- page_dimens.left_margin,
+ page_dimens.left_margin,
page_dimens.bot_margin + page_dimens.text_height,
Points_Pixel, Points_Pixel);
PSinit_latin1();
-
+
PSprintf("%%%%EndProlog\n");
if (set_to_null) {
@@ -802,9 +802,9 @@ PStrailer(void)
*
*/
static void
-PSmoveto(int x, int y)
+PSmoveto(int x, int y)
{
- if (y > PS_start_y + Pixels_Page)
+ if (y > PS_start_y + Pixels_Page)
{
PS_start_y = y;
PSshowpage();
@@ -824,7 +824,7 @@ PSmoveto(int x, int y)
static void
PSmove_offset(int offset)
{
- if (offset != PS_offset)
+ if (offset != PS_offset)
{
PSprintf("0 %d R\n", PS_offset - offset );
PS_offset = offset;
@@ -836,12 +836,12 @@ PSmove_offset(int offset)
* Return an indication of whether or not the current element has a footnote.
*
* an element has a footnote if it is text or an image and its anchorHRef is not null.
- * If the element is a textual element with an anchorHRef, that has been split across
+ * If the element is a textual element with an anchorHRef, that has been split across
* lines then it should be followed by a linefeed element and a text element with the
* same anchorHRef. In this case say that the element doesn't have a footnote so as
* to avoid duplicate footnotes.
*/
-static int
+static int
has_footnote(struct ele_rec *el)
{
int rc = 0;
@@ -904,10 +904,10 @@ has_footnote(struct ele_rec *el)
static void
PSfootnote(char *href, double height)
{
- PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
+ PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
height, footnote_ptsize, cur_ftn_no++);
- if (n_saved_ftns == ftn_array_size)
+ if (n_saved_ftns == ftn_array_size)
{
ftn_array_size += 16;
if (!footnotes) {
@@ -917,7 +917,7 @@ PSfootnote(char *href, double height)
footnotes = (char **)realloc((void *)footnotes,
(ftn_array_size * sizeof(char *)));
}
- if (footnotes == NULL)
+ if (footnotes == NULL)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -948,9 +948,9 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
unsigned char ch;
int underline = eptr->underline_number;
int ascent;
-
+
PSfont(hw, eptr->font, fontfamily); /* set font */
- if (PS_fontascent == 0)
+ if (PS_fontascent == 0)
ascent = eptr->font->ascent;
else
ascent = PS_fontascent;
@@ -961,7 +961,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
every character stored as an octal escape (worst case scenario). */
s2 = (String) malloc(strlen(s) * 4 + 1);
- if (s2 == NULL)
+ if (s2 == NULL)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -982,14 +982,14 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
*stmp++ = B_SLASH;
*stmp++ = ch;
}
- else if (ch > (unsigned char) MAX_ASCII)
+ else if (ch > (unsigned char) MAX_ASCII)
{
/* convert to octal */
*stmp++ = B_SLASH;
*stmp++ = ((ch >> 6) & 007) + '0';
*stmp++ = ((ch >> 3) & 007) + '0';
*stmp++ = (ch & 007) + '0';
- }
+ }
else
{
*stmp++ = ch;
@@ -997,7 +997,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
}
*(stmp) = '\0';
PSprintf("(%s)%c\n", s2, (underline)?'U':'S');
- if (HTML_Print_Footers && has_footnote(eptr))
+ if (HTML_Print_Footers && has_footnote(eptr))
{
PSfootnote(eptr->anchorHRef, 0.7 * ascent);
}
@@ -1012,10 +1012,10 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
* of two. The size of the higher level bullets is just somewhat smaller
*
*/
-static void
+static void
PSbullet(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
{
- int width = ( eptr->font->max_bounds.lbearing
+ int width = ( eptr->font->max_bounds.lbearing
+ eptr->font->max_bounds.rbearing);
int offset = eptr->y_offset + eptr->font->ascent;
int level = eptr->indent_level;
@@ -1123,7 +1123,7 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
* does the run-length encoding. This is done to reduce the file size and
* therefore the time to send the file to the printer. You get longer
* processing time instead.
- *
+ *
* rle is encoded as such:
* # 'run' of count+1 equal pixels
* # count+1 non-equal pixels
@@ -1131,18 +1131,18 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
*
* returns length of the rleline vector
*
-*/
+*/
static int
-PSrle_encode(unsigned char *scanline,
+PSrle_encode(unsigned char *scanline,
unsigned char *rleline,
- int wide)
+ int wide)
{
int i, j, blocklen, isrun, rlen;
unsigned char block[256], pix;
blocklen = isrun = rlen = 0;
- for (i = 0; i < wide; i++)
+ for (i = 0; i < wide; i++)
{
/* there are 5 possible states:
* 0: block empty.
@@ -1154,23 +1154,23 @@ PSrle_encode(unsigned char *scanline,
pix = scanline[i];
- if (!blocklen)
+ if (!blocklen)
{
/* case 0: empty */
block[blocklen++] = pix;
isrun = 1;
}
- else if (isrun)
+ else if (isrun)
{
if (pix == block[blocklen-1])
- {
+ {
/* case 1: isrun, prev==cur */
block[blocklen++] = pix;
}
- else
+ else
{
/* case 2: isrun, prev!=cur */
- if (blocklen>1)
+ if (blocklen>1)
{
/* we have a run block to flush */
rleline[rlen++] = blocklen-1;
@@ -1188,12 +1188,12 @@ PSrle_encode(unsigned char *scanline,
}
}
else
- {
+ {
/* not a run */
- if (pix == block[blocklen-1])
+ if (pix == block[blocklen-1])
{
/* case 3: non-run, prev==cur */
- if (blocklen>1)
+ if (blocklen>1)
{
/* have a non-run block to flush */
rleline[rlen++] = (blocklen-1) | 0x80;
@@ -1202,7 +1202,7 @@ PSrle_encode(unsigned char *scanline,
/* start new run block with pix */
block[0] = pix;
blocklen = isrun = 1;
- }
+ }
else
{
/* blocklen<=1 turn into a run */
@@ -1210,17 +1210,17 @@ PSrle_encode(unsigned char *scanline,
block[blocklen++] = pix;
}
}
- else
+ else
{
/* case 4: non-run, prev!=cur */
block[blocklen++] = pix;
}
}
-
+
/* max block length. flush */
if (blocklen == 128)
{
- if (isrun)
+ if (isrun)
{
rleline[rlen++] = blocklen-1;
rleline[rlen++] = block[0];
@@ -1256,7 +1256,7 @@ PSrle_encode(unsigned char *scanline,
/*
- * PScolor_image - created postscript colorimage operator
+ * PScolor_image - created postscript colorimage operator
*
* spits out code that checks if the PostScript device in question
* knows about the 'colorimage' operator. If it doesn't, it defines
@@ -1265,8 +1265,8 @@ PSrle_encode(unsigned char *scanline,
*
*/
-static void
-PScolor_image(void)
+static void
+PScolor_image(void)
{
static char *txt[] = {
@@ -1316,21 +1316,21 @@ PScolor_image(void)
PSconst_out(txt);
}
-
+
/*
* PScolormap - write colormap
*
* spits out code for the colormap of the following image
* if !color, it spits out a mono-ized graymap
- *
+ *
*/
static void
-PScolormap(int color,
- int nc,
- int *rmap,
- int *gmap,
- int *bmap)
+PScolormap(int color,
+ int nc,
+ int *rmap,
+ int *gmap,
+ int *bmap)
{
int i;
@@ -1340,12 +1340,12 @@ PScolormap(int color,
/* load up the colormap */
PSprintf("currentfile cmap readhexstring\n");
- for (i=0; i>8,
gmap[i]>>8, bmap[i]>>8);
- else
+ else
PSprintf("%02x ", MONO(rmap[i], gmap[i], bmap[i]));
if ((i%10) == 9)
PSprintf("\n");
@@ -1357,10 +1357,10 @@ PScolormap(int color,
/*
* PSrle_cmapimage - define rlecmapimage operator
- *
+ *
*/
static void
-PSrle_cmapimage(int color)
+PSrle_cmapimage(int color)
{
static char *txt[] = {
@@ -1413,11 +1413,11 @@ PSrle_cmapimage(int color)
};
PSconst_out(txt);
- if (color)
+ if (color)
{
PSconst_out(txt_color);
- }
- else
+ }
+ else
{
PSconst_out(txt_gray);
}
@@ -1439,14 +1439,14 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
int i, j;
int err=0;
unsigned char outbyte, bitnum, bit;
-
+
outbyte = bitnum = 0;
for (i=0; ipic_data;
unsigned char *imgp = img->image_data;
- int anchor = (eptr->anchorHRef != NULL);
+ int anchor = (eptr->anchorHRef != NULL);
int ncolors = img->num_colors;
int i, j;
int w = img->width;
@@ -1504,7 +1504,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
PSmove_offset(eptr->y_offset);
- if (anchor)
+ if (anchor)
{
/* draw an outline by drawing a slightly larger black square
* below the actual image
@@ -1515,8 +1515,8 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
PSprintf("grestore\n");
extra = 4;
}
-
- if (imgp == NULL)
+
+ if (imgp == NULL)
{
/* image was not available... do something instead
* draw an empty square for example
@@ -1534,20 +1534,20 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
return;
}
- /* this is a hack to see if the image is Black & White,
+ /* this is a hack to see if the image is Black & White,
* Greyscale or 8 bit color
* assume it's bw if it has only one or two colors, both some grey's
* assume it's greyscale if all the colors (>2) are grey
* Images with only one color do occur too.
*/
-
- if ( ( (ncolors == 2)
+
+ if ( ( (ncolors == 2)
&& ( (Isgray(img,0) && Isgray(img,1))
- || (Is_bg(img,0) && Is_fg(img,1))
+ || (Is_bg(img,0) && Is_fg(img,1))
|| (Is_fg(img,0) && Is_bg(img,1)) ))
|| ( (ncolors == 1)
&& (Isgray(img,0)
- || Is_bg(img,0)
+ || Is_bg(img,0)
|| Is_fg(img,0))))
{
colortype = F_BWDITHER;
@@ -1569,13 +1569,13 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
}
}
}
-
+
/* build a temporary dictionary */
PSprintf("20 dict begin\n\n");
/* define string to hold a scanline's worth of data */
PSprintf("/pix %d string def\n\n", slen);
-
+
/* position and scaling */
PSprintf("gsave currentpoint %d sub translate", h);
if (anchor)
@@ -1583,45 +1583,45 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
else
PSprintf(" 0 2 translate");
PSprintf(" %d %d scale\n", w, h);
-
- if (colortype == F_BWDITHER)
+
+ if (colortype == F_BWDITHER)
{
/* 1-bit dither code uses 'image' */
int flipbw = 0;
-
+
/* set if color#0 is 'white' */
if ((ncolors == 2 &&
MONO(img->reds[0], img->greens[0],img->blues[0]) >
MONO(img->reds[1], img->greens[1], img->blues[1])) ||
- (ncolors == 1 &&
+ (ncolors == 1 &&
MONO(img->reds[0], img->greens[0],img->blues[0]) >
MONO(127, 127, 127) ))
{
- flipbw=1;
+ flipbw=1;
}
-
+
/* dimensions of data */
PSprintf("%d %d %d\n", w, h, bits);
-
+
/* mapping matrix */
PSprintf("[%d 0 0 %d 0 %d]\n\n", w, -h, h);
-
+
PSprintf("{currentfile pix readhexstring pop}\n");
PSprintf("image\n");
/* write the actual image data */
err = PSwrite_bw(imgp, w, h, flipbw);
- }
+ }
else
{
/* all other formats */
unsigned char *rleline = (unsigned char *) NULL;
int rlen;
-
+
/* if we're using color, make sure 'colorimage' is defined */
if (colorps)
PScolor_image();
-
+
PScolormap(colorps, ncolors, img->reds, img->greens, img->blues);
PSrle_cmapimage(colorps);
@@ -1630,9 +1630,9 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
/* mapping matrix */
PSprintf("[%d 0 0 %d 0 %d]\n", w, -h, h);
PSprintf("rlecmapimage\n");
-
+
rleline = (unsigned char *) malloc(w * 2);
- if (!rleline)
+ if (!rleline)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -1643,7 +1643,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
return;
}
- for (i=0; ianchorHRef, 2.0);
@@ -1699,11 +1699,11 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
* 2: new century schoolbook
* 3: lucida
*/
-String ParseTextToPSString(HTMLWidget hw,
+String ParseTextToPSString(HTMLWidget hw,
struct ele_rec *elist,
struct ele_rec *startp,
struct ele_rec *endp,
- int start_pos,
+ int start_pos,
int end_pos,
int space_width,
int lmargin,
@@ -1720,11 +1720,11 @@ String ParseTextToPSString(HTMLWidget hw,
struct ele_rec *end;
struct ele_rec *last;
struct ele_rec *tmpptr;
- unsigned long fg_pixel, bg_pixel;
+ unsigned long fg_pixel, bg_pixel;
int footnotes_this_page = 0;
int footnotes_this_line;
int reserved_space;
-
+
if (startp == NULL)
return(NULL);
@@ -1733,17 +1733,17 @@ String ParseTextToPSString(HTMLWidget hw,
* Get the foreground and background colors so we can check later
* for black&white documents
*/
- XtVaGetValues (hw->html.view,
+ XtVaGetValues (hw->html.view,
#ifdef MOTIF
XtNforeground, &fg_pixel,
#endif
- XtNbackground, &bg_pixel,
+ XtNbackground, &bg_pixel,
NULL);
#ifndef MOTIF
- XtVaGetValues ((Widget)hw,
+ XtVaGetValues ((Widget)hw,
XtNforeground, &fg_pixel,
NULL);
-#endif
+#endif
fg_color.pixel = fg_pixel;
bg_color.pixel = bg_pixel;
XQueryColor(XtDisplay(hw->html.view),
@@ -1758,12 +1758,12 @@ String ParseTextToPSString(HTMLWidget hw,
DefaultColormap(XtDisplay(hw->html.view),
DefaultScreen(XtDisplay(hw->html.view)))),
&bg_color);
-
+
/* this piece of code is needed if the user selects a portion
* of the document with the mouse.
* I think it will never be used, but I left it in anyway. F.
*/
- if (SwapElements(startp, endp, start_pos, end_pos))
+ if (SwapElements(startp, endp, start_pos, end_pos))
{
start = endp;
end = startp;
@@ -1776,7 +1776,7 @@ String ParseTextToPSString(HTMLWidget hw,
start = startp;
end = endp;
}
-
+
/* Setup page size according to user preference. */
if (HTML_Print_Paper_Size_A4)
@@ -1785,10 +1785,10 @@ String ParseTextToPSString(HTMLWidget hw,
page_dimens = us_letter_page_dimens;
page_dimens.text_height = ( page_dimens.page_height
- - page_dimens.top_margin
+ - page_dimens.top_margin
- page_dimens.bot_margin);
page_dimens.text_width = ( page_dimens.page_width
- - page_dimens.left_margin
+ - page_dimens.left_margin
- page_dimens.right_margin);
/* Calculate the number of Postscript points per pixel of current
@@ -1808,10 +1808,10 @@ String ParseTextToPSString(HTMLWidget hw,
* wide), but I guess that the hw->html.doc_width includes some
* left and right margins, so it seems to work in practice.
*/
- if (pagewidth > page_dimens.text_width)
+ if (pagewidth > page_dimens.text_width)
Points_Pixel = Points_Pixel * page_dimens.text_width / pagewidth;
- Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
-
+ Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
+
PSinit();
PSheader(hw->html.title, fontfamily, url, time_str);
PSnewpage();
@@ -1819,14 +1819,14 @@ String ParseTextToPSString(HTMLWidget hw,
last = start;
eptr = start;
- while ((eptr != NULL) && (eptr != end))
+ while ((eptr != NULL) && (eptr != end))
{
/* Skip the special internal text added for multi-page
* documents.
*/
- if (eptr->internal == True)
+ if (eptr->internal == True)
{
- if (eptr->type == E_LINEFEED)
+ if (eptr->type == E_LINEFEED)
{
PS_page_offset += eptr->line_height;
}
@@ -1835,14 +1835,14 @@ String ParseTextToPSString(HTMLWidget hw,
}
/* check if this is a newline */
- if (line != eptr->line_number)
+ if (line != eptr->line_number)
{
/* calculate max height */
height = 0;
footnotes_this_line = 0;
line = eptr->line_number;
tmpptr = eptr;
- while (tmpptr != NULL && tmpptr->line_number == line)
+ while (tmpptr != NULL && tmpptr->line_number == line)
{
if (tmpptr->line_height > height)
height = tmpptr->line_height;
@@ -1856,18 +1856,18 @@ String ParseTextToPSString(HTMLWidget hw,
xpos = 0;
/* check if line fits completly on page */
-
+
reserved_space = 0;
- if (footnotes_this_page || footnotes_this_line)
+ if (footnotes_this_page || footnotes_this_line)
{
reserved_space = ( ( footnote_space
+ ( footnote_ptsize
- * ( footnotes_this_page
+ * ( footnotes_this_page
+ footnotes_this_line)))
/ Points_Pixel);
}
- if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
+ if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
{
PS_start_y = ypos;
PSshowpage();
@@ -1877,24 +1877,24 @@ String ParseTextToPSString(HTMLWidget hw,
footnotes_this_page += footnotes_this_line;
PSmoveto( xpos, ypos);
}
-
- switch (eptr->type)
+
+ switch (eptr->type)
{
case E_TEXT:
PStext(hw, eptr, fontfamily,
(String)((eptr == start) ? (eptr->edata + start_pos) : eptr->edata));
break;
- case E_BULLET:
+ case E_BULLET:
PSbullet(hw, eptr, fontfamily);
break;
- case E_IMAGE:
+ case E_IMAGE:
PSimage(hw, eptr, fontfamily);
break;
- case E_LINEFEED:
+ case E_LINEFEED:
break;
case E_HRULE:
@@ -1913,7 +1913,7 @@ String ParseTextToPSString(HTMLWidget hw,
last = eptr;
eptr = eptr->next;
}
-
+
PSshowpage();
PStrailer();
diff --git a/libhtmlw/HTML-PSformat.c.org b/libhtmlw/HTML-PSformat.c.org
index 66d4687..62abd86 100644
--- a/libhtmlw/HTML-PSformat.c.org
+++ b/libhtmlw/HTML-PSformat.c.org
@@ -3,7 +3,7 @@
* Purpose: to parse Hypertext widget contents into appropriate PostScript
*
* Author: Ameet A. Raval & Frans van Hoesel & Andrew Ford
- * (aar@gfdl.gov & hoesel@chem.rug.nl).
+ * (aar@gfdl.gov & hoesel@chem.rug.nl).
* send bugreports to hoesel@chem.rug.nl
*
* Institution: for Ameet A. Raval:
@@ -24,7 +24,7 @@
* Montpelier, Bristol, BS6 5HR, GB
* E-mail: andrew@icarus.demon.co.uk
*
- * Date: 1 aug 1993
+ * Date: 1 aug 1993
* Modification: 8 nov 1993
* o added support for bold/italics courier
* o removed unused or no longer needed stuff
@@ -49,8 +49,8 @@
* WE MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
* ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
* WARRANTY. WE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE
- * USERS OF THIS SOFTWARE.
- *
+ * USERS OF THIS SOFTWARE.
+ *
* pieces of code are taken from xvps by kind
* permission of John Bradley.
*
@@ -121,7 +121,7 @@ extern int SwapElements();
PSprintf("%s\n", txt[i]) ; \
} \
}
-
+
/* STREQ tests whether two strings are equal. */
#define STREQ(a, b) (strcmp((a), (b)) == 0)
@@ -165,7 +165,7 @@ PAGE_DIMENS_T;
PAGE_DIMENS_T page_dimens;
PAGE_DIMENS_T a4_page_dimens = {
297 * MM,
- 210 * MM,
+ 210 * MM,
20 * MM,
20 * MM,
20 * MM,
@@ -201,7 +201,7 @@ extern Colormap installed_cmap;
* screen
*
*/
-static float
+static float
GetDpi(HTMLWidget hw)
{
Screen *s = XtScreen(hw);
@@ -228,7 +228,7 @@ GetDpi(HTMLWidget hw)
* in this call, otherwise it returns EOF (just as printf does)
*
*/
-static int
+static int
PSprintf(format, va_alist)
char* format;
va_dcl
@@ -237,10 +237,10 @@ PSprintf(format, va_alist)
char *s;
va_list args;
- if (PS_size - PS_len < 1024)
+ if (PS_size - PS_len < 1024)
{
PS_size += 1024;
- if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
+ if ((s = (char *) realloc(PS_string, PS_size)) == NULL)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -256,7 +256,7 @@ PSprintf(format, va_alist)
/* this is a hack to make it work on systems were vsprintf(s,...)
* returns s, instead of the len.
*/
- if (len != EOF && len != 0)
+ if (len != EOF && len != 0)
PS_len += strlen(PS_string+PS_len);
va_end(args);
return(len);
@@ -272,13 +272,13 @@ PSprintf(format, va_alist)
* PSprintf).
*
*/
-static int
+static int
PShex(unsigned char val, int flush)
{
static unsigned char hexline[80];
static char digit[] = "0123456789abcdef";
- if (!flush)
+ if (!flush)
{
hexline[PS_hexi++] = (char) digit[((unsigned) val >>
(unsigned) 4) & (unsigned) 0x0f];
@@ -289,7 +289,7 @@ PShex(unsigned char val, int flush)
/* Changed from ">78" to ">77" on advice of
debra@info.win.tue.nl (Paul De Bra). */
- if ((flush && PS_hexi) || (PS_hexi>77))
+ if ((flush && PS_hexi) || (PS_hexi>77))
{
hexline[PS_hexi] = '\0';
PS_hexi=0;
@@ -308,13 +308,13 @@ PShex(unsigned char val, int flush)
*
*/
static void
-PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
+PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
{
PS_fontstyle fn;
int style, size;
int fs;
- static PS_fontstyle fontstyle[17] =
+ static PS_fontstyle fontstyle[17] =
{
RF, IF, BF, FF, BF, BF, BF, BF, BF,
BF, IF, FF, FF, FB, FI, FB, FI
@@ -325,7 +325,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
/* fontsizes as set in gui.c and in HTML.c (listing font is only
* defined in HTML.c)
*/
- static int fontsizes[4][3][17] =
+ static int fontsizes[4][3][17] =
{
/* times font sizes */
{
@@ -353,7 +353,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
}
};
- /* next is for each fontfamily the ascent value as given by the
+ /* next is for each fontfamily the ascent value as given by the
* medium sized bold x-font (the regular font has the same
* ascent value for both the medium and the large size Century
* font).
@@ -448,12 +448,12 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
/* check size, by looking at the size of the regular font */
size = 1;
- if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
+ if (hw->html.bold_font->ascent > medium_fontascent[fontfamily])
{
/* large font */
size = 2;
}
- else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
+ else if (hw->html.bold_font->ascent < medium_fontascent[fontfamily])
{
/* small font */
size = 0;
@@ -462,7 +462,7 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
fs = fontsizes[fontfamily][size][style];
PS_fontascent = fontascent[fontfamily][size][style];
- if (fn != PS_oldfn || fs != PS_oldfs)
+ if (fn != PS_oldfn || fs != PS_oldfs)
{
PSprintf( "%2s %d SF\n", fnchar[fn], fs);
PS_oldfn=fn, PS_oldfs=fs;
@@ -477,26 +477,26 @@ PSfont(HTMLWidget hw, XFontStruct *font, int fontfamily)
* Any accumulated footnotes are output and the outstanding footnote count
* reset to zero. Footnotes are preceded by a footnote rule and each footnote
* is consists of a raised mark and the footnote text (i.e. the url). The mark
- * is in a smaller font than the text. The ideas are filched from LaTeX.
+ * is in a smaller font than the text. The ideas are filched from LaTeX.
*/
static void
PSshowpage(void)
{
PSprintf("restore\n");
- if (n_saved_ftns > 0)
+ if (n_saved_ftns > 0)
{
int i;
- PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
+ PSprintf("gsave 0.2 setlinewidth newpath %.2f %.2f M %.2f 0 RL stroke\n",
page_dimens.left_margin,
(page_dimens.bot_margin + (footnote_ptsize * n_saved_ftns) + 4),
(page_dimens.text_width * 0.4));
- for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
+ for (i = 0; n_saved_ftns; n_saved_ftns--, i++)
{
- PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
+ PSprintf("newpath %.2f %.2f M RF %.2f SF (%d) S 3 -2 R RF %d SF (%s) S\n",
page_dimens.left_margin,
page_dimens.bot_margin + 5 + (n_saved_ftns - 1) * footnote_ptsize,
- (0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
+ (0.7 * footnote_ptsize), cur_ftn_no - n_saved_ftns,
footnote_ptsize, footnotes[i]);
}
PSprintf("grestore\n");
@@ -514,10 +514,10 @@ PSshowpage(void)
*
*/
static void
-PSnewpage(void)
+PSnewpage(void)
{
PS_curr_page++;
-
+
/* the PostScript reference Manual states that the Page: Tag
should have a label and a ordinal; otherwise programs like
psutils fail -gustaf */
@@ -536,7 +536,7 @@ PSnewpage(void)
* PSinit_latin1 - handle ISO encoding
*
* print out initializing PostScript text for ISO Latin1 font encoding
- * This code is copied from the Idraw program (from Stanford's InterViews
+ * This code is copied from the Idraw program (from Stanford's InterViews
* package), courtesy of Steinar Kjaernsr|d, steinar@ifi.uio.no
*
*/
@@ -597,7 +597,7 @@ PSinit_latin1(void)
*
*/
static void
-PSinit(void)
+PSinit(void)
{
PS_size = PS_len = PS_offset = PS_hexi = PS_page_offset = 0;
PS_start_y = 0;
@@ -639,8 +639,8 @@ PSinit(void)
* title title of document
* date date modified/printed
*/
-static void
-PSheader(char *title, int font, char *url, char *time_str)
+static void
+PSheader(char *title, int font, char *url, char *time_str)
{
static char *notitle="Untitled";
int set_to_null=0;
@@ -682,7 +682,7 @@ PSheader(char *title, int font, char *url, char *time_str)
time_t clock = time(NULL);
#if !defined(VMS) || defined (__DECC)
- strftime(time_buf, sizeof(time_buf),
+ strftime(time_buf, sizeof(time_buf),
"Printed %a %b %e %T %Y", localtime(&clock));
#else
sprintf(time_buf,"Printed %s",asctime(localtime(&clock)));
@@ -734,16 +734,16 @@ PSheader(char *title, int font, char *url, char *time_str)
PSprintf("/title (%s) D\n", title);
PSprintf("/date (%s) D\n", time_str);
PSconst_out(txt);
-
+
/* Output the newpage definition. */
-
+
PSprintf("/NP {");
- if (HTML_Print_Headers)
+ if (HTML_Print_Headers)
{
PSprintf("gsave 0.4 setlinewidth\n");
- PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
+ PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke",
page_dimens.left_margin,
- (page_dimens.bot_margin + page_dimens.text_height),
+ (page_dimens.bot_margin + page_dimens.text_height),
page_dimens.text_width);
PSprintf(" newpath %.2f %.2f M %.2f 0 RL stroke\n",
page_dimens.left_margin, page_dimens.bot_margin,
@@ -753,7 +753,7 @@ PSheader(char *title, int font, char *url, char *time_str)
(page_dimens.bot_margin + page_dimens.text_height + 6), title);
PSprintf(" nstr cvs dup stringwidth pop pgno stringwidth pop add\n");
PSprintf(" %.2f E sub %.2f M pgno S S\n",
- (page_dimens.left_margin + page_dimens.text_width),
+ (page_dimens.left_margin + page_dimens.text_width),
(page_dimens.bot_margin + page_dimens.text_height + 6));
PSprintf(" BF 10 SF %.2f %.2f M (%s) S\n",
page_dimens.left_margin, page_dimens.bot_margin - 12, url);
@@ -762,11 +762,11 @@ PSheader(char *title, int font, char *url, char *time_str)
page_dimens.bot_margin - 12);
}
PSprintf(" %.2f %.2f translate %.5f %.5f scale } D\n",
- page_dimens.left_margin,
+ page_dimens.left_margin,
page_dimens.bot_margin + page_dimens.text_height,
Points_Pixel, Points_Pixel);
PSinit_latin1();
-
+
PSprintf("%%%%EndProlog\n");
if (set_to_null) {
@@ -804,9 +804,9 @@ PStrailer(void)
*
*/
static void
-PSmoveto(int x, int y)
+PSmoveto(int x, int y)
{
- if (y > PS_start_y + Pixels_Page)
+ if (y > PS_start_y + Pixels_Page)
{
PS_start_y = y;
PSshowpage();
@@ -826,7 +826,7 @@ PSmoveto(int x, int y)
static void
PSmove_offset(int offset)
{
- if (offset != PS_offset)
+ if (offset != PS_offset)
{
PSprintf("0 %d R\n", PS_offset - offset );
PS_offset = offset;
@@ -838,12 +838,12 @@ PSmove_offset(int offset)
* Return an indication of whether or not the current element has a footnote.
*
* an element has a footnote if it is text or an image and its anchorHRef is not null.
- * If the element is a textual element with an anchorHRef, that has been split across
+ * If the element is a textual element with an anchorHRef, that has been split across
* lines then it should be followed by a linefeed element and a text element with the
* same anchorHRef. In this case say that the element doesn't have a footnote so as
* to avoid duplicate footnotes.
*/
-static int
+static int
has_footnote(struct ele_rec *el)
{
int rc = 0;
@@ -906,10 +906,10 @@ has_footnote(struct ele_rec *el)
static void
PSfootnote(char *href, double height)
{
- PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
+ PSprintf("gsave 0 %.2f R RF %d SF (%d) S grestore\n",
height, footnote_ptsize, cur_ftn_no++);
- if (n_saved_ftns == ftn_array_size)
+ if (n_saved_ftns == ftn_array_size)
{
ftn_array_size += 16;
if (!footnotes) {
@@ -919,7 +919,7 @@ PSfootnote(char *href, double height)
footnotes = (char **)realloc((void *)footnotes,
(ftn_array_size * sizeof(char *)));
}
- if (footnotes == NULL)
+ if (footnotes == NULL)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -950,9 +950,9 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
unsigned char ch;
int underline = eptr->underline_number;
int ascent;
-
+
PSfont(hw, eptr->font, fontfamily); /* set font */
- if (PS_fontascent == 0)
+ if (PS_fontascent == 0)
ascent = eptr->font->ascent;
else
ascent = PS_fontascent;
@@ -963,7 +963,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
every character stored as an octal escape (worst case scenario). */
s2 = (String) malloc(strlen(s) * 4 + 1);
- if (s2 == NULL)
+ if (s2 == NULL)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -984,14 +984,14 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
*stmp++ = B_SLASH;
*stmp++ = ch;
}
- else if (ch > (unsigned char) MAX_ASCII)
+ else if (ch > (unsigned char) MAX_ASCII)
{
/* convert to octal */
*stmp++ = B_SLASH;
*stmp++ = ((ch >> 6) & 007) + '0';
*stmp++ = ((ch >> 3) & 007) + '0';
*stmp++ = (ch & 007) + '0';
- }
+ }
else
{
*stmp++ = ch;
@@ -999,7 +999,7 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
}
*(stmp) = '\0';
PSprintf("(%s)%c\n", s2, (underline)?'U':'S');
- if (HTML_Print_Footers && has_footnote(eptr))
+ if (HTML_Print_Footers && has_footnote(eptr))
{
PSfootnote(eptr->anchorHRef, 0.7 * ascent);
}
@@ -1014,10 +1014,10 @@ PStext(HTMLWidget hw, struct ele_rec *eptr, int fontfamily, String s)
* of two. The size of the higher level bullets is just somewhat smaller
*
*/
-static void
+static void
PSbullet(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
{
- int width = ( eptr->font->max_bounds.lbearing
+ int width = ( eptr->font->max_bounds.lbearing
+ eptr->font->max_bounds.rbearing);
int offset = eptr->y_offset + eptr->font->ascent;
int level = eptr->indent_level;
@@ -1125,7 +1125,7 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
* does the run-length encoding. This is done to reduce the file size and
* therefore the time to send the file to the printer. You get longer
* processing time instead.
- *
+ *
* rle is encoded as such:
* # 'run' of count+1 equal pixels
* # count+1 non-equal pixels
@@ -1133,18 +1133,18 @@ PSwidget(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
*
* returns length of the rleline vector
*
-*/
+*/
static int
-PSrle_encode(unsigned char *scanline,
+PSrle_encode(unsigned char *scanline,
unsigned char *rleline,
- int wide)
+ int wide)
{
int i, j, blocklen, isrun, rlen;
unsigned char block[256], pix;
blocklen = isrun = rlen = 0;
- for (i = 0; i < wide; i++)
+ for (i = 0; i < wide; i++)
{
/* there are 5 possible states:
* 0: block empty.
@@ -1156,23 +1156,23 @@ PSrle_encode(unsigned char *scanline,
pix = scanline[i];
- if (!blocklen)
+ if (!blocklen)
{
/* case 0: empty */
block[blocklen++] = pix;
isrun = 1;
}
- else if (isrun)
+ else if (isrun)
{
if (pix == block[blocklen-1])
- {
+ {
/* case 1: isrun, prev==cur */
block[blocklen++] = pix;
}
- else
+ else
{
/* case 2: isrun, prev!=cur */
- if (blocklen>1)
+ if (blocklen>1)
{
/* we have a run block to flush */
rleline[rlen++] = blocklen-1;
@@ -1190,12 +1190,12 @@ PSrle_encode(unsigned char *scanline,
}
}
else
- {
+ {
/* not a run */
- if (pix == block[blocklen-1])
+ if (pix == block[blocklen-1])
{
/* case 3: non-run, prev==cur */
- if (blocklen>1)
+ if (blocklen>1)
{
/* have a non-run block to flush */
rleline[rlen++] = (blocklen-1) | 0x80;
@@ -1204,7 +1204,7 @@ PSrle_encode(unsigned char *scanline,
/* start new run block with pix */
block[0] = pix;
blocklen = isrun = 1;
- }
+ }
else
{
/* blocklen<=1 turn into a run */
@@ -1212,17 +1212,17 @@ PSrle_encode(unsigned char *scanline,
block[blocklen++] = pix;
}
}
- else
+ else
{
/* case 4: non-run, prev!=cur */
block[blocklen++] = pix;
}
}
-
+
/* max block length. flush */
if (blocklen == 128)
{
- if (isrun)
+ if (isrun)
{
rleline[rlen++] = blocklen-1;
rleline[rlen++] = block[0];
@@ -1258,7 +1258,7 @@ PSrle_encode(unsigned char *scanline,
/*
- * PScolor_image - created postscript colorimage operator
+ * PScolor_image - created postscript colorimage operator
*
* spits out code that checks if the PostScript device in question
* knows about the 'colorimage' operator. If it doesn't, it defines
@@ -1267,8 +1267,8 @@ PSrle_encode(unsigned char *scanline,
*
*/
-static void
-PScolor_image(void)
+static void
+PScolor_image(void)
{
static char *txt[] = {
@@ -1318,21 +1318,21 @@ PScolor_image(void)
PSconst_out(txt);
}
-
+
/*
* PScolormap - write colormap
*
* spits out code for the colormap of the following image
* if !color, it spits out a mono-ized graymap
- *
+ *
*/
static void
-PScolormap(int color,
- int nc,
- int *rmap,
- int *gmap,
- int *bmap)
+PScolormap(int color,
+ int nc,
+ int *rmap,
+ int *gmap,
+ int *bmap)
{
int i;
@@ -1342,12 +1342,12 @@ PScolormap(int color,
/* load up the colormap */
PSprintf("currentfile cmap readhexstring\n");
- for (i=0; i>8,
gmap[i]>>8, bmap[i]>>8);
- else
+ else
PSprintf("%02x ", MONO(rmap[i], gmap[i], bmap[i]));
if ((i%10) == 9)
PSprintf("\n");
@@ -1359,10 +1359,10 @@ PScolormap(int color,
/*
* PSrle_cmapimage - define rlecmapimage operator
- *
+ *
*/
static void
-PSrle_cmapimage(int color)
+PSrle_cmapimage(int color)
{
static char *txt[] = {
@@ -1415,11 +1415,11 @@ PSrle_cmapimage(int color)
};
PSconst_out(txt);
- if (color)
+ if (color)
{
PSconst_out(txt_color);
- }
- else
+ }
+ else
{
PSconst_out(txt_gray);
}
@@ -1441,14 +1441,14 @@ PSwrite_bw(unsigned char *pic, int w, int h, int flipbw)
int i, j;
int err=0;
unsigned char outbyte, bitnum, bit;
-
+
outbyte = bitnum = 0;
for (i=0; ipic_data;
unsigned char *imgp = img->image_data;
- int anchor = (eptr->anchorHRef != NULL);
+ int anchor = (eptr->anchorHRef != NULL);
int ncolors = img->num_colors;
int i, j;
int w = img->width;
@@ -1506,7 +1506,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
PSmove_offset(eptr->y_offset);
- if (anchor)
+ if (anchor)
{
/* draw an outline by drawing a slightly larger black square
* below the actual image
@@ -1517,8 +1517,8 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
PSprintf("grestore\n");
extra = 4;
}
-
- if (imgp == NULL)
+
+ if (imgp == NULL)
{
/* image was not available... do something instead
* draw an empty square for example
@@ -1536,20 +1536,20 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
return;
}
- /* this is a hack to see if the image is Black & White,
+ /* this is a hack to see if the image is Black & White,
* Greyscale or 8 bit color
* assume it's bw if it has only one or two colors, both some grey's
* assume it's greyscale if all the colors (>2) are grey
* Images with only one color do occur too.
*/
-
- if ( ( (ncolors == 2)
+
+ if ( ( (ncolors == 2)
&& ( (Isgray(img,0) && Isgray(img,1))
- || (Is_bg(img,0) && Is_fg(img,1))
+ || (Is_bg(img,0) && Is_fg(img,1))
|| (Is_fg(img,0) && Is_bg(img,1)) ))
|| ( (ncolors == 1)
&& (Isgray(img,0)
- || Is_bg(img,0)
+ || Is_bg(img,0)
|| Is_fg(img,0))))
{
colortype = F_BWDITHER;
@@ -1571,13 +1571,13 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
}
}
}
-
+
/* build a temporary dictionary */
PSprintf("20 dict begin\n\n");
/* define string to hold a scanline's worth of data */
PSprintf("/pix %d string def\n\n", slen);
-
+
/* position and scaling */
PSprintf("gsave currentpoint %d sub translate", h);
if (anchor)
@@ -1585,45 +1585,45 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
else
PSprintf(" 0 2 translate");
PSprintf(" %d %d scale\n", w, h);
-
- if (colortype == F_BWDITHER)
+
+ if (colortype == F_BWDITHER)
{
/* 1-bit dither code uses 'image' */
int flipbw = 0;
-
+
/* set if color#0 is 'white' */
if ((ncolors == 2 &&
MONO(img->reds[0], img->greens[0],img->blues[0]) >
MONO(img->reds[1], img->greens[1], img->blues[1])) ||
- (ncolors == 1 &&
+ (ncolors == 1 &&
MONO(img->reds[0], img->greens[0],img->blues[0]) >
MONO(127, 127, 127) ))
{
- flipbw=1;
+ flipbw=1;
}
-
+
/* dimensions of data */
PSprintf("%d %d %d\n", w, h, bits);
-
+
/* mapping matrix */
PSprintf("[%d 0 0 %d 0 %d]\n\n", w, -h, h);
-
+
PSprintf("{currentfile pix readhexstring pop}\n");
PSprintf("image\n");
/* write the actual image data */
err = PSwrite_bw(imgp, w, h, flipbw);
- }
+ }
else
{
/* all other formats */
unsigned char *rleline = (unsigned char *) NULL;
int rlen;
-
+
/* if we're using color, make sure 'colorimage' is defined */
if (colorps)
PScolor_image();
-
+
PScolormap(colorps, ncolors, img->reds, img->greens, img->blues);
PSrle_cmapimage(colorps);
@@ -1632,9 +1632,9 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
/* mapping matrix */
PSprintf("[%d 0 0 %d 0 %d]\n", w, -h, h);
PSprintf("rlecmapimage\n");
-
+
rleline = (unsigned char *) malloc(w * 2);
- if (!rleline)
+ if (!rleline)
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
@@ -1645,7 +1645,7 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
return;
}
- for (i=0; ianchorHRef, 2.0);
@@ -1701,11 +1701,11 @@ PSimage(HTMLWidget hw, struct ele_rec *eptr, int fontfamily)
* 2: new century schoolbook
* 3: lucida
*/
-String ParseTextToPSString(HTMLWidget hw,
+String ParseTextToPSString(HTMLWidget hw,
struct ele_rec *elist,
struct ele_rec *startp,
struct ele_rec *endp,
- int start_pos,
+ int start_pos,
int end_pos,
int space_width,
int lmargin,
@@ -1722,11 +1722,11 @@ String ParseTextToPSString(HTMLWidget hw,
struct ele_rec *end;
struct ele_rec *last;
struct ele_rec *tmpptr;
- unsigned long fg_pixel, bg_pixel;
+ unsigned long fg_pixel, bg_pixel;
int footnotes_this_page = 0;
int footnotes_this_line;
int reserved_space;
-
+
if (startp == NULL)
return(NULL);
@@ -1735,17 +1735,17 @@ String ParseTextToPSString(HTMLWidget hw,
* Get the foreground and background colors so we can check later
* for black&white documents
*/
- XtVaGetValues (hw->html.view,
+ XtVaGetValues (hw->html.view,
#ifdef MOTIF
XtNforeground, &fg_pixel,
#endif
- XtNbackground, &bg_pixel,
+ XtNbackground, &bg_pixel,
NULL);
#ifndef MOTIF
- XtVaGetValues ((Widget)hw,
+ XtVaGetValues ((Widget)hw,
XtNforeground, &fg_pixel,
NULL);
-#endif
+#endif
fg_color.pixel = fg_pixel;
bg_color.pixel = bg_pixel;
XQueryColor(XtDisplay(hw->html.view),
@@ -1760,12 +1760,12 @@ String ParseTextToPSString(HTMLWidget hw,
DefaultColormap(XtDisplay(hw->html.view),
DefaultScreen(XtDisplay(hw->html.view)))),
&bg_color);
-
+
/* this piece of code is needed if the user selects a portion
* of the document with the mouse.
* I think it will never be used, but I left it in anyway. F.
*/
- if (SwapElements(startp, endp, start_pos, end_pos))
+ if (SwapElements(startp, endp, start_pos, end_pos))
{
start = endp;
end = startp;
@@ -1778,7 +1778,7 @@ String ParseTextToPSString(HTMLWidget hw,
start = startp;
end = endp;
}
-
+
/* Setup page size according to user preference. */
if (HTML_Print_Paper_Size_A4)
@@ -1787,10 +1787,10 @@ String ParseTextToPSString(HTMLWidget hw,
page_dimens = us_letter_page_dimens;
page_dimens.text_height = ( page_dimens.page_height
- - page_dimens.top_margin
+ - page_dimens.top_margin
- page_dimens.bot_margin);
page_dimens.text_width = ( page_dimens.page_width
- - page_dimens.left_margin
+ - page_dimens.left_margin
- page_dimens.right_margin);
/* Calculate the number of Postscript points per pixel of current
@@ -1810,10 +1810,10 @@ String ParseTextToPSString(HTMLWidget hw,
* wide), but I guess that the hw->html.doc_width includes some
* left and right margins, so it seems to work in practice.
*/
- if (pagewidth > page_dimens.text_width)
+ if (pagewidth > page_dimens.text_width)
Points_Pixel = Points_Pixel * page_dimens.text_width / pagewidth;
- Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
-
+ Pixels_Page = (int) (page_dimens.text_height / Points_Pixel);
+
PSinit();
PSheader(hw->html.title, fontfamily, url, time_str);
PSnewpage();
@@ -1821,14 +1821,14 @@ String ParseTextToPSString(HTMLWidget hw,
last = start;
eptr = start;
- while ((eptr != NULL) && (eptr != end))
+ while ((eptr != NULL) && (eptr != end))
{
/* Skip the special internal text added for multi-page
* documents.
*/
- if (eptr->internal == True)
+ if (eptr->internal == True)
{
- if (eptr->type == E_LINEFEED)
+ if (eptr->type == E_LINEFEED)
{
PS_page_offset += eptr->line_height;
}
@@ -1837,14 +1837,14 @@ String ParseTextToPSString(HTMLWidget hw,
}
/* check if this is a newline */
- if (line != eptr->line_number)
+ if (line != eptr->line_number)
{
/* calculate max height */
height = 0;
footnotes_this_line = 0;
line = eptr->line_number;
tmpptr = eptr;
- while (tmpptr != NULL && tmpptr->line_number == line)
+ while (tmpptr != NULL && tmpptr->line_number == line)
{
if (tmpptr->line_height > height)
height = tmpptr->line_height;
@@ -1858,18 +1858,18 @@ String ParseTextToPSString(HTMLWidget hw,
xpos = 0;
/* check if line fits completly on page */
-
+
reserved_space = 0;
- if (footnotes_this_page || footnotes_this_line)
+ if (footnotes_this_page || footnotes_this_line)
{
reserved_space = ( ( footnote_space
+ ( footnote_ptsize
- * ( footnotes_this_page
+ * ( footnotes_this_page
+ footnotes_this_line)))
/ Points_Pixel);
}
- if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
+ if (ypos + height + reserved_space > PS_start_y + Pixels_Page)
{
PS_start_y = ypos;
PSshowpage();
@@ -1879,24 +1879,24 @@ String ParseTextToPSString(HTMLWidget hw,
footnotes_this_page += footnotes_this_line;
PSmoveto( xpos, ypos);
}
-
- switch (eptr->type)
+
+ switch (eptr->type)
{
case E_TEXT:
PStext(hw, eptr, fontfamily,
(String)((eptr == start) ? (eptr->edata + start_pos) : eptr->edata));
break;
- case E_BULLET:
+ case E_BULLET:
PSbullet(hw, eptr, fontfamily);
break;
- case E_IMAGE:
+ case E_IMAGE:
PSimage(hw, eptr, fontfamily);
break;
- case E_LINEFEED:
+ case E_LINEFEED:
break;
case E_HRULE:
@@ -1915,7 +1915,7 @@ String ParseTextToPSString(HTMLWidget hw,
last = eptr;
eptr = eptr->next;
}
-
+
PSshowpage();
PStrailer();
diff --git a/libhtmlw/HTML.c b/libhtmlw/HTML.c
index 08feca6..bcaa1a9 100644
--- a/libhtmlw/HTML.c
+++ b/libhtmlw/HTML.c
@@ -337,7 +337,7 @@ static XtResource resources[] =
{ WbNtitleText,
WbCTitleText, XtRString, sizeof (char *),
XtOffset (HTMLWidget, html.title),
- XtRString, (char *) NULL
+ XtRString, (char *) NULL
},
/*
@@ -593,21 +593,21 @@ static XtResource resources[] =
},
/* end amb */
{ WbNpreviouslyVisitedTestFunction,
- WbCPreviouslyVisitedTestFunction, XtRPointer,
+ WbCPreviouslyVisitedTestFunction, XtRPointer,
sizeof (XtPointer),
XtOffset (HTMLWidget, html.previously_visited_test),
XtRImmediate, (caddr_t) NULL
},
-
+
{ WbNresolveImageFunction,
- WbCResolveImageFunction, XtRPointer,
+ WbCResolveImageFunction, XtRPointer,
sizeof (XtPointer),
XtOffset (HTMLWidget, html.resolveImage),
XtRImmediate, (caddr_t) NULL
},
-
+
{ WbNresolveDelayedImage,
- WbCResolveDelayedImage, XtRPointer,
+ WbCResolveDelayedImage, XtRPointer,
sizeof (XtPointer),
XtOffset (HTMLWidget, html.resolveDelayedImage),
XtRImmediate, (caddr_t) NULL
@@ -615,12 +615,12 @@ static XtResource resources[] =
{
WbNpointerMotionCallback,
- WbCPointerMotionCallback, XtRPointer,
+ WbCPointerMotionCallback, XtRPointer,
sizeof (XtPointer),
XtOffset (HTMLWidget, html.pointer_motion_callback),
XtRImmediate, (caddr_t) NULL
},
-
+
};
@@ -674,12 +674,12 @@ HTMLClassRec htmlClassRec = {
},
{ /* constraint_class fields */
- NULL, /* resource list */
- 0, /* num resources */
- 0, /* constraint size */
- NULL, /* init proc */
- NULL, /* destroy proc */
- NULL, /* set values proc */
+ NULL, /* resource list */
+ 0, /* num resources */
+ 0, /* constraint size */
+ NULL, /* init proc */
+ NULL, /* destroy proc */
+ NULL, /* set values proc */
NULL, /* extension */
},
@@ -691,13 +691,13 @@ HTMLClassRec htmlClassRec = {
NULL, /* syn_cont_resources */
0, /* num_syn_cont_resources */
XmInheritParentProcess, /* parent_process */
- NULL, /* extension */
+ NULL, /* extension */
},
#endif /* MOTIF */
- { /* html_class fields */
+ { /* html_class fields */
0 /* none */
- }
+ }
};
@@ -710,7 +710,7 @@ extern int hacked_y;
WidgetClass htmlWidgetClass = (WidgetClass)&htmlClassRec;
static Cursor in_anchor_cursor = (Cursor)NULL;
-static char *mailToKludgeSubject = NULL;
+static char *mailToKludgeSubject = NULL;
static char *mailToKludgeURL = NULL;
char *cattrs[]={"text","bgcolor","alink","vlink","link",NULL};
@@ -836,7 +836,7 @@ hw_do_color(Widget w, char *att, char *cname)
}
cmap = hw->core.colormap;
-
+
val=cname;
if (*val!='#') {
if (XAllocNamedColor(XtDisplay(w),cmap,cname,&col,&ecol)) {
@@ -868,22 +868,22 @@ hw_do_color(Widget w, char *att, char *cname)
t[0]=val[4];
t[1]=val[5];
sscanf(t,"%x",&b);
-
+
col.red = ((unsigned) r) << 8;
col.green = ((unsigned) g) << 8;
col.blue = ((unsigned) b) << 8;
col.flags = DoRed | DoGreen | DoBlue;
-
+
if (!XAllocColor(XtDisplay(w),cmap,&col)) {
return -1;
}
} else {
return -1;
}
-
+
}
-
+
if (!my_strcasecmp(att,"text")) {
hw->manager.foreground = col.pixel;
}
@@ -891,11 +891,11 @@ hw_do_color(Widget w, char *att, char *cname)
/* calculate shadow colors */
calc = XmGetColorCalculation();
calc(&col, &fg, &sel, &ts, &bs);
- if (XAllocColor(XtDisplay(w),cmap,&ts))
+ if (XAllocColor(XtDisplay(w),cmap,&ts))
hw->manager.top_shadow_color = ts.pixel;
- if (XAllocColor(XtDisplay(w),cmap,&bs))
+ if (XAllocColor(XtDisplay(w),cmap,&bs))
hw->manager.bottom_shadow_color = bs.pixel;
-
+
hw->core.background_pixel = col.pixel;
hw->html.view->core.background_pixel = col.pixel ;
hw->html.activeAnchor_bg = col.pixel;
@@ -909,7 +909,7 @@ hw_do_color(Widget w, char *att, char *cname)
if (!my_strcasecmp(att,"alink")) {
hw->html.activeAnchor_fg = col.pixel;
}
-
+
return -1;
}
@@ -951,7 +951,7 @@ XGCValues values;
#define MAX_Y_EXP_DIFF 10 /*pixels between exposes to make one expose area*/
/*
- * Process an expose event in the View (or drawing area). This
+ * Process an expose event in the View (or drawing area). This
* Can be a regular expose event, or perhaps a GraphicsExpose Event.
*/
static void
@@ -1100,7 +1100,7 @@ goto single_expose;
x1 = nx + nwidth;
changed=1;
}
-
+
if (y1 < (ny + nheight)) {
y1 = ny + nheight;
changed=1;
@@ -1190,7 +1190,7 @@ ScrollWidgets(hw)
((y+wptr->height)>0 &&
(y+wptr->height)<=hw->html.view_height)) &&
((x>0 &&
- x<=hw->html.view_width) ||
+ x<=hw->html.view_width) ||
((x+wptr->width)>0 &&
(x+wptr->width)<=hw->html.view_width))) {
wptr->seeable=1;
@@ -1271,7 +1271,7 @@ ScrollToPos(w, hw, value)
if (value > hw->html.scroll_y)
{
int dy;
-
+
dy = value - hw->html.scroll_y;
if (dy > hw->html.view_height)
{
@@ -1314,7 +1314,7 @@ ScrollToPos(w, hw, value)
else if (value < hw->html.scroll_y)
{
int dy;
-
+
dy = hw->html.scroll_y - value;
if (dy > hw->html.view_height)
{
@@ -1347,7 +1347,7 @@ ScrollToPos(w, hw, value)
ViewRedisplay(hw,
0, 0,
hw->html.view_width, dy);
-
+
}
}
}
@@ -1364,7 +1364,7 @@ ScrollToPos(w, hw, value)
if (value > hw->html.scroll_x)
{
int dx;
-
+
dx = value - hw->html.scroll_x;
if (dx > hw->html.view_width)
{
@@ -1407,7 +1407,7 @@ ScrollToPos(w, hw, value)
else if (value < hw->html.scroll_x)
{
int dx;
-
+
dx = hw->html.scroll_x - value;
if (dx > hw->html.view_width)
{
@@ -1484,7 +1484,7 @@ ScrollMove(w, client_data, call_data)
currentLength = hw->html.view_height;
value = hw->html.scroll_y + scrollDir * currentLength;
}
- else
+ else
{
totalLength = hw->html.doc_width;
currentLength = hw->html.view_width;
@@ -1493,7 +1493,7 @@ ScrollMove(w, client_data, call_data)
if (value > (int)totalLength) value = totalLength;
if (value < 0) value = 0;
-
+
setScrollBar(w, value, totalLength, currentLength);
ScrollToPos(w, hw, value);
#endif
@@ -1508,14 +1508,14 @@ JumpMove(w, client_data, call_data)
caddr_t call_data;
{
HTMLWidget hw = (HTMLWidget)client_data;
- int value = (int)(*(float *)call_data *
- (w == hw->html.vbar ?
- hw->html.doc_height :
+ int value = (int)(*(float *)call_data *
+ (w == hw->html.vbar ?
+ hw->html.doc_height :
hw->html.doc_width));
ScrollToPos(w, hw, value);
}
#endif
-
+
/*
* Create the horizontal and vertical scroll bars.
@@ -1544,10 +1544,10 @@ CreateScrollbars(
XtSetArg(arg[argcnt], XxNwidth, 10); argcnt++;
XtSetArg(arg[argcnt], XxNheight, 10); argcnt++;
hw->html.view = XtCreateWidget("View",
-#ifdef MOTIF
+#ifdef MOTIF
xmDrawingAreaWidgetClass,
#else
- drawingAreaWidgetClass,
+ drawingAreaWidgetClass,
#endif
(Widget)hw, arg, argcnt);
XtManageChild(hw->html.view);
@@ -1728,7 +1728,7 @@ ConfigScrollBars(
*/
#ifdef MOTIF
vx = hw->manager.shadow_thickness;
- vy = hw->manager.shadow_thickness;
+ vy = hw->manager.shadow_thickness;
#else
vx = vy = 0;
#endif
@@ -1741,7 +1741,7 @@ ConfigScrollBars(
vy += HbarHeight(hw);
}
XtMoveWidget(hw->html.view, vx, vy);
- XtResizeWidget(hw->html.view, hw->html.view_width,
+ XtResizeWidget(hw->html.view, hw->html.view_width,
hw->html.view_height,
hw->html.view->core.border_width);
/*
@@ -1757,7 +1757,7 @@ ConfigScrollBars(
* the viewing area
*/
XtResizeWidget(hw->html.vbar, hw->html.vbar->core.width,
- hw->html.view_height + (2 *
+ hw->html.view_height + (2 *
#ifdef MOTIF
hw->manager.shadow_thickness
#else
@@ -1779,16 +1779,16 @@ ConfigScrollBars(
{
#ifndef DISABLE_TRACE
if (htmlwTrace) {
- fprintf (stderr, "view_height %d, doc_height %d\n",
+ fprintf (stderr, "view_height %d, doc_height %d\n",
hw->html.view_height, hw->html.doc_height);
}
#endif
#ifdef NOT_RIGHT
/* Eric -- your previous equation wasn't doing it.
This isn't either... */
- ss =
+ ss =
(int)((float)hw->html.view_height *
- ((float)hw->html.view_height /
+ ((float)hw->html.view_height /
(float)(hw->html.doc_height - (int)hw->html.view_height)));
if (ss > hw->html.view_height)
{
@@ -1855,14 +1855,14 @@ ConfigScrollBars(
XtSetArg(arg[argcnt], XmNvalue, hw->html.scroll_y); argcnt++;
XtSetArg(arg[argcnt], XmNsliderSize, ss); argcnt++;
XtSetArg(arg[argcnt], XmNincrement, DEFAULT_INCREMENT); argcnt++;
- XtSetArg(arg[argcnt], XmNpageIncrement,
- hw->html.view_height > DEFAULT_INCREMENT ?
+ XtSetArg(arg[argcnt], XmNpageIncrement,
+ hw->html.view_height > DEFAULT_INCREMENT ?
hw->html.view_height - DEFAULT_INCREMENT : 1); argcnt++;
XtSetValues(hw->html.vbar, arg, argcnt);
#else
- setScrollBar(hw->html.vbar,
+ setScrollBar(hw->html.vbar,
hw->html.scroll_y,
- hw->html.doc_height,
+ hw->html.doc_height,
hw->html.view_height);
#endif /* MOTIF */
@@ -1970,14 +1970,14 @@ ConfigScrollBars(
XtSetArg(arg[argcnt], XmNvalue, hw->html.scroll_x); argcnt++;
XtSetArg(arg[argcnt], XmNsliderSize, ss); argcnt++;
XtSetArg(arg[argcnt], XmNincrement, DEFAULT_INCREMENT); argcnt++;
- XtSetArg(arg[argcnt], XmNpageIncrement,
- hw->html.view_width > DEFAULT_INCREMENT ?
+ XtSetArg(arg[argcnt], XmNpageIncrement,
+ hw->html.view_width > DEFAULT_INCREMENT ?
hw->html.view_width - DEFAULT_INCREMENT : 1); argcnt++;
XtSetValues(hw->html.hbar, arg, argcnt);
#else
- setScrollBar(hw->html.hbar,
+ setScrollBar(hw->html.hbar,
hw->html.scroll_x,
- hw->html.doc_width,
+ hw->html.doc_width,
hw->html.view_width);
#endif /* MOTIF */
}
@@ -2026,7 +2026,7 @@ ReformatWindow(
if (hw->core.width <= swidth)
{
hw->core.width = swidth + 10;
- }
+ }
new_width = hw->core.width - swidth - (2 * st);
temp = FormatAll(hw, &new_width);
@@ -2216,19 +2216,19 @@ Initialize(
if (new->core.width == 0)
{
new->core.width = new->html.margin_width << 1 ;
- }
+ }
if (new->core.width == 0)
{
new->core.width = 10 ;
- }
+ }
if (new->core.height == 0)
{
new->core.height = new->html.margin_height << 1 ;
- }
+ }
if (new->core.height == 0)
{
new->core.height = 10 ;
- }
+ }
/*
* Make sure the underline numbers are within bounds.
@@ -2236,22 +2236,22 @@ Initialize(
if (new->html.num_anchor_underlines < 0)
{
new->html.num_anchor_underlines = 0;
- }
+ }
if (new->html.num_anchor_underlines > MAX_UNDERLINES)
{
new->html.num_anchor_underlines = MAX_UNDERLINES;
- }
+ }
if (new->html.num_visitedAnchor_underlines < 0)
{
new->html.num_visitedAnchor_underlines = 0;
- }
+ }
if (new->html.num_visitedAnchor_underlines > MAX_UNDERLINES)
{
new->html.num_visitedAnchor_underlines = MAX_UNDERLINES;
- }
+ }
/*
- * Parse the raw text with the HTML parser. And set the formatted
+ * Parse the raw text with the HTML parser. And set the formatted
* element list to NULL.
*/
new->html.html_objects = HTMLParse(NULL, request->html.raw_text,new);
@@ -2463,7 +2463,7 @@ ViewClearAndRefresh(
#endif
{
int r,b;
-
+
/*
* Only refresh if we have a window already.
* (if we have a GC we have a window)
@@ -2482,7 +2482,7 @@ ViewClearAndRefresh(
hw->manager.top_shadow_color ? 0 : 1;
hw->manager.bottom_shadow_color =
hw->manager.bottom_shadow_color ? 0 : 1;
-
+
XtVaSetValues(hw->html.view,
XmNbackground, hw->core.background_pixel,
XmNtopShadowColor, r,
@@ -2494,7 +2494,7 @@ ViewClearAndRefresh(
XmNtopShadowColor, r,
XmNbottomShadowColor, b,
NULL);
-
+
XClearArea(XtDisplay(hw), XtWindow(hw->html.view),
0, 0, 0, 0, False);
ViewRedisplay(hw, 0, 0,
@@ -2612,7 +2612,7 @@ Resize(
if (hw->core.width <= swidth)
{
hw->core.width = swidth + 10 ;
- }
+ }
if (hw->html.use_vbar == True)
{
@@ -3989,7 +3989,7 @@ TrackMotion(w, event, params, num_params)
}
eptr = LocateElement(hw, x, y, &epos);
-
+
/* We're hitting a new anchor if eptr exists and
eptr != cached tracked element and anchorHRef != NULL. */
if (eptr != NULL && eptr != hw->html.cached_tracked_ele &&
@@ -4002,7 +4002,7 @@ TrackMotion(w, event, params, num_params)
}
/* We're leaving an anchor if eptr exists and
a cached ele exists and we're not entering a new anchor. */
- else if (eptr != NULL && hw->html.cached_tracked_ele != NULL &&
+ else if (eptr != NULL && hw->html.cached_tracked_ele != NULL &&
eptr->anchorHRef == NULL)
{
LEAVING_ANCHOR (hw);
@@ -4014,13 +4014,13 @@ TrackMotion(w, event, params, num_params)
-/* We're adding a subject attribute to the anchor tag
+/* We're adding a subject attribute to the anchor tag
of course this subject attribute is dependent on that the HREF attribute
is set to a mailto URL. I think this is a kludge. libwww is not set up
- for this, so to minimize modifications, this routine exists for
+ for this, so to minimize modifications, this routine exists for
libwww:HTSendMaitlTo() to call to get the subject for the mailto URL.
The static globals mailToKludgeSubject, etc are set in HTMLInput when
- an anchor is clicked.
+ an anchor is clicked.
*/
GetMailtoKludgeInfo(url,subject)
char **url;
@@ -4051,7 +4051,7 @@ _HTMLInput(
String *params, /* unused */
Cardinal *num_params) /* unused */
#endif
-{
+{
HTMLWidget hw = (HTMLWidget)XtParent(w);
struct ele_rec *eptr;
WbAnchorCallbackData cbdata;
@@ -4353,16 +4353,16 @@ _HTMLpwdInput(
char *keySymString;
char *star = "*";
int length, passwdLength, i, insertPos, maxLength;
- Boolean stringInPlace;
-
+ Boolean stringInPlace;
+
if (event->type == KeyPress)
{
HTMLWidget hw = (HTMLWidget)XtParent(w);
WidgetInfo *wptr;
- if (XtClass((Widget)hw) != htmlWidgetClass)
+ if (XtClass((Widget)hw) != htmlWidgetClass)
return; /* it was not for us */
-
+
/*
* find the structure for this widget
*/
@@ -4378,7 +4378,7 @@ _HTMLpwdInput(
passwdLength = wptr->password ? strlen(wptr->password) : 0;
- length = XLookupString((XKeyEvent *)event,
+ length = XLookupString((XKeyEvent *)event,
buffer, 50, &ks, NULL);
keySymString = XKeysymToString(ks);
XtVaGetValues(w,
@@ -4404,7 +4404,7 @@ _HTMLpwdInput(
if ((!strcmp("BackSpace",keySymString))
|| (!strcmp("Backspace",keySymString))
- || (!strcmp("Delete",keySymString)) )
+ || (!strcmp("Delete",keySymString)) )
{
insertPos --;
@@ -4421,7 +4421,7 @@ _HTMLpwdInput(
}
#endif
- XtCallActionProc(w,
+ XtCallActionProc(w,
insertPos>-1 ? "delete-previous-character" :
"delete-next-character",
event, NULL,0);
@@ -4440,15 +4440,15 @@ _HTMLpwdInput(
if (passwdLength < maxLength)
{
char *pwd = wptr->password =
- (char *)realloc(wptr->password,
+ (char *)realloc(wptr->password,
sizeof(char)*(passwdLength+2));
for (i=passwdLength+1; i>insertPos; i--)
pwd[i] = pwd[i-1];
-
+
pwd[insertPos] = buffer[0];
}
}
- else
+ else
{
if (wptr->password == NULL)
wptr->password = (char *)malloc(sizeof(char)*2);
@@ -4508,19 +4508,19 @@ SetValues(
if (request->html.num_anchor_underlines < 0)
{
new->html.num_anchor_underlines = 0;
- }
+ }
if (request->html.num_anchor_underlines > MAX_UNDERLINES)
{
new->html.num_anchor_underlines = MAX_UNDERLINES;
- }
+ }
if (request->html.num_visitedAnchor_underlines < 0)
{
new->html.num_visitedAnchor_underlines = 0;
- }
+ }
if (request->html.num_visitedAnchor_underlines > MAX_UNDERLINES)
{
new->html.num_visitedAnchor_underlines = MAX_UNDERLINES;
- }
+ }
/*reformatted = 0;*/
if ((request->html.raw_text != current->html.raw_text)||
@@ -4778,7 +4778,7 @@ ConvertSelection(w, selection, target, type, value, length, format)
bcopy((char*)std_targets, (char*)targetP,
sizeof(Atom)*std_length);
*/
- memcpy((char*)targetP, (char*)std_targets,
+ memcpy((char*)targetP, (char*)std_targets,
sizeof(Atom)*std_length);
XtFree((char*)std_targets);
*type = XA_ATOM;
@@ -5209,7 +5209,7 @@ HTMLGotoId(Widget w, int element_id, int correction)
#else
ScrollToPos(hw->html.vbar, hw, newy);
ScrollToPos(hw->html.hbar, hw, 0);
- setScrollBar(hw->html.vbar, newy,
+ setScrollBar(hw->html.vbar, newy,
hw->html.doc_height,
hw->html.view_height);
#endif
@@ -6104,7 +6104,7 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
InitBody((Widget)hw);
/* restore default colors as required */
-
+
if(hw->manager.foreground != hw->html.foreground_SAVE) {
XFreeColors(XtDisplay(hw),hw->core.colormap,
&hw->manager.foreground,1,0);
@@ -6115,12 +6115,12 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
&hw->html.anchor_fg,1,0);
hw->html.anchor_fg = hw->html.anchor_fg_SAVE;
}
- if(hw->html.visitedAnchor_fg != hw->html.visitedAnchor_fg_SAVE){
+ if(hw->html.visitedAnchor_fg != hw->html.visitedAnchor_fg_SAVE){
XFreeColors(XtDisplay(hw),hw->core.colormap,
&hw->html.visitedAnchor_fg,1,0);
hw->html.visitedAnchor_fg = hw->html.visitedAnchor_fg_SAVE;
}
- if(hw->html.activeAnchor_fg != hw->html.activeAnchor_fg_SAVE){
+ if(hw->html.activeAnchor_fg != hw->html.activeAnchor_fg_SAVE){
XFreeColors(XtDisplay(hw),hw->core.colormap,
&hw->html.activeAnchor_fg,1,0);
hw->html.activeAnchor_fg = hw->html.activeAnchor_fg_SAVE;
@@ -6129,13 +6129,13 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
XFreeColors(XtDisplay(hw),hw->core.colormap,
&hw->manager.top_shadow_color,1,0);
hw->manager.top_shadow_color = hw->html.top_color_SAVE;
- }
+ }
if(hw->html.bottom_color_SAVE != hw->manager.bottom_shadow_color){
XFreeColors(XtDisplay(hw),hw->core.colormap,
&hw->manager.bottom_shadow_color,1,0);
hw->manager.bottom_shadow_color = hw->html.bottom_color_SAVE;
- }
- if(hw->core.background_pixel != hw->html.background_SAVE){
+ }
+ if(hw->core.background_pixel != hw->html.background_SAVE){
XFreeColors(XtDisplay(hw),hw->core.colormap,
&hw->core.background_pixel,1,0);
hw->html.activeAnchor_bg = hw->html.activeAnchor_bg_SAVE;
@@ -6277,7 +6277,7 @@ HTMLSetText(Widget w, char *text, char *header_text, char *footer_text, int elem
/*
* Display the new text
*/
- ViewClearAndRefresh(hw);
+ ViewClearAndRefresh(hw);
/*
* Clear any previous selection
@@ -6897,7 +6897,7 @@ HTMLSearchText (Widget w, char *pattern, ElementRef *m_start, ElementRef *m_end,
}
/* the following is a hack to make the html widget not acknowledge
-any button events while it is busy so that the rbm will not grab the
+any button events while it is busy so that the rbm will not grab the
server. Hopefully this will be removed when the application is re-written
to pay more attention to the event loop - TPR 2/9/96 */
@@ -6913,8 +6913,8 @@ void HTMLSetAppInsensitive(Widget hw)
height = hw->core.height;
/* ???? Should this be cast to a HTMLWidget and XtWindow changed to html.view*/
- sens_win = XCreateWindow(XtDisplay((Widget) hw), XtWindow(hw), x,
- y, width, height, 0,CopyFromParent, InputOnly,
+ sens_win = XCreateWindow(XtDisplay((Widget) hw), XtWindow(hw), x,
+ y, width, height, 0,CopyFromParent, InputOnly,
CopyFromParent, 0, NULL);
XMapRaised(XtDisplay((Widget) hw), sens_win);
}
@@ -6931,7 +6931,7 @@ void HTMLSetAppSensitive(Widget hw)
*
* Fixed up and rewritten by SWP...
*/
-void HTMLDrawBackgroundImage(Widget wid, int x, int y, int width,
+void HTMLDrawBackgroundImage(Widget wid, int x, int y, int width,
int height) {
int w_whole=0, h_whole=0,
@@ -6966,7 +6966,7 @@ HTMLWidget hw = (HTMLWidget) wid;
* Figure out the height of the area to draw.
* If there is a height offset, index the number of height tiles.
*/
- w_start_offset = (x+hw->html.scroll_x) % hw->html.bg_width;
+ w_start_offset = (x+hw->html.scroll_x) % hw->html.bg_width;
if (w_start_offset || (!w_start_offset && widthhtml.bg_width)) {
w_whole++;
start_width=hw->html.bg_width-w_start_offset;
@@ -7129,7 +7129,7 @@ void HTMLSetFocusPolicy(Widget w, int to)
else
{
XtVaSetValues(shell, XmNkeyboardFocusPolicy, XmEXPLICIT, NULL);
- /* when we have preference dialog this will have to
+ /* when we have preference dialog this will have to
undo all the translations that are currently installed
in the widgets and set the keyboardFocus policy of the
toplevel shell to pointer */
diff --git a/libhtmlw/HTML.h b/libhtmlw/HTML.h
index 9627ca2..3fe3b17 100644
--- a/libhtmlw/HTML.h
+++ b/libhtmlw/HTML.h
@@ -134,7 +134,7 @@ extern int HTMLSearchText (Widget w, char *pattern,
extern void HTMLSetAppInsensitive(Widget hw);
extern void HTMLSetAppSensitive(Widget hw);
extern void HTMLTraverseTabGroups();
-extern void HTMLDrawBackgroundImage(Widget w, int x, int y, int width,
+extern void HTMLDrawBackgroundImage(Widget w, int x, int y, int width,
int height);
extern void HTMLSetFocusPolicy(Widget w, int to);
#endif /* _NO_PROTO */
@@ -259,7 +259,7 @@ typedef struct table_field {
int colWidth; /* uniform width for all element in this col*/
int rowHeight; /* uniform hieght for all element in the row*/
Boolean header; /* is this field created with or | */
-
+
/* contents */
FieldType type;
char *text;
@@ -429,9 +429,9 @@ struct delay_rec {
#define M_TABLE_HEADER 47
#define M_TABLE_ROW 48
#define M_TABLE_DATA 49
-#define M_SUP 50
-#define M_SUB 51
-#define M_FIGURE 52
+#define M_SUP 50
+#define M_SUB 51
+#define M_FIGURE 52
#define M_COMMENT 53
#define M_DOC_HEAD 54 /* amb 2 */
#define M_UNDERLINED 55 /* amb 2 */
diff --git a/libhtmlw/HTMLP.h b/libhtmlw/HTMLP.h
index 60187cb..457052d 100644
--- a/libhtmlw/HTMLP.h
+++ b/libhtmlw/HTMLP.h
@@ -144,7 +144,7 @@ typedef struct _HTMLPart
Pixmap bgmap_SAVE;
Pixmap bgclip_SAVE;
int bg_height;
- int bg_width;
+ int bg_width;
Pixel foreground_SAVE;
Pixel anchor_fg_SAVE;
@@ -152,9 +152,9 @@ typedef struct _HTMLPart
Pixel activeAnchor_fg_SAVE;
Pixel activeAnchor_bg_SAVE;
Pixel top_color_SAVE;
- Pixel bottom_color_SAVE;
+ Pixel bottom_color_SAVE;
Pixel background_SAVE;
-
+
int num_anchor_underlines;
int num_visitedAnchor_underlines;
Boolean dashed_anchor_lines;
@@ -191,7 +191,7 @@ typedef struct _HTMLPart
XtPointer previously_visited_test;
XtPointer resolveImage;
XtPointer resolveDelayedImage;
-
+
XtPointer pointer_motion_callback;
/* PRIVATE */
diff --git a/libhtmlw/HTMLformat.c b/libhtmlw/HTMLformat.c
index 0b46f74..066e035 100644
--- a/libhtmlw/HTMLformat.c
+++ b/libhtmlw/HTMLformat.c
@@ -564,7 +564,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->anchorSubject = ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -691,7 +691,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->underline_number = 0;
-/*
+/*
if (eptr->edata != NULL)
{
free((char *)eptr->edata);
@@ -728,7 +728,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->anchorSubject= ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -773,7 +773,7 @@ CreateElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->anchorSubject = ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -963,7 +963,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->anchorSubject= ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -1226,7 +1226,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -1307,7 +1307,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->anchorSubject = ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -1466,7 +1466,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->anchorSubject= ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -1527,7 +1527,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
eptr->anchorSubject= ParseMarkTag(AnchorText,
MT_ANCHOR, AT_SUBJECT);
if (!eptr->anchorSubject) {
- eptr->anchorSubject =
+ eptr->anchorSubject =
ParseMarkTag(AnchorText,
MT_ANCHOR, AT_TITLE);
}
@@ -1591,7 +1591,7 @@ SetElement(hw, type, fp, x, y, edata, w, h, bw)
/*
- * Change our drawing font
+ * Change our drawing font
*/
void
NewFont(fp)
@@ -2206,7 +2206,7 @@ PreformatPlace(hw, mptr, x, y, width)
SetElement(hw, E_TEXT, currentFont,
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
/*
- * Save width here to avoid an
+ * Save width here to avoid an
* XTextExtents call later.
*/
Current->width = *x - line_x + 1;
@@ -2270,7 +2270,7 @@ PreformatPlace(hw, mptr, x, y, width)
SetElement(hw, E_TEXT, currentFont,
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
/*
- * Save width here to avoid an
+ * Save width here to avoid an
* XTextExtents call later.
*/
Current->width = *x - line_x + 1;
@@ -2498,7 +2498,7 @@ FormatPlace(hw, mptr, x, y, width)
SetElement(hw, E_TEXT, currentFont,
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
/*
- * Save width here to avoid an
+ * Save width here to avoid an
* XTextExtents call later.
*/
Current->width = *x - line_x + 1;
@@ -2651,7 +2651,7 @@ FormatPlace(hw, mptr, x, y, width)
SetElement(hw, E_TEXT, currentFont,
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
/*
- * Save width here to avoid an
+ * Save width here to avoid an
* XTextExtents call later.
*/
Current->width = *x - line_x + 1;
@@ -2679,7 +2679,7 @@ FormatPlace(hw, mptr, x, y, width)
SetElement(hw, E_TEXT, currentFont,
line_x, *y, line, NULL, NULL, IMAGE_DEFAULT_BORDER);
/*
- * Save width here to avoid an
+ * Save width here to avoid an
* XTextExtents call later.
*/
Current->width = *x - line_x + 1;
@@ -2711,8 +2711,8 @@ int extra;
extra = 10;
- LineFeed(hw, x, y);
- SetElement(hw, E_TABLE, currentFont, *x, *y, (char *) mptr, NULL, NULL, IMAGE_DEFAULT_BORDER);
+ LineFeed(hw, x, y);
+ SetElement(hw, E_TABLE, currentFont, *x, *y, (char *) mptr, NULL, NULL, IMAGE_DEFAULT_BORDER);
if (!Current->table_data) {
/* no table */
return 0;
@@ -2724,7 +2724,7 @@ int extra;
BaseLine = Current->table_data->height;
*x += Current->width + 1;
- LineFeed(hw, x, y);
+ LineFeed(hw, x, y);
}
/*
@@ -2769,7 +2769,7 @@ ImagePlace(hw, mptr, x, y, width)
SetElement(hw, E_TEXT, currentFont,
*x, *y, tptr, NULL, NULL, IMAGE_DEFAULT_BORDER);
/*
- * Save width here to avoid an
+ * Save width here to avoid an
* XTextExtents call later.
*/
Current->width = all.width;
@@ -2877,7 +2877,7 @@ ImagePlace(hw, mptr, x, y, width)
* Yank out the name field, and stick it in text.
* We may use this for ALT to at some later date.
*/
- if (Current->pic_data != NULL)
+ if (Current->pic_data != NULL)
{
tptr = ParseMarkTag(mptr->start, MT_IMAGE, "NAME");
/*temp******/
@@ -2895,7 +2895,7 @@ ImagePlace(hw, mptr, x, y, width)
* change the size, or anchor status of the image, thus we MUST
* doit before we muck with the Baseline and stuff.
*/
- if (Current->pic_data != NULL)
+ if (Current->pic_data != NULL)
{
/*
* Handle the USEMAP attribute of IMG tags. This is used for
@@ -2949,7 +2949,7 @@ ImagePlace(hw, mptr, x, y, width)
*/
tptr = ParseMarkTag(mptr->start, MT_IMAGE, "ALIGN");
/*temp******/
- if (!tptr)
+ if (!tptr)
{
tptr = ParseMarkTag(mptr->start, MT_FIGURE, "ALIGN");
}
@@ -4865,7 +4865,7 @@ FormatChunk(hw, x, y)
* Format all objects
*/
mptr = hw->html.html_objects;
- Last = NULL;
+ Last = NULL;
while (mptr != NULL)
{
TriggerMarkChanges(hw, &mptr, x, y);
@@ -5781,7 +5781,7 @@ XGCValues values;
eptr->pic_data, 0);
if (eptr->pic_data->transparent &&
eptr->pic_data->clip==None) {
- eptr->pic_data->clip =
+ eptr->pic_data->clip =
XCreatePixmapFromBitmapData
(XtDisplay(hw),
XtWindow(hw->html.view),
@@ -5881,7 +5881,7 @@ XGCValues values;
values.clip_x_origin=x+extra;
values.clip_y_origin=y+extra;
valuemask=GCClipMask|GCClipXOrigin|GCClipYOrigin;
- XChangeGC(XtDisplay(hw),
+ XChangeGC(XtDisplay(hw),
hw->html.drawGC,
valuemask, &values);
@@ -6004,7 +6004,7 @@ PlaceLine(hw, line)
break;
case E_LINEFEED:
if(!hw->html.bg_image)
- LinefeedRefresh(hw, eptr);
+ LinefeedRefresh(hw, eptr);
break;
case E_IMAGE:
ImageRefresh(hw, eptr);
diff --git a/libhtmlw/HTMLimages.c b/libhtmlw/HTMLimages.c
index 86dbfc0..3415b3f 100644
--- a/libhtmlw/HTMLimages.c
+++ b/libhtmlw/HTMLimages.c
@@ -465,20 +465,20 @@ MakeImage(dsp, data, width, height, depth, img_info, clip)
bit_data = (unsigned char *)malloc(width * height * 2);
bitp = bit_data;
datap = data;
-
+
theVisual = DefaultVisual(dsp, DefaultScreen(dsp));
rshift = 15 - highbit(theVisual->red_mask);
gshift = 15 - highbit(theVisual->green_mask);
bshift = 15 - highbit(theVisual->blue_mask);
bmap_order = BitmapBitOrder(dsp);
-
+
for (w = (width * height); w > 0; w--)
{
- temp = (((img_info->reds[(int)*datap] >> rshift) &
+ temp = (((img_info->reds[(int)*datap] >> rshift) &
theVisual->red_mask) |
- ((img_info->greens[(int)*datap] >> gshift) &
+ ((img_info->greens[(int)*datap] >> gshift) &
theVisual->green_mask) |
- ((img_info->blues[(int)*datap] >> bshift) &
+ ((img_info->blues[(int)*datap] >> bshift) &
theVisual->blue_mask));
if (bmap_order == MSBFirst)
{
diff --git a/libhtmlw/HTMLjot.c b/libhtmlw/HTMLjot.c
index b2a9635..b88f984 100644
--- a/libhtmlw/HTMLjot.c
+++ b/libhtmlw/HTMLjot.c
@@ -241,7 +241,7 @@ ClearJot(hw, w, width, height)
jptr = GetJot(w);
if (jptr == NULL)
- {
+ {
return;
}
@@ -253,7 +253,7 @@ ClearJot(hw, w, width, height)
hw->html.drawGC,
0, 0, jptr->width, jptr->height);
}
-
+
FreeStrokes(jptr->strokes);
jptr->strokes = NULL;
jptr->last_stroke = NULL;
@@ -319,7 +319,7 @@ EVJotExpose(w, data, event)
jptr = GetJot(w);
if (jptr == NULL)
- {
+ {
return;
}
@@ -360,7 +360,7 @@ EVJotPress(w, data, event)
jptr = GetJot(w);
if (jptr == NULL)
- {
+ {
return;
}
@@ -409,12 +409,12 @@ EVJotMove(w, data, event)
jptr = GetJot(w);
if (jptr == NULL)
- {
+ {
return;
}
if (jptr->drawing == False)
- {
+ {
return;
}
@@ -463,12 +463,12 @@ EVJotRelease(w, data, event)
jptr = GetJot(w);
if (jptr == NULL)
- {
+ {
return;
}
if (jptr->drawing == False)
- {
+ {
return;
}
@@ -521,7 +521,7 @@ EJB_JOTfromJot(w)
jptr = GetJot(w);
if (jptr == NULL)
- {
+ {
return(NULL);
}
@@ -648,12 +648,12 @@ JOTfromJot(w, buffer_len)
jptr = GetJot(w);
if (jptr == NULL)
- {
+ {
return(NULL);
}
dlen = sizeof(MY_INK_POINT) * jptr->stroke_cnt;
-
+
dataArray = (MY_INK_POINT *)malloc(dlen);
cnt = 0;
sptr = jptr->strokes;
@@ -692,7 +692,7 @@ JOTfromJot(w, buffer_len)
pptr = (INK_PENDATA_RECORD *)malloc(inkRecordPenDataSize(dlen));
pptr->header.recordType = inkRecordPenData;
pptr->header.recordLength = inkRecordPenDataSize(dlen);
- pptr->bounds.origin.x = jptr->min_x;
+ pptr->bounds.origin.x = jptr->min_x;
pptr->bounds.origin.y = jptr->min_y;
pptr->bounds.size.w = jptr->max_x - jptr->min_x + 1;
pptr->bounds.size.h = jptr->max_y - jptr->min_y + 1;
@@ -719,7 +719,7 @@ JOTfromJot(w, buffer_len)
bcopy((char *)pptr, (char *)(buffer + inkRecordBundleSize),
inkRecordPenDataSize(dlen));
*/
- memcpy((char *)(buffer + inkRecordBundleSize), (char *)pptr,
+ memcpy((char *)(buffer + inkRecordBundleSize), (char *)pptr,
inkRecordPenDataSize(dlen));
/*
bcopy((char *)eptr, (char *)(buffer + inkRecordBundleSize +
diff --git a/libhtmlw/HTMLparse.c b/libhtmlw/HTMLparse.c
index 9acceb3..e618835 100644
--- a/libhtmlw/HTMLparse.c
+++ b/libhtmlw/HTMLparse.c
@@ -245,7 +245,7 @@ clean_white_space(txt)
}
/*
- * If there are more words, insert a space and if space was
+ * If there are more words, insert a space and if space was
* removed move up remaining text.
*/
*start++ = ' ';
@@ -323,7 +323,7 @@ ExpandEscapes(esc, endp, termination)
{
int escLen, ampLen;
cnt = 0;
- escLen = strlen(esc);
+ escLen = strlen(esc);
while (AmpEscapes[cnt].tag != NULL)
{
ampLen = strlen(AmpEscapes[cnt].tag);
@@ -657,7 +657,7 @@ get_mark(start, endp)
ptr += 2;
while ((*ptr != '\0') && ((*ptr == ' ') || (*ptr == '\n')
|| (*ptr == '-') ))
- ptr++; /* skip spaces and newlines */
+ ptr++; /* skip spaces and newlines */
if (*ptr == '>') /* completed end comment */
{
*endp = ptr;
@@ -1048,13 +1048,13 @@ HTMLParse(old_list, str, hw)
tmp_bgname=NULL;
}
}
-
+
mark->next = NULL;
current = AddObj(&list, current, mark, preformat);
-
+
}
-
-
+
+
start = (char *)(end + 1);
@@ -1483,7 +1483,7 @@ AnchorTag(ptrp, startp, endp)
ptr++;
}
}
-
+
/*
* For a tag with no value, this is a boolean flag.
* Return the string "1" so we know the tag is there.
diff --git a/libhtmlw/HTMLtable.c b/libhtmlw/HTMLtable.c
index 84b92c4..9d88b4a 100644
--- a/libhtmlw/HTMLtable.c
+++ b/libhtmlw/HTMLtable.c
@@ -22,8 +22,8 @@ extern char *ParseMarkTag();
extern int htmlwTrace;
#endif
-/* Allocate a TableField and initialize to default values
- * return 0 on failure
+/* Allocate a TableField and initialize to default values
+ * return 0 on failure
*/
static TableField *NewTableField()
{
@@ -39,7 +39,7 @@ TableField *tf;
tf->contHoriz = False;
tf->maxWidth = DEFAULT_FIELD_WIDTH;
tf->minWidth = DEFAULT_FIELD_WIDTH;
- tf->maxHeight = DEFAULT_FIELD_HEIGHT;
+ tf->maxHeight = DEFAULT_FIELD_HEIGHT;
tf->minHeight = DEFAULT_FIELD_HEIGHT;
tf->header = False;
@@ -87,11 +87,11 @@ char *end;
-/* PourText() this routine pours a text string of a particular font into a
- rectangular area of specified dimensions. The return value is a list of
+/* PourText() this routine pours a text string of a particular font into a
+ rectangular area of specified dimensions. The return value is a list of
text lines that will fit within the given width.
If a height is specified, then text will be truncated if necessary to fit.
- If height is 0, then all of the text is in the list.
+ If height is 0, then all of the text is in the list.
The actual pixel height of the text is returned in variable height.
*/
int PourText(text,font,width,height,percentVertSpace,formattedText,numberOfLines)
@@ -131,7 +131,7 @@ int y;
*numberOfLines = 0;
return(0);
}
-
+
textList = ListCreate();
stringWidth = XTextWidth(font,text,strlen(text));
if (stringWidth < width) {
@@ -154,7 +154,7 @@ int y;
GetWord(textPtr,&wordStart,&wordEnd);
wordLength = (int) (wordEnd - wordStart);
wordWidth = XTextWidth(font,wordStart, wordLength);
- if ((builtWidth + spaceWidth + wordWidth) < width) {
+ if ((builtWidth + spaceWidth + wordWidth) < width) {
/* then add to line */
if (builtWidth) {
/* only add space if something on line already*/
@@ -164,7 +164,7 @@ int y;
strncat(tmpBuff, wordStart, wordLength);
builtWidth += wordWidth;
}
- else if (wordWidth < width) {
+ else if (wordWidth < width) {
/* start new line */
ListAddEntry(textList, strdup(tmpBuff));
*tmpBuff = '\0';
@@ -174,10 +174,10 @@ int y;
strncat(tmpBuff, wordStart, wordLength);
builtWidth += wordWidth;
}
- else {
+ else {
/* word is too big to fit on a line */
/* so break up word */
-
+
/* start new line */
ListAddEntry(textList, strdup(tmpBuff));
*tmpBuff = '\0';
@@ -190,10 +190,10 @@ int y;
while ((*wordEnd) && (width > wordWidth)) {
wordEnd++;
wordLength = (int) (wordEnd - wordStart);
- wordWidth = XTextWidth(font,wordStart,
+ wordWidth = XTextWidth(font,wordStart,
wordLength);
}
-
+
strncat(tmpBuff, wordStart, wordLength);
builtWidth += wordWidth;
@@ -244,7 +244,7 @@ int y;
*numberOfLines = numLines;
return(numLines);
-
+
} /* PourText() */
@@ -331,7 +331,7 @@ int x,y;
/* move 2D link list table to an array for speed */
- if (!(t->table = (TableField *) malloc(sizeof(TableField)
+ if (!(t->table = (TableField *) malloc(sizeof(TableField)
* t->numColumns * t->numRows))) {
return(0); /* out of memory */
}
@@ -341,7 +341,7 @@ int x,y;
x = 0;
field = (TableField *) ListHead(rowList);
while (field) {
- memcpy(&(t->table[y * t->numColumns + x]), field,
+ memcpy(&(t->table[y * t->numColumns + x]), field,
sizeof(TableField));
x++;
field = (TableField *) ListNext(rowList);
@@ -349,10 +349,10 @@ int x,y;
y++;
rowList = (List) ListNext(tableList);
}
-
+
return(1);
-
+
}
/* return the number of connected fields */
@@ -422,7 +422,7 @@ int maxWidthOfColumn;
int maxHeightOfRow;
int sumMinWidth; /* summation of max widths */
int maxWidthOfRow;
-int minWidthOfRow;
+int minWidthOfRow;
int numAdjacent;
float percentToShrink;
int accumulateColWidth;
@@ -455,9 +455,9 @@ int accumulateColWidth;
minWidthOfRow += field->minWidth;
}
/* save the length of the longest and shortest row */
- sumMaxWidth = (sumMaxWidth > maxWidthOfRow) ?
+ sumMaxWidth = (sumMaxWidth > maxWidthOfRow) ?
sumMaxWidth : maxWidthOfRow;
- sumMinWidth = (sumMinWidth > minWidthOfRow) ?
+ sumMinWidth = (sumMinWidth > minWidthOfRow) ?
sumMinWidth : minWidthOfRow;
}
@@ -508,15 +508,15 @@ int accumulateColWidth;
/* find widest field in column */
maxWidthOfColumn = 0;
for (y = 0; y < t->numRows; y++ ) {
- maxWidthOfColumn =
- (maxWidthOfColumn >
+ maxWidthOfColumn =
+ (maxWidthOfColumn >
t->table[y * t->numColumns + x].maxWidth)?
- maxWidthOfColumn :
+ maxWidthOfColumn :
t->table[y * t->numColumns+x].maxWidth;
}
/* assign uniform width to column */
for (y = 0; y < t->numRows; y++) {
- t->table[y*t->numColumns + x].colWidth
+ t->table[y*t->numColumns + x].colWidth
= maxWidthOfColumn
+ 2 * FIELD_BORDER_SPACE;
}
@@ -525,10 +525,10 @@ int accumulateColWidth;
/* find highest of minimum heights */
maxHeightOfRow = 0;
for (x=0; x < t->numColumns; x++) {
- maxHeightOfRow =
- (maxHeightOfRow >
+ maxHeightOfRow =
+ (maxHeightOfRow >
t->table[y * t->numColumns + x].minHeight)?
- maxHeightOfRow:
+ maxHeightOfRow:
t->table[y * t->numColumns+x].minHeight;
}
/* assign uniform height to row */
@@ -575,7 +575,7 @@ int accumulateColWidth;
/* format it */
for (y = 0; y < t->numRows; y++) {
field = &(t->table[y*t->numColumns+x]);
- field->colWidth = (int) (percentToShrink *
+ field->colWidth = (int) (percentToShrink *
((float) CalculateMaxWidthOfColumn(t,x)));
field->rowHeight = 0;
numAdjacent = TableHowManyConnectedHorizFields
@@ -587,7 +587,7 @@ int accumulateColWidth;
(percentToShrink *
((float) CalculateMaxWidthOfColumn(t,xx))));
}
-
+
#ifndef DISABLE_TRACE
if (htmlwTrace) {
fprintf(stderr,"About to call PourText\n");
@@ -653,17 +653,17 @@ int accumulateColWidth;
}
/* assign height */
for (x = 0; x < t->numColumns; x++) {
- t->table[y * t->numColumns + x].rowHeight =
+ t->table[y * t->numColumns + x].rowHeight =
maxHeightOfRow;
}
}
/* make sure all widths in a column are the same size */
for (x = 0; x < t->numColumns; x++) {
- maxWidthOfColumn = 0;
+ maxWidthOfColumn = 0;
/* find biggest Width for this column */
for (y = 0; y < t->numRows; y++) {
- maxWidthOfColumn = (maxWidthOfColumn >
+ maxWidthOfColumn = (maxWidthOfColumn >
t->table[y*t->numColumns+x].colWidth)?
maxWidthOfColumn:
t->table[y*t->numColumns+x].colWidth;
@@ -673,7 +673,7 @@ int accumulateColWidth;
t->table[y*t->numColumns+x].colWidth = maxWidthOfColumn;
}
}
-
+
}
@@ -740,7 +740,7 @@ Boolean expandedSomething;
/* check for and take care of previous rowspans */
if (rowCount > 1) {
/* get field above this one */
- previousRow = (List) ListGetIndexedEntry(tableList,
+ previousRow = (List) ListGetIndexedEntry(tableList,
rowCount - 2);/*zero indexed*/
aboveField =(TableField *)ListGetIndexedEntry(previousRow,
*columnCount);
@@ -837,7 +837,7 @@ Boolean fixed;
}
m = m->next;
}
-
+
if (field->header) {
field->font = hw->html.plainbold_font;
}
@@ -904,7 +904,7 @@ char *tptr;
while(TableExpandFields(tableList, rowList,
rowCount, &columnCount));
- /* if: is this the first container | or the
+ /* if: is this the first container
or the
separator */
if (ListHead(ListHead(tableList))) {
rowList = ListCreate();
@@ -1111,8 +1111,8 @@ int yy;
break;
}
/*
- placeY = y + height/2 +
- (field->font->max_bounds.ascent
+ placeY = y + height/2 +
+ (field->font->max_bounds.ascent
- field->font->max_bounds.descent)/2;
*/
@@ -1158,7 +1158,7 @@ int x,y;
x++;
if (x < t->numColumns) {
/* do width */
- while ((x < t->numColumns) &&
+ while ((x < t->numColumns) &&
t->table[y * t->numColumns + x].contHoriz) {
(*expandWidth) += t->table[y * t->numColumns + x].colWidth;
x++;
@@ -1169,14 +1169,14 @@ int x,y;
y++;
if (y < t->numRows) {
/* do height */
- while ((y < t->numRows) &&
+ while ((y < t->numRows) &&
t->table[y * t->numColumns + x].contVert) {
(*expandHeight) += t->table[y * t->numColumns+x].rowHeight;
y++;
}
}
-
-
+
+
}
@@ -1216,7 +1216,7 @@ int expandedWidth,expandedHeight;
if (eptr->table_data->borders){
/*
XDrawRectangle(XtDisplay(hw), XtWindow(hw->html.view),
- hw->html.drawGC,
+ hw->html.drawGC,
x+(eptr->table_data->borders/2),y+eptr->table_data->borders,
eptr->table_data->bwidth,
eptr->table_data->bheight);
@@ -1237,14 +1237,14 @@ int expandedWidth,expandedHeight;
/* draw field borders */
if (eptr->table_data->borders){
if (!field->contVert) { /* draw above line */
- XDrawLine(XtDisplay(hw),
+ XDrawLine(XtDisplay(hw),
XtWindow(hw->html.view),
hw->html.drawGC,
/*hw->manager.bottom_shadow_GC,*/
vertMarker, horizMarker,
vertMarker + colWidth, horizMarker);
/*
- XDrawLine(XtDisplay(hw),
+ XDrawLine(XtDisplay(hw),
XtWindow(hw->html.view),
hw->manager.top_shadow_GC,
vertMarker, horizMarker+1,
@@ -1252,7 +1252,7 @@ int expandedWidth,expandedHeight;
*/
}
if (!field->contHoriz) { /* draw left side*/
- XDrawLine(XtDisplay(hw),
+ XDrawLine(XtDisplay(hw),
XtWindow(hw->html.view),
hw->html.drawGC,
vertMarker, horizMarker,
@@ -1272,10 +1272,10 @@ int expandedWidth,expandedHeight;
vertMarker += colWidth;
field++;
- }
+ }
horizMarker += rowHeight;
- }
+ }
XSetLineAttributes(XtDisplay(hw),
hw->html.drawGC,
diff --git a/libhtmlw/HTMLwidgets.c b/libhtmlw/HTMLwidgets.c
index 90f3b62..9e0df7c 100644
--- a/libhtmlw/HTMLwidgets.c
+++ b/libhtmlw/HTMLwidgets.c
@@ -118,7 +118,7 @@ char **ParseCommaList();
void FreeCommaList();
char *MapOptionReturn();
-static char traversal_table[] =
+static char traversal_table[] =
"\
~Shift ~Meta ~Ctrl Tab: traversal_forward()\n\
Shift ~Meta ~Ctrl Tab: traversal_back()\n\
@@ -524,7 +524,7 @@ CollectSubmitInfo(fptr, name_list, value_list)
cbdata.attribute_count--;
}
break;
-
+
/*** cvarela@ncsa.uiuc.edu: August 17, 1994
Adding multiple submit buttons support ***/
/* mods 3/11/95 -- amb */
@@ -1478,7 +1478,7 @@ PrepareFormEnd(hw, w, fptr)
FormInfo *fptr;
{
#ifdef MOTIF
- XtAddCallback(w, XmNactivateCallback,
+ XtAddCallback(w, XmNactivateCallback,
(XtCallbackProc)CBSubmitForm, (caddr_t)fptr);
#else
XtAddCallback(w, XtNcallback,
@@ -1494,7 +1494,7 @@ PrepareFormReset(hw, w, fptr)
FormInfo *fptr;
{
#ifdef MOTIF
- XtAddCallback(w, XmNactivateCallback,
+ XtAddCallback(w, XmNactivateCallback,
(XtCallbackProc)CBResetForm, (caddr_t)fptr);
#else
XtAddCallback(w, XtNcallback,
@@ -2256,9 +2256,9 @@ MakeWidget(hw, text, x, y, id, fptr)
if(!hw->html.focus_follows_mouse)
{
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(": Arm() traversal_current()"));
}
@@ -2324,7 +2324,7 @@ MakeWidget(hw, text, x, y, id, fptr)
w = XmCreateToggleButton(hw->html.view, widget_name,
arg, argcnt);
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
XtSetMappedWhenManaged(w, False);
@@ -2362,7 +2362,7 @@ MakeWidget(hw, text, x, y, id, fptr)
w = XmCreatePushButton(hw->html.view, widget_name,
arg, argcnt);
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
XtSetMappedWhenManaged(w, False);
XtManageChild(w);
@@ -2400,7 +2400,7 @@ MakeWidget(hw, text, x, y, id, fptr)
w = XmCreatePushButton(hw->html.view, widget_name,
arg, argcnt);
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
XtSetMappedWhenManaged(w, False);
XtManageChild(w);
@@ -2432,7 +2432,7 @@ MakeWidget(hw, text, x, y, id, fptr)
w = XmCreatePushButton(hw->html.view, widget_name,
arg, argcnt);
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
XtSetMappedWhenManaged(w, False);
XtManageChild(w);
@@ -2655,7 +2655,7 @@ MakeWidget(hw, text, x, y, id, fptr)
XtManageChild(button);
XmStringFree(label);
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(button,
+ XtOverrideTranslations(button,
XtParseTranslationTable(traversal_table));
if ((vlist_cnt > 0)&&
(vlist[0] != NULL)&&
@@ -2688,9 +2688,9 @@ MakeWidget(hw, text, x, y, id, fptr)
XtSetArg(arg[argcnt], XmNx, x); argcnt++;
XtSetArg(arg[argcnt], XmNy, y); argcnt++;
/* kill margins */
- XtSetArg(arg[argcnt], XmNmarginWidth, 0);
+ XtSetArg(arg[argcnt], XmNmarginWidth, 0);
argcnt++;
- XtSetArg(arg[argcnt], XmNmarginHeight, 0);
+ XtSetArg(arg[argcnt], XmNmarginHeight, 0);
argcnt++;
XtSetArg(arg[argcnt], XmNsubMenuId, pulldown);
argcnt++;
@@ -2714,12 +2714,12 @@ MakeWidget(hw, text, x, y, id, fptr)
widget_name, arg, argcnt);
if(!hw->html.focus_follows_mouse)
{
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
- XtOverrideTranslations(pulldown,
+ XtOverrideTranslations(pulldown,
XtParseTranslationTable(traversal_table));
}
-
+
argcnt = 0;
xmstr = XmStringCreateSimple ("");
@@ -2822,10 +2822,10 @@ MakeWidget(hw, text, x, y, id, fptr)
w = XmCreateList(scroll, widget_name,
arg, argcnt);
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
XtManageChild(w);
-
+
w = scroll;
for (i=0; ihtml.view, widget_name,
arg, argcnt);
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
-
+
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
/*
* The proper order here is XtSetMappedWhenManaged, XtManageChild. But a bug
@@ -3012,9 +3012,9 @@ MakeWidget(hw, text, x, y, id, fptr)
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
-
+
w = scroll;
@@ -3061,7 +3061,7 @@ MakeWidget(hw, text, x, y, id, fptr)
type = W_TEXTAREA;
cols = atoi(list[0]);
rows = atoi(list[1]);
-
+
/* be a textfield if only one row */
if(rows==1)
type=W_TEXTFIELD;
@@ -3117,7 +3117,7 @@ MakeWidget(hw, text, x, y, id, fptr)
widget_name, arg, argcnt);
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
}
/*
@@ -3158,7 +3158,7 @@ MakeWidget(hw, text, x, y, id, fptr)
XtManageChild(w);
XtOverrideTranslations(w, XtParseTranslationTable(text_translations));
if(!hw->html.focus_follows_mouse)
- XtOverrideTranslations(w,
+ XtOverrideTranslations(w,
XtParseTranslationTable(traversal_table));
@@ -3216,7 +3216,7 @@ MakeWidget(hw, text, x, y, id, fptr)
height = 0;
}
- wptr = AddNewWidget(hw, fptr, w, type, id, x, y, width,
+ wptr = AddNewWidget(hw, fptr, w, type, id, x, y, width,
height, name, value, mapping, checked);
}
else
@@ -3280,7 +3280,7 @@ MakeWidget(hw, text, x, y, id, fptr)
WidgetInfo *wptr;
Dimension width, height;
-
+
wlist = hw->html.widget_list;
while (wlist != NULL)
{
@@ -4148,13 +4148,13 @@ unsigned long bp=BlackPixel(XtDisplay(hw),DefaultScreen(XtDisplay(hw)));
void traversal_forward(Widget w, XEvent *event,
String *params, Cardinal *num_params)
-{
+{
HTMLTraverseTabGroups(w, XmTRAVERSE_NEXT_TAB_GROUP);
}
void traversal_back(Widget w, XEvent *event,
String *params, Cardinal *num_params)
-{
+{
HTMLTraverseTabGroups(w, XmTRAVERSE_PREV_TAB_GROUP);
}
@@ -4227,7 +4227,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
top = (Widget) hw;
while(!XtIsTopLevelShell(top))
top = XtParent(top);
-
+
switch(how)
{
case XmTRAVERSE_NEXT_TAB_GROUP:
@@ -4251,7 +4251,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
}
/* automagickly scroll */
- if(XtIsManaged(hw->html.vbar) &&
+ if(XtIsManaged(hw->html.vbar) &&
(lptr->y > (hw->html.view_height+hw->html.scroll_y-10)))
{
int val, ss, in, pg_in, amount;
@@ -4273,7 +4273,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
Widget text;
XtVaGetValues(lptr->w, XmNworkWindow, &text, NULL);
XtSetKeyboardFocus(top, text);
- }
+ }
else
XtSetKeyboardFocus(top, lptr->w);
break;
@@ -4298,7 +4298,7 @@ void HTMLTraverseTabGroups(Widget w, int how)
}
/* automagickly scroll */
- if(XtIsManaged(hw->html.vbar) &&
+ if(XtIsManaged(hw->html.vbar) &&
(lptr->y < hw->html.scroll_y+10))
{
int val, ss, in, pg_in, amount;
@@ -4329,9 +4329,9 @@ void HTMLTraverseTabGroups(Widget w, int how)
break;
case XmTRAVERSE_CURRENT:
lptr = hw->html.widget_list;
-
+
/* check parent to allow for text areas (lptr->w would be scroll) */
- while(lptr!=NULL)
+ while(lptr!=NULL)
{
if((lptr->w == w) || (lptr->w == XtParent(w)))
break;
diff --git a/libhtmlw/Makefile b/libhtmlw/Makefile
index c6ab52f..2cd288e 100644
--- a/libhtmlw/Makefile
+++ b/libhtmlw/Makefile
@@ -2,7 +2,7 @@ LIBTARGET = libhtmlw.a
all: $(LIBTARGET)
-CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
+CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
OBJS = $(CFILES:.c=.o)
$(OBJS): HTML.h HTMLP.h
diff --git a/libhtmlw/Makefile.in b/libhtmlw/Makefile.in
index 7a080d9..33dd727 100644
--- a/libhtmlw/Makefile.in
+++ b/libhtmlw/Makefile.in
@@ -1,7 +1,7 @@
# @configure_output@
# This file is used by Autoconf to make the real Makefile.
# DO NOT EDIT THIS FILE!
-# If you want to change something do it to the Makefile autoconf
+# If you want to change something do it to the Makefile autoconf
# creates. You should never have to edit this file.
CC= @CC@
@@ -14,7 +14,7 @@ LIBTARGET = libhtmlw.a
all: $(LIBTARGET)
-CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
+CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
OBJS = $(CFILES:.c=.o)
$(OBJS): HTML.h HTMLP.h
diff --git a/libhtmlw/Makefile.orig b/libhtmlw/Makefile.orig
index c6ab52f..2cd288e 100644
--- a/libhtmlw/Makefile.orig
+++ b/libhtmlw/Makefile.orig
@@ -2,7 +2,7 @@ LIBTARGET = libhtmlw.a
all: $(LIBTARGET)
-CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
+CFILES = HTML.c HTMLlists.c HTMLformat.c HTMLparse.c HTMLimages.c HTMLwidgets.c HTML-PSformat.c DrawingArea.c HTMLjot.c HTMLtable.c list.c
OBJS = $(CFILES:.c=.o)
$(OBJS): HTML.h HTMLP.h
diff --git a/libhtmlw/inkstore.h b/libhtmlw/inkstore.h
index c5f172d..810216c 100644
--- a/libhtmlw/inkstore.h
+++ b/libhtmlw/inkstore.h
@@ -8,18 +8,18 @@
** of representatives of Slate Corporation, Lotus Development Corporation,
** GO, Microsoft, Apple, General Magic, and others.
**
-** This document and the accompanying code samples on disk comprise Version
-** 1.0 of the Jot specification for the storage and interchange of electronic
-** ink data. Permission is granted to incorporate and otherwise use any
-** portion of the specification. You may make copies of the specification
-** for distribution to others, provided you include the notice "Copyright
+** This document and the accompanying code samples on disk comprise Version
+** 1.0 of the Jot specification for the storage and interchange of electronic
+** ink data. Permission is granted to incorporate and otherwise use any
+** portion of the specification. You may make copies of the specification
+** for distribution to others, provided you include the notice "Copyright
** 1993, Slate Corporation. All Rights Reserved" on both the document and
-** the disk label. You may not modify this specification without written
+** the disk label. You may not modify this specification without written
** permission from Slate Corporation.
**
-** The specification is provided "as is" without warranty of any kind. Slate
-** further disclaims all implied warranties of merchantability or of fitness
-** for a particular purpose. The entire risk arising out of the use or
+** The specification is provided "as is" without warranty of any kind. Slate
+** further disclaims all implied warranties of merchantability or of fitness
+** for a particular purpose. The entire risk arising out of the use or
** performance of the specification remains with you.
**
**--------------------------------------------------------------------------
@@ -54,10 +54,10 @@
** electronic ink data interchange, and neither assumes nor dictates the
** nature of how the application deals with ink data internally. The format
** is not intended to be the "internal" ink format of an application, though
-** there is no reason why it could not serve such a purpose.
+** there is no reason why it could not serve such a purpose.
**
** The scope and goals of this format design are limited to the represent-
-** ation of electronic ink data embedded in some other electronic document,
+** ation of electronic ink data embedded in some other electronic document,
** not to the larger document itself (such as an e-mail or enhanced word-
** processing data file).
**
@@ -70,28 +70,28 @@
** or sub-strokes, and then storing a list of encodings of these sub-strokes.
** In other words, Jot preserves all information about the original input as
** opposed attempting any sort of abstract characterization of the input.
-**
+**
** The storage format has a number of properties:
-**
+**
** * Simple. Typical operations on the ink data are easy. If you only wish
** to read stroke coordinates and bounding information from the data,
** complex information that might be present will not hinder the process.
** Likewise, it is easy to write out just simple information. The
** complex information is all optional.
-**
-** * Compact. The storage format is intended to be as compact as possible
+**
+** * Compact. The storage format is intended to be as compact as possible
** without sacrificing simplicity or fidelity. Optional information such
** as time stamps or color specifications occupy space only when they are
** present. Specifications that apply to many strokes (such as line width
** or color) are represented just once.
-**
+**
** * Compression. The stroke information that describes the ink can
** optionally be represented in a compressed format. Compression
** techniques include both compression and reduction of the ink data.
-**
+**
** * Inclusive. The format is capable of storing every property of ink
-** conceivable as of today.
-**
+** conceivable as of today.
+**
** * Expandable and Compatible. The format is expandable, so as developers
** discover new information that should be recorded in an ink storage
** format, these new features can be added without changing the behavior of
@@ -100,21 +100,21 @@
** applications reading older versions of the format. Likewise, new
** application programs can handle previous versions of the format without
** special work.
-**
+**
** The format is not designed to easily support lots of in-memory
** manipulation of the ink data, such as deleting strokes, changing line
** widths, and so on. A format supporting these types of manipulations would
** be at odds with the above goals. All the information needed to perform
** these manipulations is present in this data format, so an application
** might augment this format to facilitate manipulation of the ink data.
-**
+**
** Applications are likely to use some other format internally for real-time
** ink manipulation. Many operating environments provide some internal means
** for storing and manipulating ink data, the details of which may be hidden
** to some extent from the application designer. Many such real-time data
** structures store fewer types of and/or less information (such as not
** preserving information about the tablet point data rate) than are covered
-** in this definition.
+** in this definition.
**
**------------------------------------------------------------------------*/
@@ -141,15 +141,15 @@
** April 12, 1993 - Release of version 0.99 of the specification. Moved
** reference sections 28 and 29 to a separate file called
** sample.h
-** May 01, 1993 - Release of version 1.00 of the specification.
-** Changed INK_OFFSET_RECORD units from twips to pen
+** May 01, 1993 - Release of version 1.00 of the specification.
+** Changed INK_OFFSET_RECORD units from twips to pen
** units for consistency and ease of implementation.
** Fixed a typo in reference section 26.0 in the diagram.
** The text accompanying the diagram was correct.
** Fixed a typo in reference section 27.0. The old text
** "delta-X == 0 or 1" was replaced with the correct text
** "delta-X == 2". The accompanying diagram was correct.
-** Removed all sizeof() constructs and replaced with
+** Removed all sizeof() constructs and replaced with
** appropriate #defines to reduce compiler dependencies.
** Tagged all struct definitions with tag_ prefix.
** Added comments and reordered some existing comments.
@@ -171,12 +171,12 @@
** storage of point data in "standard compression" format. Sign bits are
** used to indicate item types, so the bytes are stored high-order to low-
** order (exactly opposite). See the sample code and reference section 23.0
-** for more information on the compressed format. Uncompressed data is
+** for more information on the compressed format. Uncompressed data is
** written in Intel order.
**
** All structures are packed for the purposes of writing to a stream.
-**
-** Signed integer values are two's-complement. Rectangles are stored
+**
+** Signed integer values are two's-complement. Rectangles are stored
** x,y,w,h.
**
** These definitions are intended to insulate the sample ink compaction and
@@ -193,13 +193,13 @@
** Record Sequence
** ---------------
**
-** In this document, one piece of ink data is called an ink bundle.
+** In this document, one piece of ink data is called an ink bundle.
** Typically this might correspond to the strokes that make up the ink from
** the time when the pen touches down until the user finishes writing
** (usually determined by a timeout or the pen leaving proximity). Thus an
** ink bundle usually contains many ink strokes, and the strokes do not have
** to describe a continuous line of ink.
-**
+**
** As stated in reference section 5.0, all data conforming to this
** specification appears as a stream of ink bundles each of which must begin
** with an INK_BUNDLE_RECORD and end with an INK_END_RECORD. There may be
@@ -215,7 +215,7 @@
** INK_GROUP_RECORD optional // tags the following PENDATA
** INK_PENDATA_RECORD recommended // actual points
** INK_GROUP_RECORD optional // tags the following PENDATA
-** INK_PENDATA_RECORD recommended // actual points
+** INK_PENDATA_RECORD recommended // actual points
** INK_PENDATA_RECORD recommended // more points in same group
** INK_SCALE_RESET_RECORD optional // resets to default scaling/offset
** INK_PENDATA_RECORD recommended // actual points
@@ -223,32 +223,32 @@
** INK_END_RECORD required // end of bundle number one
**
** It is perfectly reasonable to write out only the following (though doing
-** so will cause the ink to be rendered in a completely default manner --
+** so will cause the ink to be rendered in a completely default manner --
** black hairline width at 1:1 scaling with offset 0):
**
** INK_BUNDLE_RECORD
** INK_PENDATA_RECORD
** INK_END_RECORD
-**
+**
**
** Specification Revisions
** -----------------------
-**
-** Future enhancements to this specification may modify certain record types.
-** It is guaranteed that any record modified in a subsequent revision of the
-** specification will be a strict superset of that record's definition in any
-** previous revision of the specification. That is, modified record types
-** will only be lengthened, not shortened. If a particular record type must
-** be extended such that it would not be a superset of the original, a new
-** record type would be added to cover that particular extension.
-**
-** This extension strategy has two important ramifications:
**
-** 1) A reading application should *ALWAYS* use the size of a record as
+** Future enhancements to this specification may modify certain record types.
+** It is guaranteed that any record modified in a subsequent revision of the
+** specification will be a strict superset of that record's definition in any
+** previous revision of the specification. That is, modified record types
+** will only be lengthened, not shortened. If a particular record type must
+** be extended such that it would not be a superset of the original, a new
+** record type would be added to cover that particular extension.
+**
+** This extension strategy has two important ramifications:
+**
+** 1) A reading application should *ALWAYS* use the size of a record as
** recorded in the record structure itself (i.e., the recordLength field
** of the INK_RECORD_HEADERx structure) rather than the sizeof() or any
-** other size determined at compile time to determine how may bytes to
-** read as the data structures are parsed. This is due to the fact that
+** other size determined at compile time to determine how may bytes to
+** read as the data structures are parsed. This is due to the fact that
** a record may grow in a future revision of the standard. The only
** exception to this rule is the INK_BUNDLE_RECORD which contains a
** version number that will be modified with each change to that record.
@@ -256,17 +256,17 @@
** version used at compile time, the size of the record should exactly
** match the #define of inkRecordBundleSize.
**
-** 2) Any particular record may be read into a target data structure up to
-** the size of the target data structure and the rest may be ignored.
-** This is due to the 'strict superset' rule which means that any
+** 2) Any particular record may be read into a target data structure up to
+** the size of the target data structure and the rest may be ignored.
+** This is due to the 'strict superset' rule which means that any
** extension of any record type must leave the meaning, content, and size
** of any existing fields as is. So, for example, if an INK_SCALE_RECORD
** was modified by adding 2 bytes, the reading application can safely read
** the data into the INK_SCALE_RECORD known at compile time and throw
-** away the extra two bytes: the header, x, and y will be in the same
+** away the extra two bytes: the header, x, and y will be in the same
** place and will have the same meaning.
**
-**
+**
** Files of Ink
** ------------
**
@@ -386,14 +386,14 @@ typedef struct tag_XY16 {
} XY16, FAR *P_XY16;
/*-------------------------------------------------------------------------
-** Note:
+** Note:
** Angles from vertical can exceed +-90 degrees: in this case, the "back" end
** of the stylus is nearer the tablet surface than the "front" end.
**-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
-** Note:
-** Standard compaction will normally store angles in nibbles, or single
+** Note:
+** Standard compaction will normally store angles in nibbles, or single
** bytes, rather than in four-byte records.
**-------------------------------------------------------------------------*/
@@ -505,7 +505,7 @@ typedef U16 INK_RECORD_TYPE, FAR *P_INK_RECORD_TYPE;
)
/*-------------------------------------------------------------------------
-** Note: most compilers will not generate code for the above macro but will
+** Note: most compilers will not generate code for the above macro but will
** determine the proper value at compile time.
**-------------------------------------------------------------------------*/
@@ -598,7 +598,7 @@ typedef struct tag_INK_RECORD_HEADER32 {
** the following minimum requirements:
**
** 1) header.recordType == INK_RECORD_BUNDLE
-** 2) header.recordLength >= inkRecordBundleSize (See general notes in
+** 2) header.recordLength >= inkRecordBundleSize (See general notes in
** reference section 1.0 for important information about record sizes.)
** 3) compactionType is an expected and supported value
** 4) penUnitsPerX and penUnitsPerY seem reasonable and expected:
@@ -628,7 +628,7 @@ typedef struct tag_INK_END_RECORD {
** data, while smaller, is still whole. That is, compression under Jot is
** loss-less. Compaction refers to a process where certain pieces of less
** important data are actually omitted from the stream and are possibly
-** reconstructed by the reader of the data.
+** reconstructed by the reader of the data.
**
** Using Jot, a writing application may choose to compress only, compact only
** or use some combination. The standard compression mechanism defined here
@@ -654,13 +654,13 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
/*************************/
/*-------------------------------------------------------------------------
-** The INK_BUNDLE_FLAGS contain some flags that apply to an entire bundle.
+** The INK_BUNDLE_FLAGS contain some flags that apply to an entire bundle.
** If you wanted to store several pieces of ink that had different
** INK_BUNDLE_FLAGS, you would do it by storing several different bundles.
**
** Advisory flags:
**
-** inkPointsRemoved
+** inkPointsRemoved
** Indicates whether all original points are still present or whether
** some points were removed to save space. For applications that are
** only interested in the visual aspects of ink, many points can be
@@ -677,12 +677,12 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
** replacing individual points with an "elided point" item does not
** constitute removing points. ("Elided" means omitted or skipped).
**
-** inkProxDataRemoved
+** inkProxDataRemoved
** Indicates that the original points between strokes (proximity) were
** removed to save space. An out-of-prox point should be stored between
** strokes to delimit them. Some applications depend on knowing the
** time between strokes or at the ends of strokes for certain
-** functions.
+** functions.
**
** Note:
** "Proximity" is defined as the stylus being close enough to the tablet
@@ -691,17 +691,17 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
** recommended practice is to include "out of proximity" points in the
** recorded ink data when they are used as part of determining the
** amount of time a stylus was out of contact with the tablet, or for
-** triggering the completion of an action such as a "gesture".
+** triggering the completion of an action such as a "gesture".
**
-** inkStrokeLimitsPresent
+** inkStrokeLimitsPresent
** Indicates that INK_BUTTONS items are also present, and that they
** indicate what the storing app decided the stroke start/end points
** were. (Note: the reading application may otherwise use a different
-** algorithm for using tip force values to delimit strokes.)
+** algorithm for using tip force values to delimit strokes.)
**
** Note:
** If inkStrokeLimitsPresent is set, then inkButtonDataPresent must also
-** be set.
+** be set.
**
** Data flags:
**
@@ -716,7 +716,7 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
** the offset value is added ("pre-multiply")
** rather than after ("post-multiply")
**
-** Note:
+** Note:
** A previous draft version included a provision for compacting data to an
** approximation based on Bezier curves. Initial results did not show
** promise in terms of efficiency and performance.
@@ -728,7 +728,7 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
** not be used directly to render the data. The definition of these anchor
** and control points, and the example code for the approximation and
** regeneration of the "true" coordinates could not be worked out at this
-** time.
+** time.
**
** Some standard values for pen units per meter follow:
**
@@ -742,7 +742,7 @@ typedef U8 INK_COMPACTION_TYPE, FAR *P_INK_COMPACTION_TYPE;
**
** The specific format for each of these types of data is described in the
** INK_PENDATA_RECORD documentation (reference section 8.0).
-**
+**
** Note:
** The order in which these flags are defined has nothing to do with the
** order in which the data appears in the INK_POINT structure when reading
@@ -798,7 +798,7 @@ typedef struct tag_INK_BUNDLE_RECORD {
/*-------------------------------------------------------------------------
** A penData record contains the actual pen data for one or more pen strokes.
-** The bounds applies to all the strokes contained within this record.
+** The bounds applies to all the strokes contained within this record.
** Multiple strokes are typically grouped into one record to increase the
** efficiency of the compression algorithm, though strokes may be stored
** individually, if desired.
@@ -823,7 +823,7 @@ typedef struct tag_INK_BUNDLE_RECORD {
** written by other applications that might group multiple strokes
** into a single INK_PENDATA_RECORD.
**
-** Note:
+** Note:
** In practice, our experience is that unpacking the data in order to compute
** the bounds for each stroke to check for strokes that intrude into a given
** region is not an excessive burden. The checks that would have been done
@@ -860,31 +860,31 @@ typedef struct tag_INK_PENDATA_RECORD {
** of one) is represented as 0x00010000, a scale of 0.5 as 0x00008000.
**
** Note:
-** All ink is located relative to the lower-left (0,0) corner of a logical
-** page or window. Scale and offset operations are cumulative, much in the
+** All ink is located relative to the lower-left (0,0) corner of a logical
+** page or window. Scale and offset operations are cumulative, much in the
** same way as in PostScript. One begins with a normalized graphics state
-** and sequentially applies the scale and offset operations to that matrix.
+** and sequentially applies the scale and offset operations to that matrix.
** The INK_SCALE_RESET record returns the graphics state to its default state
** (i.e., the transformation matrix is set to an identity matrix and the
** offset is reset to the default of 0). By default, scaling is applied
** after adding in any offset specified in an INK_OFFSET_RECORD. If the ink
** bundle has the inkPreMultiplyScale bit set, for all ink in that bundle
** scaling is applied before adding in any offset.
-**
+**
** As used in this format, ink scale and offset values are set by the storing
** application, to be applied by the rendering application. If the storing
** application collected the ink at scales of (2.0,2.0), the storing
** application should insert an INK_SCALE_RECORD with a scale of (0.5,0.5)
** for the rendering application to multiply all ink X and Y coordinates by.
**
-** It is the responsibility of the storing application to deal with any
+** It is the responsibility of the storing application to deal with any
** effects from round-off or truncation error due to the limits of precision
** in the FIXED_FRACTION values used in INK_SCALE_RECORDs.
**
** An ink scale record indicates a scale change that stays in effect until
** another ink scale record is encountered. Ink scale values compound: if
** the current scale is (2.0,2.0) and an INK_SCALE_RECORD is encountered with
-** scale of (2.0,3.0), the scale to be applied to ink then becomes(4.0,6.0).
+** scale of (2.0,3.0), the scale to be applied to ink then becomes(4.0,6.0).
** In absence of any ink scale record, the default ink scale is unity. In
** general, a typical usage pattern for an application that supports drawing
** ink while zoomed at scale is to record a number of strokes at a given
@@ -940,10 +940,10 @@ typedef struct tag_INK_SCALE_RECORD {
** would have an offset position, markup ink over an entire form would not
** have a offset position (or would have an offset position of (0,0) and a
** scale of (1,1)) because it is relative to the entire form coordinate
-** system, not relative to some piece in the form.
+** system, not relative to some piece in the form.
**
** Note:
-** This approach allows a reader to "blindly" apply the scale and offset
+** This approach allows a reader to "blindly" apply the scale and offset
** values specified to ink data, and puts the burden for computing
** compounding of multiple zoom levels, etc., on the writing application.
**
@@ -993,10 +993,10 @@ typedef struct tag_INK_SCALE_RESET_RECORD {
** "erase" function, such as the ability to erase annotation ink on an
** "original" document (perhaps a FAX image) the "erase" color restores the
** background image where painted. The "background image" is defined by the
-** rendering application.
+** rendering application.
**
** Applications which do not support a true "erase" function may interpret
-** this as some other drawing function, such as drawing the "background"
+** this as some other drawing function, such as drawing the "background"
** color.
**
**------------------------------------------------------------------------*/
@@ -1022,8 +1022,8 @@ typedef struct tag_INK_COLOR_RECORD {
/*-------------------------------------------------------------------------
** Standardized opacity values:
** A recommended practice is that an opacity value of 128 (midway between
-** 0 and 255) be used for "highlighter" colors. A recommended practice is
-** that grey values as defined below be used for "standard grey"
+** 0 and 255) be used for "highlighter" colors. A recommended practice is
+** that grey values as defined below be used for "standard grey"
** highlighters.
**-------------------------------------------------------------------------*/
@@ -1055,7 +1055,7 @@ typedef struct tag_INK_COLOR_RECORD {
/*-------------------------------------------------------------------------
** Time is measured in milliseconds.
-**
+**
** Note:
** Because of the difficulty synchronizing clocks on different machines
** at the time granularity of digitizing tablets, and because the "editing"
@@ -1069,12 +1069,12 @@ typedef struct tag_INK_COLOR_RECORD {
** End time records are not required. The interpretation of an end time
** which is in conflict with the end time inferred from the assumed data rate
** of points and the number of points (including elided points) is not
-** defined.
+** defined.
**
** Start time is the time for the first point in the following penData record
** and end time is the time of the last point in the following penData
** record, because if you are recording tip force, the exact definition of
-** pen up and pen down may be fuzzy and/or application dependent.
+** pen up and pen down may be fuzzy and/or application dependent.
**
**------------------------------------------------------------------------*/
@@ -1107,7 +1107,7 @@ typedef struct tag_INK_END_TIME_RECORD {
/*-------------------------------------------------------------------------
** INK_PENDATA_RECORDs can be grouped. If they are grouped, each
** INK_PENDATA_RECORD can be assigned a group number. All
-** INK_PENDATA_RECORDs with the same group number belong to the same group.
+** INK_PENDATA_RECORDs with the same group number belong to the same group.
**
** The exact interpretation of grouping is up the applications involved.
** Writing applications may group ink data, but not all reading applications
@@ -1156,7 +1156,7 @@ typedef struct tag_INK_GROUP_RECORD {
/**************************/
/*-------------------------------------------------------------------------
-** Some applications may support the idea of rendering ink as if it were
+** Some applications may support the idea of rendering ink as if it were
** drawn by a certain shaped pen tip. The most common pen tips would be
** round or rectangular. The exact details of how to render a given pen
** tip will be application specific, but this record states what pen tip
@@ -1169,15 +1169,15 @@ typedef struct tag_INK_GROUP_RECORD {
** at the end of the structure.
**
** The writing application should be aware that the reading application will
-** only do "the best possible" job of rendering and that fully compliant
+** only do "the best possible" job of rendering and that fully compliant
** reading applications may not be able to render certain nib types and/or
** colors. Both reading and writing applications should pay particular
** attention to the following notes regarding defaults and ink drawn at a
** width of zero.
-**
+**
** A pen tip which is drawing ink in zero width renders at the minimum
** visible width the reading application will support.
-**
+**
** A recommended practice is that ink which should not render (should this
** be called for) be drawn with a color value of (0,0,0, 0), i.e., black,
** completely transparent.
@@ -1185,14 +1185,14 @@ typedef struct tag_INK_GROUP_RECORD {
** Pen tip size should scale when an INK_SCALE_RECORD is encountered. The
** writing application should write a new INK_PENTIP_RECORD after an
** INK_SCALE_RECORD if the writing application does not want the pen tip
-** size to scale along with the ink. If the pen tip scales to zero width,
+** size to scale along with the ink. If the pen tip scales to zero width,
** it should be rendered by the reading application according to the comment
** above.
**
** The default pen tip if no pentip record exists is INK_PENTIP_ROUND, with a
** width of one twip. The dimensions of a round nib specify diameter, not
** radius: the X/Y coordinate is the center of this diameter. Similarly, for
-** for rectangular nibs, the X/Y coordinate is the center of the rectangle.
+** for rectangular nibs, the X/Y coordinate is the center of the rectangle.
**
** Note:
** This specification does not specify information for an algorithmic
@@ -1201,7 +1201,7 @@ typedef struct tag_INK_GROUP_RECORD {
** application to draw wider ink as the user presses down harder with the
** stylus. Applications wishing to implement such features may do so using
** application-specific record types for this revision of the specification.
-**
+**
**------------------------------------------------------------------------*/
typedef S16 INK_PENTIP, FAR *P_INK_PENTIP;
@@ -1248,7 +1248,7 @@ typedef struct tag_INK_PENTIP_RECORD {
/*-------------------------------------------------------------------------
** For some applications, it will be important to know the sampling rate of
-** the pen digitizer.
+** the pen digitizer.
**
** This record would likely be present once in a bundle and would typically
** be after the INK_BUNDLE_RECORD, but before the first pen data.
@@ -1259,7 +1259,7 @@ typedef struct tag_INK_PENTIP_RECORD {
** ink at the specified rate. It is likely that most types of rendering
** applications will render ink as rapidly as possible to construct a display
** in minimum time, and that some types of animation applications will
-** intentionally set an arbitrary sampling rate to vary the display rate.
+** intentionally set an arbitrary sampling rate to vary the display rate.
**
** Note:
** For hardware which supports a highly variable sampling rate, the writing
@@ -1328,15 +1328,15 @@ typedef struct tag_INK_UNITS_PER_Z_RECORD {
** start and end are likely to differ, a recommended practice for writing
** applications that use the tip force value to determine the "touch" points
** in a stroke is to mark those points using the touch bit in the INK_BUTTONS
-** structure.
+** structure.
**
** It is also recommended that vendors supporting tip force sensing in their
-** hardware linearize their transducers to the greatest extent possible.
+** hardware linearize their transducers to the greatest extent possible.
**
** Because of the likelihood that tip force transducers may not be accurately
** linearized, negative tip force values, while perhaps somewhat absurd
-** are possible and are permitted in this specification.
-**
+** are possible and are permitted in this specification.
+**
**------------------------------------------------------------------------*/
typedef struct tag_INK_UNITS_PER_FORCE_RECORD {
@@ -1366,8 +1366,8 @@ typedef struct tag_INK_UNITS_PER_FORCE_RECORD {
** subRecordTypes that they wish to use. Then, using these subRecordTypes
** they can put a wide variety of information into the file. By examining
** the appData signature and comparing it to theirs, an application can
-** decide whether it knows how to interpret the various subRecordtypes.
-**
+** decide whether it knows how to interpret the various subRecordtypes.
+**
**------------------------------------------------------------------------*/
typedef struct tag_INK_APP_RECORD {
@@ -1393,16 +1393,16 @@ typedef struct tag_INK_APP_RECORD {
** Uncompacted point format:
** -------------------------
**
-** This structure immediately follows the rest of the INK_PENDATA_RECORD.
+** This structure immediately follows the rest of the INK_PENDATA_RECORD.
** The structure has several optional components, present or not present as
** indicated by the INK_BUNDLE_FLAGS in the INK_BUNDLE_RECORD. The format is
** a sequence of "point values", each containing all the scalar data for each
-** sampled tablet point.
-**
+** sampled tablet point.
+**
** In the uncompacted format, there is a single structure that contains all
** of the state information for each point from the tablet. Components not
** present (as indicated by the INK_BUNDLE_FLAGS) are just that: not present,
-** do not exist, do not occupy space.
+** do not exist, do not occupy space.
**
** Compacted point format:
** -----------------------
@@ -1416,7 +1416,7 @@ typedef struct tag_INK_APP_RECORD {
** force data, and explicit starts and ends of strokes: the starts and ends
** of the strokes are then points that were considered to be such by the
** original application storing the data. The INK_BUTTONS record reflects
-** the state of the next X/Y point following.
+** the state of the next X/Y point following.
**
**------------------------------------------------------------------------*/
@@ -1493,12 +1493,12 @@ typedef U32 INK_BUTTONS, FAR * P_INK_BUTTONS;
/**************************/
/*-------------------------------------------------------------------------
-** INK_POINT data. The INK_POINT structure varies in size depending on
+** INK_POINT data. The INK_POINT structure varies in size depending on
** flags set in the bundle header. The XY32 position is always present, but
** the force, rho, height, angle, and buttons members are only present when
** indicated by the corresponding flag in the bundle header. When optional
** data is present, it is present in the order defined by this structure;
-** that is, position, force, height, rho, angle, and finally buttons.
+** that is, position, force, height, rho, angle, and finally buttons.
**
** The INK_POINT structure has the following elements:
**
@@ -1511,20 +1511,20 @@ typedef U32 INK_BUTTONS, FAR * P_INK_BUTTONS;
** height - optional, present if inkHeightDataPresent is asserted
** Units are in pen unitsPerZ as specified by inkPointDefaultUnitsPerZ or
** by an INK_UNITS_PER_Z_RECORD, whichever is appropriate. Units increase
-** as the stylus is taken away from the tablet. Zero means "just in
+** as the stylus is taken away from the tablet. Zero means "just in
** contact". Negative values could possibly result from spring action if
** the stylus is pressed hard, or if the tablet is not perfectly accurate.
** rho - optional, present if inkRotationDataPresent is asserted
-** Angles are measured in degrees from some nominal orientation of
-** "stylus button on top" (somewhat arbitrary). Angles increase with
+** Angles are measured in degrees from some nominal orientation of
+** "stylus button on top" (somewhat arbitrary). Angles increase with
** clockwise rotation as seen from the rear end of the stylus.
** angle - optional, present if inkAngleDataPresent is asserted
-** Angles are measured in pen angle units from the vertical. Theta
+** Angles are measured in pen angle units from the vertical. Theta
** increases in the positive-X direction, phi in the positive-Y.
** buttons - optional, present if inkButtonDataPresent is asserted
-**
+**
** When the INK_BUNDLE_RECORD member compactionType is inkStdCompression,
-** all data in this structure is compressed according to the methods
+** all data in this structure is compressed according to the methods
** described in reference section 23.0. For more details on how to interpret
** the compressed data stream, see the sample code. The bundle flags which
** indicate whether a particular piece of data is present are used regardless
@@ -1532,12 +1532,12 @@ typedef U32 INK_BUTTONS, FAR * P_INK_BUTTONS;
** in compressed format, it is NOT written in Intel order but rather most
** significant byte first. In compressed form, some of the eight bit delta
** values are reserved for button data and elided (skipped) point counts.
-** This has two important ramifications. 1) When expecting a point,
+** This has two important ramifications. 1) When expecting a point,
** compacted button data or elided point data may be encountered instead, and
** 2) when the inkButtonDataPresent flag is asserted in the bundle header,
** button data will appear in the place of a point and not in addition to a
** point. If inkButtonDataPresent is not asserted, the reader need not check
-** the point data for the special case of button data; however, the point
+** the point data for the special case of button data; however, the point
** data must still be checked to see if it is a count of elided points rather
** than an actual point.
**
@@ -1561,7 +1561,7 @@ typedef struct tag_INK_POINT {
/*-------------------------------------------------------------------------
-** The following default values are assumed before the start of any
+** The following default values are assumed before the start of any
** INK_BUNDLE:
**
**------------------------------------------------------------------------*/
@@ -1587,7 +1587,7 @@ typedef struct tag_INK_POINT {
**
** A recommended practice is always to use the compacted point format, not
** the uncompacted point format. Sample code for reading and writing the
-** compacted format is included in an appendix.
+** compacted format is included in an appendix.
**
** This structure also immediately follows the rest of the
** INK_PENDATA_RECORD.
@@ -1601,10 +1601,10 @@ typedef struct tag_INK_POINT {
** The storing application, as an alternative to eliminating points, can
** specify a "skip" record for elided points. The skipRecord indicates that
** a number of points were skipped, and the reading application is free to
-** insert values for the elided points (interpolating where appropriate).
+** insert values for the elided points (interpolating where appropriate).
** The intent is to allow for accurate time information to be maintained
** between time stamps for synchronization with recorded voice, press-hold
-** gesture recognition, etc.
+** gesture recognition, etc.
**
** Compacted data is written most significant byte first so that reading
** applications can read the first byte and determine (from the top two bits)
@@ -1618,9 +1618,9 @@ typedef struct tag_INK_POINT {
** and MAX_S7. Similarly, the reserved encoding for 8 bit deltas are all 8
** bit delta pairs where both X and Y are within the inclusive range MIN_S3
** and MAX_S3. In revision 1.0 of Jot, three of the reserved encodings for 8
-** bit deltas are used for special cases: skip counts (reference section
+** bit deltas are used for special cases: skip counts (reference section
** 27.0) and button changes (reference section 26.0).
-**
+**
** x/y position:
** ------------
**
@@ -1744,7 +1744,7 @@ typedef struct tag_INK_POINT {
** |1|0|(S3 delta-theta)|(S3 delta-phi)|
** -------------------------------------
**
-** Note:
+** Note:
** Leading bit values of |1|1| are reserved
**
**------------------------------------------------------------------------*/
@@ -1760,16 +1760,16 @@ typedef struct tag_INK_POINT {
** Since the X/Y data is always present, we use some of the reserved delta
** encodings to encode button states and elided (skipped) points. We use the
** 8-bit delta encodings that are unused: the values that can fit into the
-** smaller 4-bit delta encodings.
+** smaller 4-bit delta encodings.
**
** Button/tip records:
** ------------------
**
** It is assumed that the state of barrel buttons and the touching sensor on
** the stylus change infrequently. A compacted button/tip record is only
-** included when the state changes in one of the switches. The button state
-** value applies to the X/Y point immediately following the button state
-** record.
+** included when the state changes in one of the switches. The button state
+** value applies to the X/Y point immediately following the button state
+** record.
**
**
** (Taken from 8-bit byte delta X/Y: two bytes total)
@@ -1779,7 +1779,7 @@ typedef struct tag_INK_POINT {
** (delta-X) (delta-Y)
**
** An eight-bit delta with delta-X == 0 or 1, and delta-Y in the range
-** (-4..3) indicates a button state encoding.
+** (-4..3) indicates a button state encoding.
**
** It is likely to be the case that many hardware platforms have only one
** barrel button.
@@ -1794,10 +1794,10 @@ typedef struct tag_INK_POINT {
**
** The lowest order bit of the delta-X bits is used to indicate that
** additional bytes follow: "1" indicates that the next byte is used for the
-** next 7 barrel buttons with state. The high order bit of each sequential
+** next 7 barrel buttons with state. The high order bit of each sequential
** byte in the series is "1" if an additional byte must be fetched, "0"
-** otherwise. In these additional bytes, the additional buttons are
-** associated in order starting with the low-order bit.
+** otherwise. In these additional bytes, the additional buttons are
+** associated in order starting with the low-order bit.
**
**------------------------------------------------------------------------*/
@@ -1825,10 +1825,10 @@ typedef struct tag_INK_POINT {
** skip count value.
**
** The elided points are points removed between the point immediately prior
-** to the skipped-point record and the point immediately afterward. This
-** implies that at least one point must follow every skip record (though
+** to the skipped-point record and the point immediately afterward. This
+** implies that at least one point must follow every skip record (though
** the point may not appear next in the stream if there are intervening
-** button state transitions). Reading applications that are interested in
+** button state transitions). Reading applications that are interested in
** recovering elided points will typically interpolate. Skip counts of zero
** are meaningless and not permitted.
**
diff --git a/libhtmlw/list.c b/libhtmlw/list.c
index 1d67ab8..0847aff 100644
--- a/libhtmlw/list.c
+++ b/libhtmlw/list.c
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -18,7 +18,7 @@
* list contains pointers to the head, tail, and current list position.
* the list itsself is doubly linked with both next and previous pointers.
*
- * ddt
+ * ddt
*/
#include
#include "listP.h"
@@ -166,7 +166,7 @@ struct LISTINSTANCE *m;
FREE(m);
}
FREE(theList);
-
+
}
@@ -202,7 +202,7 @@ struct LISTINSTANCE *l;
theList->current = l;
theList->listCount++;
-
+
return(1);
}
@@ -230,7 +230,7 @@ struct LISTINSTANCE *l;
theList->current = l;
return(NIL);
-
+
}
/*
@@ -297,7 +297,7 @@ List theList;
char *entry;
int count;
struct LISTINSTANCE *saveCurrent;
-*/
+*/
if (theList) {
return(theList->listCount);
}
diff --git a/libhtmlw/list.h b/libhtmlw/list.h
index 29c3e0e..43adcb3 100644
--- a/libhtmlw/list.h
+++ b/libhtmlw/list.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
diff --git a/libhtmlw/listP.h b/libhtmlw/listP.h
index 79871ad..eba14a3 100644
--- a/libhtmlw/listP.h
+++ b/libhtmlw/listP.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -27,7 +27,7 @@ struct LISTINSTANCE {
struct LISTSTRUCT {
struct LISTINSTANCE *head;
struct LISTINSTANCE *tail;
- struct LISTINSTANCE *current;
+ struct LISTINSTANCE *current;
int listCount;
};
diff --git a/libnet/collage.h b/libnet/collage.h
index 826861a..4637b39 100644
--- a/libnet/collage.h
+++ b/libnet/collage.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
diff --git a/libnet/doodle.h b/libnet/doodle.h
index 24d8ab4..3f1b35d 100644
--- a/libnet/doodle.h
+++ b/libnet/doodle.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
diff --git a/libnet/list.c b/libnet/list.c
index 5a17f6b..d0b0486 100644
--- a/libnet/list.c
+++ b/libnet/list.c
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -152,7 +152,7 @@ struct LISTINSTANCE *m;
FREE(m);
}
FREE(theList);
-
+
}
@@ -186,7 +186,7 @@ struct LISTINSTANCE *l;
}
theList->current = l;
-
+
return(1);
}
@@ -214,7 +214,7 @@ struct LISTINSTANCE *l;
theList->current = l;
return(NIL);
-
+
}
/*
diff --git a/libnet/list.h b/libnet/list.h
index 5d4356d..3f92b9d 100644
--- a/libnet/list.h
+++ b/libnet/list.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
diff --git a/libnet/listP.h b/libnet/listP.h
index 4198bee..a768958 100644
--- a/libnet/listP.h
+++ b/libnet/listP.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -27,7 +27,7 @@ struct LISTINSTANCE {
struct LISTSTRUCT {
struct LISTINSTANCE *head;
struct LISTINSTANCE *tail;
- struct LISTINSTANCE *current;
+ struct LISTINSTANCE *current;
};
#endif
diff --git a/libnet/mesg.c b/libnet/mesg.c
index 1149ccb..6cc3486 100644
--- a/libnet/mesg.c
+++ b/libnet/mesg.c
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
diff --git a/libnet/net.c b/libnet/net.c
index b8551e3..5f70db6 100644
--- a/libnet/net.c
+++ b/libnet/net.c
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -62,8 +62,8 @@ static char rcs_id[] = "$Id: net.c,v 1.4 1995/10/15 18:48:57 spowers Exp $";
* most case.
*
*
- * mods:
- * 2/22/93 (ddt) print out message if user has loaded unsupported
+ * mods:
+ * 2/22/93 (ddt) print out message if user has loaded unsupported
* dimensional array
*/
@@ -261,7 +261,7 @@ SQueue *sq;
while(sq) {
if (sq->netPort == netPort) {
ListDeleteEntry(sendQueue,sq);
- if (sq->failCB)
+ if (sq->failCB)
sq->failCB(sq->data,sq->failCBData);
FREE(sq->header);
FREE(sq);
@@ -278,7 +278,7 @@ static int NetUserListAdd(name)
char *name;
{
char *p;
-
+
if ((!name) || (!strlen(name)))
return(-1);
p = (char *) ListHead(userList);
@@ -341,7 +341,7 @@ void DEFUN(NetSetUserID,(user), char *user)
else if (!user && userID)
userID = NULL;
}
-
+
static DOCB *NetSearchByName(name,list)
char *name;
@@ -357,7 +357,7 @@ DOCB *docb;
docb = (DOCB *) ListNext(list);
}
return((DOCB *) 0);
-
+
}
@@ -372,11 +372,11 @@ caddr_t changeData;
void (*destroy)(); /* Data object destroyed callback */
caddr_t destroyData;
{
- DOCB *docb;
+ DOCB *docb;
char itsNew;
/*Yeah this is huge,repetitive and could easily be condensed, but it
- wasn't when I started, and I don't feel like changing it now
+ wasn't when I started, and I don't feel like changing it now
condensed on Feb 93 by gbourhis */
#define REGISTERMODULE(list) \
do { \
@@ -455,13 +455,13 @@ caddr_t destroyData;
};
-
+
return(1);
}
-static int DimensionsEqual(dim1,rank1,dim2,rank2)
+static int DimensionsEqual(dim1,rank1,dim2,rank2)
int *dim1,rank1,*dim2,rank2;
{
register int x;
@@ -475,7 +475,7 @@ register int x;
}
-static void CopyDimensions(dim1,rank1,dim2,rank2)
+static void CopyDimensions(dim1,rank1,dim2,rank2)
/* copies dim2 to dim1 */
int *dim1,*rank1;
int *dim2,rank2;
@@ -653,7 +653,7 @@ int numPortNames;
else if (dtmFlowControl == DTM_SYNC) {
printf("Just made an SYNC out netPort=%x port %x (%s)\n",
n,n->port,n->portName);
- }
+ }
else {
printf("********Just made an *UNKOWN* out port %s (%d)\n",
n->portName,n->port);
@@ -676,7 +676,7 @@ char *outPortAddr;
return(NetInternalCreateOutPort(outPortAddr,TRUE));
}
-static void NetChangeOutPort(address,oldOut)
+static void NetChangeOutPort(address,oldOut)
char *address;
NetPort *oldOut;
{
@@ -781,8 +781,8 @@ int num;
strcpy(d->label,title);
d->dot = DOT_SDL;
SDLgetPrimitive(header,&(d->dost));
-
- if ((num = DTMreadDataset(n->port, primbuff,
+
+ if ((num = DTMreadDataset(n->port, primbuff,
MAX_SDL_VERTICES, DTM_TRIPLET)) == DTMERROR){
ErrMesg("Error reading DTM SDL");
NetReject(n->port,header);
@@ -800,7 +800,7 @@ int num;
d->entity = ENT_Network;
return(d);
-#endif
+#endif
}
static Com *NetReadCOM(n,header)
@@ -882,7 +882,7 @@ int size;
d->dost = DOST_Double;
elementSize = sizeof(double);
break;
- default:
+ default:
d->dost = DOST_Char;
elementSize = 1;
printf(
@@ -892,8 +892,8 @@ int size;
VDATAgetNumRecords(header,&(d->dim[1]));
d->rank = 2;
VDATAgetPathLength(header,&(d->pathLength));
- if (!(d->magicPath = (VdataPathElement **)
- MALLOC(sizeof(VdataPathElement *)
+ if (!(d->magicPath = (VdataPathElement **)
+ MALLOC(sizeof(VdataPathElement *)
* d->pathLength))){
ErrMesg("Out of Memory reading VDATA path\n");
DTMendRead(n->port);
@@ -937,7 +937,7 @@ int size;
}
DTMendRead(n->port);
return(d);
-
+
#endif
}
@@ -972,7 +972,7 @@ int stat;
return(0);
}
- for(x = 0, size = 1; x < rank; x++)
+ for(x = 0, size = 1; x < rank; x++)
size *= dims[x];
ANIMgetID(header,id,DTM_STRING_SIZE);
@@ -1003,7 +1003,7 @@ int stat;
case DTM_DOUBLE:
dostType = DOST_Double;
break;
- default:
+ default:
dostType = DOST_Char;
printf(
"SDS of unknown type just received casting to char\n");
@@ -1261,7 +1261,7 @@ char id[DTM_STRING_SIZE];
}
}
- if (DTMreadDataset(n->port,d->data,xdim*ydim,DTM_CHAR) ==
+ if (DTMreadDataset(n->port,d->data,xdim*ydim,DTM_CHAR) ==
DTMERROR) {
ErrMesg("Error reading RIS dataset");
NetReject(n->port,header);
@@ -1339,7 +1339,7 @@ static char title[DTM_STRING_SIZE];
DTMendRead(n->port);
return(0);
}
-
+
t.textString[t.dim] = '\0';
#ifdef DEBUG
printf("NetReadText(): *t.textString = %c dim = %d\n",
@@ -1490,7 +1490,7 @@ List *list;
char *portName;
{
NetPort *netPort;
-
+
netPort = (NetPort *) ListHead(list);
while (netPort) {
if (!strcmp(portName,netPort->portName)) {
@@ -1541,7 +1541,7 @@ char buff[256];
#endif
return(0);
}
-
+
sprintf(buff,
"Just established a connection with\n%s (%s)\n",
s.id,s.inPort);
@@ -1585,7 +1585,7 @@ char buff[256];
}
else {
/***** this assumes only one out port **********/
- ListDeleteEntry(netOutList,ListHead(netOutList));
+ ListDeleteEntry(netOutList,ListHead(netOutList));
}
break;
@@ -1640,7 +1640,7 @@ char buff[256];
}
strcpy(s.inPort,s.netPort->portName);
return(&s);
-
+
} /* NetReadDTM() */
@@ -1712,7 +1712,7 @@ int runType;
ANIMgetID(header,id,80);
a.id = id;
ANIMgetFrame(header,&(a.frameNumber));
- if (-1 == ANIMgetFunc(header,(&func)))
+ if (-1 == ANIMgetFunc(header,(&func)))
a.func = AF_NO_FUNC;
else {
switch(func) {
@@ -1727,7 +1727,7 @@ int runType;
break;
};
}
- if (-1 == ANIMgetRunType(header,(&runType)))
+ if (-1 == ANIMgetRunType(header,(&runType)))
a.runType= ART_NONE;
else {
switch (runType) {
@@ -1742,7 +1742,7 @@ int runType;
break;
};
}
-
+
a.data = 0;
return(&a);
#endif
@@ -1822,7 +1822,7 @@ static Col col;
col.title = title;
col.id = UserID;
col.func = "DOODLE";
- if (sendDiscrete)
+ if (sendDiscrete)
col.selType = COL_DOODLE_DISC;
else
col.selType = COL_DOODLE_CONT;
@@ -1831,7 +1831,7 @@ static Col col;
return(&col);
#endif
}
-
+
static void NetCallDestroyCallback(list,d)
List list;
Data *d;
@@ -1894,7 +1894,7 @@ static AnimMesg a;
a.func = AF_NO_FUNC;
a.runType = ART_NONE;
a.data = d;
-
+
/* distribute data */
if (!DataInList(d)) {
DataAddEntry(d);
@@ -2016,7 +2016,7 @@ char *ExceptModuleName;
else {
d = *dSend;
}
-
+
/* distribute data */
if (!DataInList(d)) {
DataAddEntry(d);
@@ -2052,7 +2052,7 @@ register char *p;
if (!(docb = (DOCB *) ListNext(PALList)))
return(0); /* none to distribute to */
}
-
+
/* get data field make a new one if doesn't exist */
if (!(d = DataSearchByLabelAndDOT(title,DOT_Palette8))) {
if (!(d = DataNew())) {
@@ -2099,7 +2099,7 @@ register char *p;
return(1);
#endif
} /* NetPALDistribute() */
-
+
#undef CALLCB
#define CALLCB(List, CallB, CallData, ClientData) \
do { \
@@ -2204,7 +2204,7 @@ int i;
else if (PALcompareClass(header)) {
if (!(docb = (DOCB *) ListHead(PALList))) {
- NetReject(n->port,header);
+ NetReject(n->port,header);
return(0);
}
if (d = NetReadPal(n,header)) {
@@ -2216,12 +2216,12 @@ int i;
CALLCB(PALList, changeCB, d, changeData);
}
}
-
+
}/* PAL */
else if (RIScompareClass(header)) {
if (!(docb = (DOCB *) ListHead(RIS8List))) {
- NetReject(n->port,header);
+ NetReject(n->port,header);
return(0);
}
if (d = NetReadRIS8(n,header)) {
@@ -2233,11 +2233,11 @@ int i;
CALLCB(RIS8List, changeCB, d, changeData);
}
}
-
+
}/* RIS */
else if (TXTcompareClass(header)) {
if (!(docb = (DOCB *) ListHead(TXTList))) {
- NetReject(n->port,header);
+ NetReject(n->port,header);
return(0);
}
if (t = NetReadText(n,header)) {
@@ -2254,7 +2254,7 @@ int i;
} /*SRV*/
else if (COLcompareClass(header)) {
if (!(docb = (DOCB *) ListHead(COLList))) {
- NetReject(n->port,header);
+ NetReject(n->port,header);
return(0);
}
if (c = NetReadCOL(n,header)) {
@@ -2298,7 +2298,7 @@ int i;
}
}
else {
- NetReject(n->port,header);
+ NetReject(n->port,header);
}
return(d);
@@ -2311,7 +2311,7 @@ List netPortList;
int port;
{
NetPort *netPort;
-
+
netPort = (NetPort *) ListHead(netPortList);
while (netPort) {
if (netPort->port == port) {
@@ -2368,7 +2368,7 @@ NetPort *n;
/* printf("NetClientPollAndRead(): I've been called\n");*/
#endif
- n = (NetPort *) ListHead(netInList);
+ n = (NetPort *) ListHead(netInList);
while (n) {
while (DTMavailRead(n->port)) {
#ifdef DEBUG
@@ -2432,9 +2432,9 @@ int status;
#ifdef USE_WRITEMSG
if (DTMERROR == DTMwriteMsg(netPort->port,
header,strlen(header)+1,
- data,num,type))
+ data,num,type))
#else
- status = DTMbeginWrite(netPort->port,header,strlen(header)+1);
+ status = DTMbeginWrite(netPort->port,header,strlen(header)+1);
#ifdef DEBUG
printf("NetSend():sent header \"%s\" to %s\n",header,netPort->portName);
#endif
@@ -2489,7 +2489,7 @@ long num AND
DTMTYPE type AND
void (*cb) PARAMS((GenericPtr data, caddr_t cbData)) AND
caddr_t cbData AND
-void (*failCB) PARAMS((GenericPtr data, caddr_t failCBData)) AND
+void (*failCB) PARAMS((GenericPtr data, caddr_t failCBData)) AND
caddr_t failCBData AND
int doQueue) /* TRUE -> Save and resend; FALSE -> let client resend*/
@@ -2502,7 +2502,7 @@ int status;
#ifdef DEBUG
printf("no out port: discarding %s\n",header);
#endif
- if (failCB)
+ if (failCB)
failCB(data,failCBData);
return(-1);
}
@@ -2547,7 +2547,7 @@ int status;
#endif
}
else {
- if (cb)
+ if (cb)
cb(data,cbData);
}
return(0);
@@ -2588,13 +2588,13 @@ int status;
}
else {
/* couldn't send now and no queuing, so call failCB()*/
- if (failCB)
+ if (failCB)
failCB(data,failCBData);
}
return(0);
}
else if (status == 1) {
- if (cb)
+ if (cb)
cb(data,cbData);
return(1);
}
@@ -2604,7 +2604,7 @@ int status;
return(-1);
}
return(-1);
-
+
} /* NetClientSendMessage() */
@@ -2630,7 +2630,7 @@ time_t t;
port->portName,
sq->netPort,
sq->netPort->portName);
- fprintf(stderr,"*");
+ fprintf(stderr,"*");
}
#endif
while (sq) {
@@ -2807,7 +2807,7 @@ register long i;
NetMakeCOLFromDoodle(title,a,length+1,sendDiscrete),
moduleName);
}
-
+
status = NetClientSendMessage(netPort,header,a,(length + 1),
COL_TRIPLET, NetFreeDataCB, 0,0,0,doQueue);
@@ -3367,7 +3367,7 @@ DEFUN(_NetSendRaster8,(netPort,d,shouldCopy,
else
NetRISDistribute(&d, moduleName);
-
+
if (shouldCopy) {
int buffSize = d->dim[0] * d->dim[1] * sizeof(char);
register int x;
@@ -3432,7 +3432,7 @@ int status;
ANIMsetClass(header);
ANIMsetTitle(header,title);
ANIMsetID(header,userID);
-
+
switch (command) {
case AF_STOP:
ANIMsetFunc(header,ANIM_FUNC_STOP);
@@ -3475,7 +3475,7 @@ NetPort *netPort;
Data *d;
int shouldCopy; /* should this data be copied before returning? */
/* if not, charData and palette8 must not be freed or */
- /* changed until data is sent */
+ /* changed until data is sent */
int distributeInternally; /* boolean */
char *moduleName; /* Send internally to all DOCB except this one */
/* in most cases this would be the calling module's name*/
@@ -3542,10 +3542,10 @@ char *nodeName;
char *field;
int numRecords;
int numElements;
-int type;
+int type;
char *vdata;
int shouldCopy; /* copy Vdata before returning in case of delayed send */
-int distributeInternally;
+int distributeInternally;
char *moduleName; /* distribute Internally to all except */
{
#if 0
@@ -3612,7 +3612,7 @@ int size;
numRecords * numElements,
dtmType,0,0,0,0,1);
}
-
+
return(status);
#endif
}
@@ -3654,7 +3654,7 @@ Data *nextD;
moduleName,FALSE);
break;
case DOT_Image:
- if ( (nextD)
+ if ( (nextD)
&& (nextD->dot == DOT_Palette8)
&& !nextD->associated )
nextD->associated = d->label;
@@ -3690,7 +3690,7 @@ Data *nextD;
#endif
status = -1;
break;
-
+
};
d = nextD;
}
@@ -3711,9 +3711,9 @@ char header[DTM_MAX_HEADER];
COMsetID(header,userID);
COMsetDomain(header,domain);
COMsetMesg(header,message);
-
+
return(NetClientSendMessage(netPort,header,0,0,0,cb,0,failCB,0,1));
-
+
}
#if 0 /* not used */
@@ -3786,7 +3786,7 @@ time_t now;
ecbd->cbData = cbData;
ecbd->failCB = failCB;
ecbd->failCBData = failCBData;
-
+
EXECsetClass(header);
EXECsetID(header,userID);
@@ -3879,7 +3879,7 @@ caddr_t failCBData;
{
char header[DTM_MAX_HEADER];
char tmp[DTM_STRING_SIZE];
-
+
MSGsetClass(header);
COLsetID(header, userID);
strncpy(tmp, message, DTM_STRING_SIZE - 1);
diff --git a/libnet/net.h b/libnet/net.h
index 3574e41..930a944 100644
--- a/libnet/net.h
+++ b/libnet/net.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -68,7 +68,7 @@ typedef struct {
short int *data;
} Dol;
-typedef enum { AF_NO_FUNC, AF_STOP, AF_FPLAY, AF_RPLAY
+typedef enum { AF_NO_FUNC, AF_STOP, AF_FPLAY, AF_RPLAY
} AnimFunc;
typedef enum { ART_NONE, ART_SINGLE, ART_CONT, ART_BOUNCE
diff --git a/libnet/netP.h b/libnet/netP.h
index f74f366..a640d71 100644
--- a/libnet/netP.h
+++ b/libnet/netP.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -25,7 +25,7 @@ typedef struct {
} ExecHostStatusReturn;
typedef union {
- ExecHostStatusReturn hsReturn;
+ ExecHostStatusReturn hsReturn;
} ExecRetInfo;
typedef struct {
diff --git a/libnet/netdata.c b/libnet/netdata.c
index eb0bc3e..182fc00 100644
--- a/libnet/netdata.c
+++ b/libnet/netdata.c
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -47,7 +47,7 @@ Data *DataNew()
d->expandX = d->expandY = 1.0;
}
-
+
return(d);
}
@@ -55,9 +55,9 @@ void DataDestroy(d)
Data *d;
{
(void)ListDeleteEntry(dataList,d);
- if (d->label)
+ if (d->label)
FREE(d->label);
- if (d->data)
+ if (d->data)
FREE(d->data);
FREE(d);
}
@@ -109,7 +109,7 @@ Data *d;
d = (Data *) ListHead(dataList);
while (d) {
- if ((d->label)&&((!strcmp(s,d->label)) && (d->dot == dot)
+ if ((d->label)&&((!strcmp(s,d->label)) && (d->dot == dot)
&& (d->dost == dost))) {
return(d);
}
diff --git a/libnet/netdata.h b/libnet/netdata.h
index ff21fd2..43c92e0 100644
--- a/libnet/netdata.h
+++ b/libnet/netdata.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -88,4 +88,4 @@ extern Data *DataSearchByLabelAndDOTAndDOST
PARAMS((char *s, int dot, int dost));
extern int DataInList PARAMS((Data *d));
-#endif
+#endif
diff --git a/libnut/Makefile.in b/libnut/Makefile.in
index 10a5d32..2d3930d 100644
--- a/libnut/Makefile.in
+++ b/libnut/Makefile.in
@@ -1,7 +1,7 @@
# @configure_output@
# This file is used by Autoconf to make the real Makefile.
# DO NOT EDIT THIS FILE!
-# If you want to change something do it to the Makefile autoconf
+# If you want to change something do it to the Makefile autoconf
# creates. You should never have to edit this file.
CC= @CC@
diff --git a/libnut/ellipsis.c b/libnut/ellipsis.c
index 8eaa661..0ef0132 100644
--- a/libnut/ellipsis.c
+++ b/libnut/ellipsis.c
@@ -10,7 +10,7 @@
#ifdef ELLIPSIS_TEST
void usage_statement(void);
#endif
-int compact_string(char *main_string, char *ellipsis_string,
+int compact_string(char *main_string, char *ellipsis_string,
int num_chars, int mode, int eLength);
#ifdef ELLIPSIS_TEST
@@ -54,7 +54,7 @@ int main(int argc, char *argv[]) {
#endif
-int compact_string(char *main_string, char *ellipsis_string,
+int compact_string(char *main_string, char *ellipsis_string,
int num_chars, int mode, int eLength) {
int string_len;
@@ -71,7 +71,7 @@ int compact_string(char *main_string, char *ellipsis_string,
switch(mode) {
case 1: {
-
+
puff = num_chars - eLength;
feem = string_len - puff;
@@ -130,9 +130,9 @@ int compact_string(char *main_string, char *ellipsis_string,
break;
}
-
+
case 3: {
-
+
puff = num_chars - eLength;
feem = string_len - puff;
@@ -151,9 +151,9 @@ int compact_string(char *main_string, char *ellipsis_string,
}
break;
-
+
}
-
+
default: {
#ifdef ELLIPSIS_TEST
usage_statement();
@@ -162,7 +162,7 @@ int compact_string(char *main_string, char *ellipsis_string,
return(-1);
#endif
}
-
+
}
ellipsis_string[num_chars]='\0';
diff --git a/libnut/str-tools.c b/libnut/str-tools.c
index 78c8124..054fe53 100644
--- a/libnut/str-tools.c
+++ b/libnut/str-tools.c
@@ -447,7 +447,7 @@ int my_strncasecmp(char *str1, char *str2, int n)
return -1;
if(str1[i]+offset1>str2[i]+offset2)
return 1;
-/*
+/*
if (toupper(str1[i])(bufsize-strlen(retBuf)))
+
+ if (strlen(copy_error)>(bufsize-strlen(retBuf)))
{
fprintf(stderr,"%s\n",copy_error);
}
- else
+ else
{
sprintf(retBuf,"%sCopy([%s] to [%s]) error:\n %s\n\n",retBuf,src,dest,copy_error);
}
free(copy_error);
-
+
return(SYS_SRC_OPEN_FAIL);
}
-
- if ((fd_dest=open(dest,O_WRONLY|O_CREAT,0644))==(-1))
+
+ if ((fd_dest=open(dest,O_WRONLY|O_CREAT,0644))==(-1))
{
copy_error=strdup(my_strerror(errno));
- if (!copy_error)
+ if (!copy_error)
{
strcpy(retBuf,"There was not enough memory allocate.\n");
return(SYS_NO_MEMORY);
}
-
- if (strlen(copy_error)>(bufsize-strlen(retBuf)))
+
+ if (strlen(copy_error)>(bufsize-strlen(retBuf)))
{
fprintf(stderr,"%s\n",copy_error);
}
- else
+ else
{
sprintf(retBuf,"%sCopy([%s] to [%s]) error:\n %s\n\n",retBuf,src,dest,copy_error);
}
free(copy_error);
-
+
close(fd_src);
-
+
return(SYS_DEST_OPEN_FAIL);
}
-
+
/*both files open and ready*/
- while (n_src>0)
+ while (n_src>0)
{
n_src=read(fd_src,buf,BUFSIZ-1);
- if (n_src>0)
+ if (n_src>0)
{
n_dest=write(fd_dest,buf,n_src);
- if (n_dest>0)
+ if (n_dest>0)
{
continue;
}
@@ -909,7 +909,7 @@ int my_copy(char *src, char *dest, char *retBuf, int bufsize, int overwrite)
sprintf(retBuf,"Write([%s]) error:\n %s\n\n",dest,my_strerror(errno));
return(SYS_WRITE_FAIL);
}
- if (!n_src)
+ if (!n_src)
{
continue;
}
@@ -918,10 +918,10 @@ int my_copy(char *src, char *dest, char *retBuf, int bufsize, int overwrite)
sprintf(retBuf,"Read([%s]) error:\n %s\n\n",src,my_strerror(errno));
return(SYS_READ_FAIL);
}
-
+
close(fd_src);
close(fd_dest);
-
+
#else /* VMS, PGE */
cmd = malloc(sizeof(char) * (20 + strlen(src) + strlen(dest)));
if(!cmd)
@@ -935,13 +935,13 @@ int my_copy(char *src, char *dest, char *retBuf, int bufsize, int overwrite)
#endif /* VMS, PGE */
return(SYS_SUCCESS);
-}
+}
/*
* Written by: Tommy Reilly (originally by Scott Powers I think)
*
- * This is a function that finds the users home directory.
+ * This is a function that finds the users home directory.
*
* Return Values:
* SYS_NO_MEMORY -- No memory to allocate with.
@@ -953,7 +953,7 @@ int get_home(char **ret)
#ifndef VMS /* PGE */
char *home = NULL;
struct passwd *pwdent;
-
+
if(!(home = getenv("HOME")))
{
if (!(pwdent=getpwuid(getuid())))
@@ -962,7 +962,7 @@ int get_home(char **ret)
*ret=NULL;
return(SYS_INTERNAL_FAIL);
}
- else
+ else
{
/*
home = malloc(sizeof(char) * (strlen(pwdent->pw_dir) + 1));
diff --git a/libwww2/CUkerb.c b/libwww2/CUkerb.c
index 25749d9..1183d8c 100644
--- a/libwww2/CUkerb.c
+++ b/libwww2/CUkerb.c
@@ -1,7 +1,7 @@
/* Ben Fried deserves credit for writing the code that upon which
- * this source is based. ADC
+ * this source is based. ADC
*/
-#include "../config.h"
+#include "../config.h"
#if defined(KRB4) || defined(KRB5)
@@ -122,7 +122,7 @@ int scheme_login(scheme)
* Returns 1 if pipe open fails
* Returns 0 otherwise (even if klog fails!)
***************************************************************************/
-int AFSgetTGT(username, password, err_string)
+int AFSgetTGT(username, password, err_string)
char *err_string, *username, *password;
{
char reason[256];
@@ -222,7 +222,7 @@ int k4getTGT(username, password, err_string)
#endif /* KRB4 */
#ifdef KRB5
/****************************************************************************
- * k5getTGT() -- calls K5 libraries to get TGT (non-AFS)
+ * k5getTGT() -- calls K5 libraries to get TGT (non-AFS)
* most of this was copied from the Krb5 kinit.c
*
* Returns 0 on success (err_string = "")
@@ -279,7 +279,7 @@ int k5getTGT(username, password, err_string)
}
my_creds.server = server;
- my_creds.times.starttime = 0;
+ my_creds.times.starttime = 0;
my_creds.times.endtime = 0; /* now + KRB5_DEFAULT_LIFE; */
my_creds.times.renew_till = 0;
@@ -292,9 +292,9 @@ int k5getTGT(username, password, err_string)
if (code) {
sprintf(err_string,"krb5_get_in_tkt error: %s", error_message(code));
return 1;
- }
+ }
else {
- return 0;
+ return 0;
}
}
#endif
@@ -354,7 +354,7 @@ int str_to_kdata(in_str, out_str)
/****************************************************************************
- * compose_kerberos_auth_string
+ * compose_kerberos_auth_string
*
* Accepts: scheme (one of the HTAA_KERBEROS values)
* hostname
@@ -426,7 +426,7 @@ char *compose_kerberos_auth_string(scheme, hostname)
if (!k5context) {
krb5_init_context(&k5context);
if (code) {
- sprintf(krb_err_str,"Error initializing Kerb5 context: %s\n",error_message(code));
+ sprintf(krb_err_str,"Error initializing Kerb5 context: %s\n",error_message(code));
application_user_info_wait(krb_err_str);
return (char *) NULL;
}
@@ -441,11 +441,11 @@ char *compose_kerberos_auth_string(scheme, hostname)
}
}
-
+
code = krb5_mk_req(k5context, &k5auth_context, AP_OPTS_USE_SESSION_KEY,
"khttp", hostname, NULL, k5ccache, &k5ap_req);
- if (!code) {
+ if (!code) {
/* get username from credentials cache */
@@ -467,7 +467,7 @@ char *compose_kerberos_auth_string(scheme, hostname)
return (char *) NULL;
}
- krb5_sname_to_principal(k5context, hostname, "khttp",
+ krb5_sname_to_principal(k5context, hostname, "khttp",
KRB5_NT_SRV_HST, &k5serverp);
memset((char *)&k5in_creds, 0, sizeof(k5in_creds));
@@ -480,7 +480,7 @@ char *compose_kerberos_auth_string(scheme, hostname)
code = krb5_get_credentials(k5context,KRB5_GC_CACHED,k5ccache,&k5in_creds,&k5out_creds);
- if ((code == KRB5_CC_NOTFOUND) || (now >= k5out_creds->times.endtime)) {
+ if ((code == KRB5_CC_NOTFOUND) || (now >= k5out_creds->times.endtime)) {
/* replace "Matching creds not found" */
sprintf(krb_err_str,"Kerberos ticket expired\n");
code = 666;
@@ -497,7 +497,7 @@ char *compose_kerberos_auth_string(scheme, hostname)
sprintf(krb_err_str,"krb5_mk_req: %s\n",error_message(code));
}
}
- else {
+ else {
pass = kdata_to_str(k5ap_req.data, k5ap_req.length);
}
}
@@ -548,7 +548,7 @@ char *compose_kerberos_auth_string(scheme, hostname)
* validate_kerberos_server_auth
* Accepts: scheme (one of the HTAA_KERBEROS values)
* the Authorization line from the request
- * Returns: NIL on success, T on failure
+ * Returns: NIL on success, T on failure
(currently return value not used)
************************************************************************/
int validate_kerberos_server_auth(scheme, str)
@@ -587,7 +587,7 @@ int validate_kerberos_server_auth(scheme, str)
else if (scheme == HTAA_KERBEROS_V4) {
retval = k4validate_kerberos_server_auth(str);
}
-#endif
+#endif
#ifdef KRB5
else if (scheme == HTAA_KERBEROS_V5) {
retval = k5validate_kerberos_server_auth(str);
@@ -644,9 +644,9 @@ int k4validate_kerberos_server_auth(str)
if (ntohl(*(long *)k4authent.dat) != k4checksum + 1) {
fprintf(stderr,"\n\nchecksum just doesn't check out\n\n");
- return 1;
+ return 1;
}
-
+
return 0;
}
#endif
@@ -663,7 +663,7 @@ int k5validate_kerberos_server_auth(instr)
k5ap_rep.length = str_to_kdata(instr, tmpstr);
- if (k5ap_rep.length == 0)
+ if (k5ap_rep.length == 0)
return 1;
k5ap_rep.data = tmpstr;
@@ -672,7 +672,7 @@ int k5validate_kerberos_server_auth(instr)
krb5_free_ap_rep_enc_part(k5context, k5ap_rep_result);
- if (code)
+ if (code)
return 1;
return 0;
diff --git a/libwww2/HTAABrow.c b/libwww2/HTAABrow.c
index 7813f4c..c3c95c8 100644
--- a/libwww2/HTAABrow.c
+++ b/libwww2/HTAABrow.c
@@ -167,20 +167,20 @@ PUBLIC void HTAASetup_clearall (HTList *s)
** On Exit: password information is gone.
**
** May 1996 PLB Created.
-**
+**
*/
PUBLIC void HTAAServer_clear ()
{
HTList *n, *nn;
HTAAServer *s;
-
+
n = server_table;
while (n) {
nn = n->next;
s = (HTAAServer *)n->object;
if (s) {
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "Clearing passwd info for %s\n", s->hostname?s->hostname:"NULL");
#endif
HTAARealm_clearall (s->realms);
@@ -192,9 +192,9 @@ PUBLIC void HTAAServer_clear ()
n = nn;
}
server_table = NULL;
- secret_key = NULL;
- current_setup = NULL;
- current_hostname = NULL;
+ secret_key = NULL;
+ current_setup = NULL;
+ current_hostname = NULL;
current_docname = NULL;
}
@@ -231,7 +231,7 @@ PRIVATE HTAAServer *HTAAServer_new ARGS2(WWW_CONST char*, hostname,
if (hostname) StrAllocCopy(server->hostname, hostname);
if (!server_table) server_table = HTList_new();
-
+
HTList_addObject(server_table, (void*)server);
return server;
@@ -284,7 +284,7 @@ PRIVATE HTAAServer *HTAAServer_lookup ARGS2(WWW_CONST char *, hostname,
-/*************************** HTAASetup *******************************/
+/*************************** HTAASetup *******************************/
/* PRIVATE HTAASetup_lookup()
@@ -306,7 +306,7 @@ PRIVATE HTAAServer *HTAAServer_lookup ARGS2(WWW_CONST char *, hostname,
** Otherwise, a HTAASetup structure representing
** the protected server setup on the corresponding
** document tree.
-**
+**
*/
PRIVATE HTAASetup *HTAASetup_lookup ARGS3(WWW_CONST char *, hostname,
int, portnumber,
@@ -453,7 +453,7 @@ PRIVATE void HTAASetup_updateSpecifics ARGS2(HTAASetup *, setup,
** On Entry:
** realm_table a list of realm objects
**
-** On Exit:
+** On Exit:
** returns: Nothing. realm_table is no longer valid.
*/
PUBLIC void HTAARealm_clearall ARGS1(HTList *, realm_table)
@@ -468,10 +468,10 @@ PUBLIC void HTAARealm_clearall ARGS1(HTList *, realm_table)
if (r) {
#ifdef PAUL_IS_A_GIMP
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "Clearing %s %s:%s\n",
- r->realmname?r->realmname:"NULL",
- r->realmname?r->username:"NULL",
+ r->realmname?r->realmname:"NULL",
+ r->realmname?r->username:"NULL",
r->realmname?r->password:"NULL");
#endif
@@ -504,7 +504,7 @@ PRIVATE HTAARealm *HTAARealm_lookup ARGS2(HTList *, realm_table,
if (realm_table && realmname) {
HTList *cur = realm_table;
HTAARealm *realm;
-
+
while (NULL != (realm = (HTAARealm*)HTList_nextObject(cur))) {
if (0==strcmp(realm->realmname, realmname))
return realm;
@@ -624,11 +624,11 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
/* for MD5 -- DXP */
char * nonce; /* Server specified integer value */
char * opaque; /* more random MD5 junk... */
-
+
FREE(result); /* From previous call */
- if ((scheme != HTAA_BASIC && scheme != HTAA_PUBKEY && scheme != HTAA_MD5)
+ if ((scheme != HTAA_BASIC && scheme != HTAA_PUBKEY && scheme != HTAA_MD5)
|| !setup ||
!setup->scheme_specifics || !setup->scheme_specifics[scheme] ||
!setup->server || !setup->server->realms)
@@ -675,7 +675,7 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
if (!realm->password)
return "";
}
-
+
len = strlen(realm->username ? realm->username : "") +
strlen(realm->password ? realm->password : "") + 3;
@@ -740,13 +740,13 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
if (!opaque)
return "";
- if (!(A1 = (unsigned char*)malloc(strlen(realm->username) +
- strlen(realm->realmname) +
+ if (!(A1 = (unsigned char*)malloc(strlen(realm->username) +
+ strlen(realm->realmname) +
strlen(realm->password) + 3 + 1)))
outofmem(__FILE__, "compose_auth_string");
if (!(A2 = (unsigned char*)malloc(4 + strlen(current_docname) + 1 + 1 )))
- outofmem(__FILE__, "compose_auth_string");
+ outofmem(__FILE__, "compose_auth_string");
/* make A1 */
*A1 = (unsigned char)0;
@@ -768,18 +768,18 @@ PRIVATE char *compose_auth_string ARGS2(HTAAScheme, scheme,
strcat((char*)A2, "\0");
if (!(md5_cleartext = (unsigned char*)malloc(100 + 1)))
- outofmem(__FILE__, "compose_auth_string");
+ outofmem(__FILE__, "compose_auth_string");
if (!(md5_ciphertext = (unsigned char*)malloc(100 + 1)))
- outofmem(__FILE__, "compose_auth_string");
+ outofmem(__FILE__, "compose_auth_string");
if (!(hex1 = (unsigned char*)malloc(32 + 1)))
- outofmem(__FILE__, "compose_auth_string");
+ outofmem(__FILE__, "compose_auth_string");
if (!(hex2 = (unsigned char*)malloc(32 + 1)))
- outofmem(__FILE__, "compose_auth_string");
+ outofmem(__FILE__, "compose_auth_string");
if (!(digest1 = (unsigned char*)malloc(16)))
- outofmem(__FILE__, "compose_auth_string");
+ outofmem(__FILE__, "compose_auth_string");
if (!(digest2 = (unsigned char*)malloc(16)))
- outofmem(__FILE__, "compose_auth_string");
-
+ outofmem(__FILE__, "compose_auth_string");
+
MD5Mem(A1, strlen((char*)A1), digest1);
MD5Mem(A2, strlen((char*)A2), digest2);
@@ -886,7 +886,7 @@ PUBLIC char *HTAA_composeAuth ARGS3(WWW_CONST char *, hostname,
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf(stderr,
+ fprintf(stderr,
"Composing Authorization for %s:%d/%s\n",
hostname, portnumber, docname);
#endif
@@ -900,7 +900,7 @@ PUBLIC char *HTAA_composeAuth ARGS3(WWW_CONST char *, hostname,
retry = NO;
current_portnumber = portnumber;
-
+
if (hostname) StrAllocCopy(current_hostname, hostname);
else FREE(current_hostname);
@@ -908,7 +908,7 @@ PUBLIC char *HTAA_composeAuth ARGS3(WWW_CONST char *, hostname,
else FREE(current_docname);
}
else retry = YES;
-
+
if (!current_setup || !retry)
current_setup = HTAASetup_lookup(hostname, portnumber, docname);
@@ -974,7 +974,7 @@ PUBLIC char *HTAA_composeAuth ARGS3(WWW_CONST char *, hostname,
-
+
/* BROWSER PUBLIC HTAA_shouldRetryWithAuth()
**
** DETERMINES IF WE SHOULD RETRY THE SERVER
@@ -1034,7 +1034,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS3(char *, start_of_headers,
char *fieldname = HTNextField(&p);
char *arg1 = HTNextField(&p);
char *args = p;
-
+
if (0==my_strcasecmp(fieldname, "WWW-Authenticate:")) {
if (HTAA_UNKNOWN != (scheme = HTAAScheme_enum(arg1))) {
HTList_addObject(valid_schemes, (void*)scheme);
@@ -1087,7 +1087,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS3(char *, start_of_headers,
/* So we have already tried with authorization. */
/* Either we don't have access or username or */
/* password was misspelled. */
-
+
/* Update scheme-specific parameters */
/* (in case they have expired by chance). */
HTAASetup_updateSpecifics(current_setup, scheme_specifics);
@@ -1115,7 +1115,7 @@ PUBLIC BOOL HTAA_shouldRetryWithAuth ARGS3(char *, start_of_headers,
}
if (!template)
template = HTAA_makeProtectionTemplate(current_docname);
- current_setup = HTAASetup_new(server,
+ current_setup = HTAASetup_new(server,
template,
valid_schemes,
scheme_specifics);
diff --git a/libwww2/HTAABrow.h b/libwww2/HTAABrow.h
index 0b3a6d8..52eedb6 100644
--- a/libwww2/HTAABrow.h
+++ b/libwww2/HTAABrow.h
@@ -1,31 +1,31 @@
/* BROWSER SIDE ACCESS AUTHORIZATION MODULE
-
+
This module is the browser side interface to Access Authorization (AA) package. It
contains code only for browser.
-
+
Important to know about memory allocation:
-
+
Routines in this module use dynamic allocation, but free automatically all the memory
reserved by them.
-
+
Therefore the caller never has to (and never should) free() any object returned by
these functions.
-
+
Therefore also all the strings returned by this package are only valid until the next
call to the same function is made. This approach is selected, because of the nature of
access authorization: no string returned by the package needs to be valid longer than
until the next call.
-
+
This also makes it easy to plug the AA package in: you don't have to ponder whether to
free()something here or is it done somewhere else (because it is always done somewhere
else).
-
+
The strings that the package needs to store are copied so the original strings given as
parameters to AA functions may be freed or modified with no side effects.
-
+
Also note:The AA package does not free() anything else than what it has itself
allocated.
-
+
*/
#ifndef HTAABROW_H
@@ -48,19 +48,19 @@ Routines for Browser Side Recording of AA Info
Most of the browser-side AA is done by the following two functions (which are called
from file HTTP.c so the browsers using libwww only need to be linked with the new
library and not be changed at all):
-
+
HTAA_composeAuth() composes the Authorization: line contents, if the AA package
thinks that the given document is protected. Otherwise this function returns NULL.
This function also calls the functions HTPrompt(),HTPromptPassword() and HTConfirm()
to get the username, password and some confirmation from the user.
-
+
HTAA_shouldRetryWithAuth() determines whether to retry the request with AA or with a
new AA (in case username or password was misspelled).
HTAA_TryWithAuth() sets up everything for an automatic first try with authentication.
HTAA_ClearAuth() clears the currently allocated authentication record.
-
+
*/
/* PUBLIC HTAA_composeAuth()
@@ -156,19 +156,19 @@ PUBLIC void HTAA_ClearAuth NOPARAMS;
#ifdef PEM_AUTH
/*
* PUBLIC HTAA_makecommand()
- *
+ *
* ENCRYPT AN HTTP REQUEST, AND ENCAPSULATE IT IN
* A NEW HTTP PEM AUTHORIZED REQUEST
- *
+ *
* ON ENTRY:
* command the HTTP request
- *
+ *
* ON EXIT:
* returns the new HTTP request with PEM
- *
- * Do not free this string. This function *requires* that the
+ *
+ * Do not free this string. This function *requires* that the
* HTAA_composeAuth function has been called prior to it.
- *
+ *
*/
PUBLIC char *HTAA_makecommand PARAMS((char * command, char **body, int *bl));
#endif /* PEM_AUTH */
diff --git a/libwww2/HTAAFile.c b/libwww2/HTAAFile.c
index ad87faf..917755e 100644
--- a/libwww2/HTAAFile.c
+++ b/libwww2/HTAAFile.c
@@ -129,7 +129,7 @@ PRIVATE int read_item ARGS4(FILE *, fp,
** READ A FIELD FROM A PASSWORD, GROUP
** OR ACCESS CONTROL LIST FILE
** i.e. an item terminated by colon,
-** end-of-line, or end-of-file.
+** end-of-line, or end-of-file.
** ON ENTRY:
** fp is the file to read the characters from
** contents is the character array to put the characters
diff --git a/libwww2/HTAAFile.h b/libwww2/HTAAFile.h
index 167daa8..5349bcf 100644
--- a/libwww2/HTAAFile.h
+++ b/libwww2/HTAAFile.h
@@ -1,14 +1,14 @@
/* FILE ROUTINES FOR ACCESS AUTHORIZATION PACKAGE
-
+
This module implements the routines used for accessing (and parsing) the files used in
the access authorization:
-
+
password file
-
+
group file
-
+
access control list (ACL) file
-
+
*/
@@ -37,23 +37,23 @@
Naming conventions
Record is an entire line in file.
-
+
Field is an entity separated by colons and/or by end-of-line.
-
+
List is a field in which there are items separated by commas.
-
+
Record-oriented Read Routines
Password, group and ACL are internally read in by the following functions:
-
+
HTAAFile_nextRec() skips to the beginning of the next record (must be called even
after the last field of a record is read to proceed to the next
record).
-
+
HTAAFile_readField() reads a field (separated by colons).
-
+
HTAAFile_readList() reads a field containing a comma-separated list of items.
-
+
*/
/* PUBLIC HTAAFile_nextRec()
diff --git a/libwww2/HTAAProt.c b/libwww2/HTAAProt.c
index 9d9d9ab..6a95d4b 100644
--- a/libwww2/HTAAProt.c
+++ b/libwww2/HTAAProt.c
@@ -81,14 +81,14 @@ PUBLIC int HTAA_getUid NOARGS
if (isNumber(current_prot->uid_name)) {
if (NULL != (pw = getpwuid(atoi(current_prot->uid_name)))) {
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
+ if (www2Trace) fprintf(stderr,
"%s(%s) returned (%s:%s:%d:%d:...)\n",
"HTAA_getUid: getpwuid",
current_prot->uid_name,
pw->pw_name, pw->pw_passwd,
pw->pw_uid, pw->pw_gid);
#endif
- return pw->pw_uid;
+ return pw->pw_uid;
}
}
else { /* User name (not a number) */
@@ -118,9 +118,9 @@ PUBLIC int HTAA_getUid NOARGS
** Default is 65534 (nogroup).
*/
PUBLIC int HTAA_getGid NOARGS
-{
+{
struct group *gr = NULL;
-
+
if (current_prot && current_prot->gid_name) {
if (isNumber(current_prot->gid_name)) {
if (NULL != (gr = getgrgid(atoi(current_prot->gid_name)))) {
@@ -137,7 +137,7 @@ PUBLIC int HTAA_getGid NOARGS
else { /* Group name (not number) */
if (NULL != (gr = getgrnam(current_prot->gid_name))) {
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
+ if (www2Trace) fprintf(stderr,
"%s(\"%s\") returned (%s:%s:%d:...)\n",
"HTAA_getGid: getgrnam",
current_prot->gid_name,
@@ -216,9 +216,9 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot,
break;
if (lex_item == LEX_ALPH_STR) { /* Valid setup record */
-
+
StrAllocCopy(fieldname, lex_buffer);
-
+
if (LEX_FIELD_SEP != (lex_item = lex(fp)))
unlex(lex_item); /* If someone wants to use colon */
/* after field name it's ok, but */
@@ -245,7 +245,7 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot,
"authentication scheme:",
lex_buffer);
#endif
-
+
if (LEX_ITEM_SEP != (lex_item = lex(fp)))
break;
/*
@@ -282,7 +282,7 @@ PRIVATE void HTAA_parseProtFile ARGS2(HTAAProt *, prot,
HTAssocList_add(prot->values, fieldname, lex_buffer);
lex_item = lex(fp); /* Read record separator */
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
+ if (www2Trace) fprintf(stderr,
"%s `%s' bound to value `%s'\n",
"HTAA_parseProtFile: Name",
fieldname, lex_buffer);
@@ -347,7 +347,7 @@ PRIVATE HTAAProt *HTAAProt_new ARGS3(WWW_CONST char *, cur_docname,
if (!prot_cache)
prot_cache = HTList_new();
-
+
while (NULL != (cache_item = (HTAAProtCache*)HTList_nextObject(cur))) {
if (!strcmp(cache_item->prot_filename, prot_filename))
break;
@@ -536,7 +536,7 @@ PUBLIC HTAAProt *HTAA_getDefaultProtection NOARGS
if (!current_prot) {
current_prot = default_prot;
default_prot = NULL;
- }
+ }
return current_prot;
}
diff --git a/libwww2/HTAAProt.h b/libwww2/HTAAProt.h
index d23bad5..59b8a9b 100644
--- a/libwww2/HTAAProt.h
+++ b/libwww2/HTAAProt.h
@@ -1,5 +1,5 @@
/* PROTECTION SETUP FILE
-
+
*/
#ifndef HTAAPROT_H
@@ -39,15 +39,15 @@ typedef struct {
Callbacks for rule system
The following three functioncs are called by the rule system:
-
+
HTAA_clearProtections() when starting to translate a filename
-
+
HTAA_setDefaultProtection() when "defprot" rule is matched
-
+
HTAA_setCurrentProtection() when "protect" rule is matched
-
+
Protection setup files are cached by these functions.
-
+
*/
/* PUBLIC HTAA_setDefaultProtection()
@@ -117,11 +117,11 @@ Getting Protection Settings
HTAA_getCurrentProtection() returns the current protection mode (if there was a
"protect" rule). NULL, if no "protect" rule has been matched.
-
+
HTAA_getDefaultProtection() sets the current protection mode to what it was set to
by "defprot" rule and also returns it (therefore after this call also
HTAA_getCurrentProtection() returns the same structure.
-
+
*/
/* PUBLIC HTAA_getCurrentProtection()
diff --git a/libwww2/HTAAServ.c b/libwww2/HTAAServ.c
index ec3155c..ee8d099 100644
--- a/libwww2/HTAAServ.c
+++ b/libwww2/HTAAServ.c
@@ -119,7 +119,7 @@ PUBLIC char *HTAA_statusMessage NOARGS
/* Success */
case HTAA_OK:
- return "AA: Access should be ok but something went wrong";
+ return "AA: Access should be ok but something went wrong";
break;
/* Others */
@@ -176,7 +176,7 @@ PRIVATE char *status_name ARGS1(HTAAFailReasonType, reason)
} /* switch */
}
-
+
@@ -272,7 +272,7 @@ PRIVATE HTAAFailReasonType check_authorization ARGS4(WWW_CONST char *, pathname
"host", HTClientHost);
else fprintf(stderr, "%s %s %s %s\n",
"HTAA_checkAuthorization: request from",
- HTClientHost,
+ HTClientHost,
"accepted by only mask match (no ACL, only",
"Protect rule, and only mask enabled)");
}
@@ -338,7 +338,7 @@ PRIVATE HTAAFailReasonType check_authorization ARGS4(WWW_CONST char *, pathname
? htaa_user->username : "NOT-AUTHENTICATED"));
#endif
}
- /*
+ /*
** Check mask group
*/
if (prot->mask_group) {
@@ -358,7 +358,7 @@ PRIVATE HTAAFailReasonType check_authorization ARGS4(WWW_CONST char *, pathname
#ifndef DISABLE_TRACE
else if (www2Trace) fprintf(stderr, "%s %s %s %s %s\n",
"HTAA_checkAuthorization: request from",
- HTClientHost,
+ HTClientHost,
"accepted by just mask group match",
"(no ACL, only Protect rule, and only",
"mask enabled)");
@@ -436,7 +436,7 @@ PUBLIC int HTAA_checkAuthorization ARGS4(WWW_CONST char *, url,
char *local_copy = NULL;
HTAAMethod method = HTAAMethod_enum(method_name);
HTAAScheme scheme = HTAAScheme_enum(scheme_name);
-
+
/*
** Translate into absolute pathname, and
** check for "protect" and "defprot" rules.
@@ -453,7 +453,7 @@ PUBLIC int HTAA_checkAuthorization ARGS4(WWW_CONST char *, url,
char *localname = HTLocalName(pathname);
free(pathname);
pathname = localname;
- }
+ }
FREE(local_copy);
HTAAFailReason = check_authorization(pathname, method,
@@ -621,7 +621,7 @@ PUBLIC char *HTAA_composeAuthHeaders NOARGS
#endif
} /* scheme valid for requested document */
} /* for every scheme */
-
+
return result;
}
diff --git a/libwww2/HTAAServ.h b/libwww2/HTAAServ.h
index 246f1be..1833542 100644
--- a/libwww2/HTAAServ.h
+++ b/libwww2/HTAAServ.h
@@ -1,31 +1,31 @@
/* SERVER SIDE ACCESS AUTHORIZATION MODULE
-
+
This module is the server side interface to Access Authorization (AA) package. It
contains code only for server.
-
+
Important to know about memory allocation:
-
+
Routines in this module use dynamic allocation, but free automatically all the memory
reserved by them.
-
+
Therefore the caller never has to (and never should) free() any object returned by
these functions.
-
+
Therefore also all the strings returned by this package are only valid until the next
call to the same function is made. This approach is selected, because of the nature of
access authorization: no string returned by the package needs to be valid longer than
until the next call.
-
+
This also makes it easy to plug the AA package in: you don't have to ponder whether to
free()something here or is it done somewhere else (because it is always done somewhere
else).
-
+
The strings that the package needs to store are copied so the original strings given as
parameters to AA functions may be freed or modified with no side effects.
-
+
Also note:The AA package does not free() anything else than what it has itself
allocated.
-
+
*/
#ifndef HTAASERV_H
@@ -50,7 +50,7 @@
Check Access Authorization
HTAA_checkAuthorization() is the main access authorization function.
-
+
*/
/* PUBLIC HTAA_checkAuthorization()
diff --git a/libwww2/HTAAUtil.c b/libwww2/HTAAUtil.c
index 5d3638d..4562e43 100644
--- a/libwww2/HTAAUtil.c
+++ b/libwww2/HTAAUtil.c
@@ -76,7 +76,7 @@ PUBLIC HTAAScheme HTAAScheme_enum ARGS1(WWW_CONST char*, name)
*cur = TOUPPER(*cur);
cur++;
}
-
+
if (!strncmp(upcased, "NONE", 4))
return HTAA_NONE;
else if (!strncmp(upcased, "BASIC", 5))
@@ -112,7 +112,7 @@ PUBLIC char *HTAAScheme_name ARGS1(HTAAScheme, scheme)
case HTAA_PUBKEY: return "Pubkey"; break;
case HTAA_KERBEROS_V4: return "KerberosV4"; break;
case HTAA_KERBEROS_V5: return "KerberosV5"; break;
- case HTAA_MD5: return "Digest"; break;
+ case HTAA_MD5: return "Digest"; break;
case HTAA_UNKNOWN: return "UNKNOWN"; break;
default: return "THIS-IS-A-BUG";
}
@@ -227,7 +227,7 @@ PUBLIC BOOL HTAAMethod_inList ARGS2(HTAAMethod, method,
** returns YES, if filename matches the template.
** NO, otherwise.
*/
-PUBLIC BOOL HTAA_templateMatch ARGS2(WWW_CONST char *, template,
+PUBLIC BOOL HTAA_templateMatch ARGS2(WWW_CONST char *, template,
WWW_CONST char *, filename)
{
WWW_CONST char *p = template;
@@ -236,7 +236,7 @@ PUBLIC BOOL HTAA_templateMatch ARGS2(WWW_CONST char *, template,
for( ; *p && *q && *p == *q; p++, q++) /* Find first mismatch */
; /* do nothing else */
-
+
if (!*p && !*q) return YES; /* Equally long equal strings */
else if ('*' == *p) { /* Wildcard */
p++; /* Skip wildcard character */
@@ -376,7 +376,7 @@ PUBLIC HTAssocList *HTAA_parseArgList ARGS1(char *, str)
}
}
else { /* No name, just a value */
- if (*cur == ',')
+ if (*cur == ',')
*(cur++) = (char)0; /* Terminate value */
/* else last value on line (already terminated by NULL) */
StrAllocCopy(name, "nnn"); /* Room for item order number */
@@ -497,7 +497,7 @@ PUBLIC char *HTAA_getUnfoldedLine NOARGS
/* Unfolding */
-
+
if (peek_for_folding) {
if (*cur != ' ' && *cur != '\t')
return line; /* Ok, no continuation line */
@@ -511,7 +511,7 @@ PUBLIC char *HTAA_getUnfoldedLine NOARGS
while (cur < end_pointer && *cur != '\n') /* Find the end-of-line */
cur++; /* (or end-of-buffer). */
-
+
/* Terminating line */
if (cur < end_pointer) { /* So *cur==LF, terminate line */
diff --git a/libwww2/HTAAUtil.h b/libwww2/HTAAUtil.h
index fe8f846..e652ddb 100644
--- a/libwww2/HTAAUtil.h
+++ b/libwww2/HTAAUtil.h
@@ -1,30 +1,30 @@
/* Utilities for the Authorization parts of libwww
COMMON PARTS OF AUTHORIZATION MODULE TO BOTH SERVER AND BROWSER
-
+
This module is the interface to the common parts of Access Authorization (AA) package
for both server and browser. Important to know about memory allocation:
-
+
Routines in this module use dynamic allocation, but free automatically all the memory
reserved by them.
-
+
Therefore the caller never has to (and never should) free() any object returned by
these functions.
-
+
Therefore also all the strings returned by this package are only valid until the next
call to the same function is made. This approach is selected, because of the nature of
access authorization: no string returned by the package needs to be valid longer than
until the next call.
-
+
This also makes it easy to plug the AA package in: you don't have to ponder whether to
free() something here or is it done somewhere else (because it is always done somewhere
else).
-
+
The strings that the package needs to store are copied so the original strings given as
parameters to AA functions may be freed or modified with no side effects.
-
+
Also note: The AA package does not free() anything else than what it has itself
allocated.
-
+
*/
#ifndef HTAAUTIL_H
@@ -88,10 +88,10 @@ Default filenames
Datatype definitions
HTAASCHEME
-
+
The enumeration HTAAScheme represents the possible authentication schemes used by the
WWW Access Authorization.
-
+
*/
typedef enum {
@@ -110,7 +110,7 @@ typedef enum {
/*
ENUMERATION TO REPRESENT HTTP METHODS
-
+
*/
typedef enum {
diff --git a/libwww2/HTACL.c b/libwww2/HTACL.c
index 33f9dd2..232d07c 100644
--- a/libwww2/HTACL.c
+++ b/libwww2/HTACL.c
@@ -61,7 +61,7 @@ PUBLIC char *HTAA_getAclFilename ARGS1(WWW_CONST char *, pathname)
*filename = '\0'; /* Truncate filename off from directory path */
filename++; /* and the filename begins from the next character */
}
-
+
StrAllocCopy(acl_path, directory); /* Also frees acl_path */
/* from previous call. */
StrAllocCat(acl_path, "/");
@@ -156,7 +156,7 @@ PUBLIC GroupDef *HTAA_getAclEntry ARGS3(FILE *, acl_file,
char *buf;
if (!acl_file) return NULL; /* ACL doesn't exist */
-
+
if (group_def) {
GroupDef_delete(group_def); /* From previous call */
group_def = NULL;
@@ -170,7 +170,7 @@ PUBLIC GroupDef *HTAA_getAclEntry ARGS3(FILE *, acl_file,
if (!(buf = (char*)malloc((strlen(filename)+2)*sizeof(char))))
outofmem(__FILE__, "HTAA_getAuthorizedGroups");
-
+
while (EOF != HTAAFile_readField(acl_file, buf, len+1)) {
if (HTAA_templateMatch(buf, filename)) {
HTList *methods = HTList_new();
@@ -180,7 +180,7 @@ PUBLIC GroupDef *HTAA_getAclEntry ARGS3(FILE *, acl_file,
fprintf(stderr,
"Filename '%s' matched template '%s', allowed methods:",
filename, buf);
- }
+ }
#endif
if (HTAAMethod_inList(method, methods)) { /* right method? */
#ifndef DISABLE_TRACE
diff --git a/libwww2/HTACL.h b/libwww2/HTACL.h
index 14a4f09..96424fd 100644
--- a/libwww2/HTACL.h
+++ b/libwww2/HTACL.h
@@ -1,5 +1,5 @@
/* ACCESS CONTROL LIST ROUTINES
-
+
*/
#ifndef HTACL_H
diff --git a/libwww2/HTAccess.c b/libwww2/HTAccess.c
index c299371..890c51f 100644
--- a/libwww2/HTAccess.c
+++ b/libwww2/HTAccess.c
@@ -66,7 +66,7 @@ PUBLIC char * HTClientHost = 0; /* Name of remote login host if any */
*/
PUBLIC HTFormat HTOutputFormat = NULL;
-PUBLIC HTStream* HTOutputStream = NULL; /* For non-interactive, set this */
+PUBLIC HTStream* HTOutputStream = NULL; /* For non-interactive, set this */
PUBLIC BOOL using_gateway = NO; /* are we using a gateway? */
PUBLIC BOOL using_proxy = NO; /* are we using a proxy gateway? */
@@ -142,7 +142,7 @@ PRIVATE int get_physical ARGS3(
char * host = NULL;
struct Proxy *GetNoProxy();
extern int useKeepAlive;
-
+
HTAnchor_setPhysical(anchor, addr);
access = HTParse(HTAnchor_physical(anchor),
@@ -348,7 +348,7 @@ PRIVATE int HTLoad ARGS4(
while (1) {
if (status < 0) return status; /* Can't resolve or forbidden */
-
+
retry=5;
retry_proxy:
@@ -428,9 +428,9 @@ PUBLIC HTStream *HTSaveStream ARGS1(HTParentAnchor *, anchor)
{
HTProtocol * p = HTAnchor_protocol(anchor);
if (!p) return NULL;
-
+
return (*p->saveStream)(anchor);
-
+
}
@@ -449,7 +449,7 @@ PUBLIC HTStream *HTSaveStream ARGS1(HTParentAnchor *, anchor)
**
** On Exit,
** returns 1 Success in opening document
-** 0 Failure
+** 0 Failure
** -1 Interrupted
**
*/
@@ -468,7 +468,7 @@ PRIVATE int HTLoadDocument ARGS4(
use_this_url_instead = NULL;
- /* We LOVE goto's!
+ /* We LOVE goto's!
*
* Let's rephrase this..._You_ love goto's...we _abhore_ goto's. People who
* LOVE goto's should be shot.
@@ -480,7 +480,7 @@ PRIVATE int HTLoadDocument ARGS4(
#endif
status = HTLoad(full_address, anchor, format_out, sink);
-
+
if (status == HT_LOADED) {
#ifndef DISABLE_TRACE
if (www2Trace) {
@@ -498,9 +498,9 @@ PRIVATE int HTLoadDocument ARGS4(
#ifndef DISABLE_TRACE
if (www2Trace)
{
- fprintf (stderr, "HTAccess: '%s' is a redirection URL.\n",
+ fprintf (stderr, "HTAccess: '%s' is a redirection URL.\n",
full_address);
- fprintf (stderr, "HTAccess: Redirecting to '%s'\n",
+ fprintf (stderr, "HTAccess: Redirecting to '%s'\n",
redirecting_url);
}
#endif
@@ -518,26 +518,26 @@ PRIVATE int HTLoadDocument ARGS4(
#endif
return -1;
}
-
+
if (status == HT_NO_DATA) {
#ifndef DISABLE_TRACE
if (www2Trace) {
- fprintf(stderr,
+ fprintf(stderr,
"HTAccess: `%s' has been accessed, No data left.\n",
full_address);
}
#endif
return 0;
}
-
+
if (status<0) { /* Failure in accessing a document */
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
+ if (www2Trace) fprintf(stderr,
"HTAccess: Can't access `%s'\n", full_address);
#endif
return 0;
}
-
+
/* If you get this, then please find which routine is returning
a positive unrecognised error code! */
@@ -561,7 +561,7 @@ PRIVATE int HTLoadDocument ARGS4(
**
** On Exit,
** returns 1 Success in opening document
-** 0 Failure
+** 0 Failure
** -1 Interrupted
**
**
@@ -591,7 +591,7 @@ PUBLIC int HTLoadAbsolute ARGS1(WWW_CONST char *,addr)
**
** On Exit,
** returns YES Success in opening document
-** NO Failure
+** NO Failure
**
**
*/
@@ -619,7 +619,7 @@ PUBLIC BOOL HTLoadToStream ARGS3(
**
** On Exit,
** returns YES Success in opening document
-** NO Failure
+** NO Failure
**
**
*/
diff --git a/libwww2/HTAccess.h b/libwww2/HTAccess.h
index 703867b..d85c4f9 100644
--- a/libwww2/HTAccess.h
+++ b/libwww2/HTAccess.h
@@ -1,13 +1,13 @@
/* HTAccess: Access manager for libwww
ACCESS MANAGER
-
+
This module keeps a list of valid protocol (naming scheme)
specifiers with associated access code. It allows documents to be
loaded given various combinations of parameters. New access
protocols may be registered at any time.
-
+
Part of the libwww library .
-
+
*/
#ifndef HTACCESS_H
#define HTACCESS_H
@@ -54,17 +54,17 @@ extern HTFormat HTOutputFormat; /* To convert on load, set this */
Load a document from relative name
ON ENTRY,
-
+
relative_name The relative address of the file to be accessed.
-
+
here The anchor of the object being searched
-
+
ON EXIT,
-
+
returns YES Success in opening file
-
+
NO Failure
-
+
*/
extern BOOL HTLoadRelative PARAMS((
WWW_CONST char * relative_name,
@@ -76,25 +76,25 @@ extern BOOL HTLoadRelative PARAMS((
Load a document from absolute name
ON ENTRY,
-
+
addr The absolute address of the document to be accessed.
-
+
filter if YES, treat document as HTML
-
+
*/
/*
ON EXIT,
-
+
*/
/*
returns YES Success in opening document
-
+
NO Failure
-
+
*/
extern int HTLoadAbsolute PARAMS((WWW_CONST char * addr));
@@ -104,19 +104,19 @@ extern int HTLoadAbsolute PARAMS((WWW_CONST char * addr));
Load a document from absolute name to a stream
ON ENTRY,
-
+
addr The absolute address of the document to be accessed.
-
+
filter if YES, treat document as HTML
-
+
ON EXIT,
-
+
returns YES Success in opening document
-
+
NO Failure
-
+
Note: This is equivalent to HTLoadDocument
-
+
*/
extern BOOL HTLoadToStream PARAMS((WWW_CONST char * addr, BOOL filter,
HTStream * sink));
@@ -127,13 +127,13 @@ extern BOOL HTLoadToStream PARAMS((WWW_CONST char * addr, BOOL filter,
Make a stream for Saving object back
ON ENTRY,
-
+
anchor is valid anchor which has previously beeing loaded
-
+
ON EXIT,
-
+
returns 0 if error else a stream to save the object to.
-
+
*/
@@ -148,13 +148,13 @@ Register an access method
typedef struct _HTProtocol {
char * name;
-
+
int (*load)PARAMS((
WWW_CONST char * full_address,
HTParentAnchor * anchor,
HTFormat format_out,
HTStream* sink));
-
+
HTStream* (*saveStream)PARAMS((HTParentAnchor * anchor));
} HTProtocol;
diff --git a/libwww2/HTAnchor.c b/libwww2/HTAnchor.c
index a8c61ae..9f112a9 100644
--- a/libwww2/HTAnchor.c
+++ b/libwww2/HTAnchor.c
@@ -7,7 +7,7 @@
** History
**
** Nov 1990 Written in Objective-C for the NeXT browser (TBL)
-** 24-Oct-1991 (JFG), written in C, browser-independant
+** 24-Oct-1991 (JFG), written in C, browser-independant
** 21-Nov-1991 (JFG), first complete version
**
** (c) Copyright CERN 1991 - See Copyright.html
@@ -40,7 +40,7 @@ PRIVATE HTList **adult_table=0; /* Point to table of lists of all parents */
PRIVATE HTParentAnchor * HTParentAnchor_new
NOARGS
{
- HTParentAnchor *newAnchor =
+ HTParentAnchor *newAnchor =
(HTParentAnchor *) calloc (1, sizeof (HTParentAnchor)); /* zero-filled */
newAnchor->parent = newAnchor;
return newAnchor;
@@ -168,7 +168,7 @@ HTAnchor * HTAnchor_findAddress
/* If the address represents a sub-anchor, we recursively load its parent,
then we create a child anchor within that document. */
- if (tag && *tag)
+ if (tag && *tag)
{
char *docAddress = HTParse(address, "", PARSE_ACCESS | PARSE_HOST |
PARSE_PATH | PARSE_PUNCTUATION);
@@ -179,8 +179,8 @@ HTAnchor * HTAnchor_findAddress
free (tag);
return (HTAnchor *) foundAnchor;
}
-
- else { /* If the address has no anchor tag,
+
+ else { /* If the address has no anchor tag,
check whether we have this node */
int hash;
WWW_CONST char *p;
@@ -189,7 +189,7 @@ HTAnchor * HTAnchor_findAddress
HTParentAnchor * foundAnchor;
free (tag);
-
+
/* Select list from hash table */
for(p=address, hash=0; *p; p++)
hash = (hash * 3 + (*(unsigned char*)p))
@@ -210,7 +210,7 @@ HTAnchor * HTAnchor_findAddress
return (HTAnchor *) foundAnchor;
}
}
-
+
/* Node not found : create new anchor */
foundAnchor = HTParentAnchor_new ();
#ifndef DISABLE_TRACE
diff --git a/libwww2/HTAssoc.h b/libwww2/HTAssoc.h
index 522cf74..3088ddc 100644
--- a/libwww2/HTAssoc.h
+++ b/libwww2/HTAssoc.h
@@ -1,7 +1,7 @@
/* ASSOCIATION LIST FOR STORING NAME-VALUE PAIRS
-
+
Lookups from assosiation list are not case-sensitive.
-
+
*/
#ifndef HTASSOC_H
diff --git a/libwww2/HTAtom.c b/libwww2/HTAtom.c
index 67ee16a..e7dde9d 100644
--- a/libwww2/HTAtom.c
+++ b/libwww2/HTAtom.c
@@ -41,7 +41,7 @@ PUBLIC HTAtom * HTAtom_for(string)
/* Bug hack. */
if (!string || !*string)
string = strdup ("blargh");
-
+
/* First time around, clear hash table
*/
if (!initialised) {
@@ -50,13 +50,13 @@ PUBLIC HTAtom * HTAtom_for(string)
hash_table[i] = (HTAtom *) 0;
initialised = YES;
}
-
+
/* Generate hash function
*/
for(p=string, hash=0; *p; p++) {
hash = (hash * 3 + *p) % HASH_SIZE;
}
-
+
/* Search for the string in the list
*/
for (a=hash_table[hash]; a; a=a->next) {
@@ -68,7 +68,7 @@ PUBLIC HTAtom * HTAtom_for(string)
return a; /* Found: return it */
}
}
-
+
/* Generate a new entry
*/
a = (HTAtom *)malloc(sizeof(*a));
@@ -95,17 +95,17 @@ PUBLIC HTAtom * HTAtom_exists(string)
int hash;
WWW_CONST char * p;
HTAtom * a;
-
+
if (!initialised) {
return NULL;
}
-
+
/* Generate hash function
*/
for(p=string, hash=0; *p; p++) {
hash = (hash * 3 + *p) % HASH_SIZE;
}
-
+
/* Search for the string in the list
*/
for (a=hash_table[hash]; a; a=a->next) {
@@ -113,6 +113,6 @@ PUBLIC HTAtom * HTAtom_exists(string)
return a; /* Found: return it */
}
}
-
+
return NULL;
}
diff --git a/libwww2/HTAuth.c b/libwww2/HTAuth.c
index 28f3996..f34ea83 100644
--- a/libwww2/HTAuth.c
+++ b/libwww2/HTAuth.c
@@ -65,7 +65,7 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring,
/* this also frees all the strings pointed to */
/* by the static 'user'. */
- if (!authstring || !*authstring ||
+ if (!authstring || !*authstring ||
scheme != HTAA_BASIC || scheme == HTAA_PUBKEY)
return NULL;
@@ -88,7 +88,7 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring,
else { /* Just uudecode */
int bytes_decoded;
int len = strlen(authstring) + 1;
-
+
if (!(cleartext = (char*)malloc(len)))
outofmem(__FILE__, "decompose_auth_string");
bytes_decoded = HTUU_decode(authstring, cleartext, len);
@@ -115,7 +115,7 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring,
** Extract rest of the fields
*/
if (scheme == HTAA_PUBKEY) {
- if ( !(inet_addr =strchr(password, ':')) ||
+ if ( !(inet_addr =strchr(password, ':')) ||
(*(inet_addr++) ='\0'), !(timestamp =strchr(inet_addr,':')) ||
(*(timestamp++) ='\0'), !(browsers_key=strchr(timestamp,':')) ||
(*(browsers_key++)='\0')) {
@@ -162,7 +162,7 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring,
username, password, inet_addr, timestamp, browsers_key);
}
#endif
-
+
return user;
}
diff --git a/libwww2/HTAuth.h b/libwww2/HTAuth.h
index 3bcf1f4..441f75b 100644
--- a/libwww2/HTAuth.h
+++ b/libwww2/HTAuth.h
@@ -1,8 +1,8 @@
/* AUTHENTICATION MODULE
-
+
This is the authentication module. By modifying the function HTAA_authenticate() it can
be made to support external authentication methods.
-
+
*/
#ifndef HTAUTH_H
diff --git a/libwww2/HTChunk.h b/libwww2/HTChunk.h
index 545945b..b6100f8 100644
--- a/libwww2/HTChunk.h
+++ b/libwww2/HTChunk.h
@@ -1,11 +1,11 @@
/* /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/HTChunk.html
CHUNK HANDLING:
FLEXIBLE ARRAYS
-
+
This module implements a flexible array. It is a general utility module. A chunk is a
structure which may be extended. These routines create and append data to chunks,
automatically reallocating them as necessary.
-
+
*/
typedef struct {
int size; /* In bytes */
@@ -30,15 +30,15 @@ typedef struct {
Create new chunk
ON ENTRY,
-
+
growby The number of bytes to allocate at a time when the chunk is
later extended. Arbitrary but normally a trade-off time vs.
memory
-
+
ON EXIT,
-
+
returns A chunk pointer to the new chunk,
-
+
*/
extern HTChunk * HTChunkCreate PARAMS((int growby));
@@ -49,13 +49,13 @@ extern HTChunk * HTChunkCreate PARAMS((int growby));
Free a chunk
ON ENTRY,
-
+
ch A valid chunk pointer made by HTChunkCreate()
-
+
ON EXIT,
-
+
ch is invalid and may not be used.
-
+
*/
extern void HTChunkFree PARAMS((HTChunk * ch));
@@ -66,13 +66,13 @@ extern void HTChunkFree PARAMS((HTChunk * ch));
Clear a chunk
ON ENTRY,
-
+
ch A valid chunk pointer made by HTChunkCreate()
-
+
ON EXIT,
-
+
*ch The size of the chunk is zero.
-
+
*/
extern void HTChunkClear PARAMS((HTChunk * ch));
@@ -83,15 +83,15 @@ extern void HTChunkClear PARAMS((HTChunk * ch));
Ensure a chunk has a certain space in
ON ENTRY,
-
+
ch A valid chunk pointer made by HTChunkCreate()
-
+
s The size required
-
+
ON EXIT,
-
+
*ch Has size at least s
-
+
*/
extern void HTChunkEnsure PARAMS((HTChunk * ch, int s));
@@ -102,15 +102,15 @@ extern void HTChunkEnsure PARAMS((HTChunk * ch, int s));
Append a character to a chunk
ON ENTRY,
-
+
ch A valid chunk pointer made by HTChunkCreate()
-
+
c The character to be appended
-
+
ON EXIT,
-
+
*ch Is one character bigger
-
+
*/
extern void HTChunkPutc PARAMS((HTChunk * ch, char c));
@@ -119,15 +119,15 @@ extern void HTChunkPutc PARAMS((HTChunk * ch, char c));
Append a string to a chunk
ON ENTRY,
-
+
ch A valid chunk pointer made by HTChunkCreate()
-
+
str Tpoints to a zero-terminated string to be appended
-
+
ON EXIT,
-
+
*ch Is bigger by strlen(str)
-
+
*/
@@ -143,13 +143,13 @@ Append a zero character to a chunk
/*
ON ENTRY,
-
+
ch A valid chunk pointer made by HTChunkCreate()
-
+
ON EXIT,
-
+
*ch Is one character bigger
-
+
*/
diff --git a/libwww2/HTCompressed.c b/libwww2/HTCompressed.c
index e993782..accf8d6 100644
--- a/libwww2/HTCompressed.c
+++ b/libwww2/HTCompressed.c
@@ -28,7 +28,7 @@
extern int www2Trace;
#endif
-struct _HTStream
+struct _HTStream
{
WWW_CONST HTStreamClass* isa;
/* ... */
@@ -55,7 +55,7 @@ void HTCompressedFileToFile (char *fnam, int compressed)
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf
+ fprintf
(stderr, "[HTCompressedFileToFile] Entered; fnam '%s', compressed %d\n",
fnam, compressed);
#endif
@@ -65,7 +65,7 @@ void HTCompressedFileToFile (char *fnam, int compressed)
return;
HTProgress ("Preparing to uncompress data.");
-
+
znam = (char *)malloc (sizeof (char) * (strlen (fnam) + 8));
/* Either compressed or gzipped. */
@@ -161,11 +161,11 @@ void HTCompressedFileToFile (char *fnam, int compressed)
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf
+ fprintf
(stderr, "[HTCompressedFileToFile] Uncompressed '%s' with command '%s'\n",
znam, cmd);
#endif
-
+
free (cmd);
free (znam);
@@ -178,10 +178,10 @@ void HTCompressedHText (HText *text, int compressed, int plain)
char *fnam;
FILE *fp;
int rv, size_of_data;
-
+
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf
+ fprintf
(stderr, "[HTCompressedHText] Entered; compressed %d\n",
compressed);
#endif
@@ -199,7 +199,7 @@ void HTCompressedHText (HText *text, int compressed, int plain)
fprintf (stderr, "[HTCompressedHText] size_of_data 0; punting\n");
return;
}
-
+
fnam = mo_tmpnam ((char *) 0);
fp = fopen (fnam, "w");
if (!fp)
@@ -240,7 +240,7 @@ void HTCompressedHText (HText *text, int compressed, int plain)
HText_clearOutForNewContents (text);
HText_beginAppend (text);
-
+
if (plain)
{
#ifndef DISABLE_TRACE
@@ -277,6 +277,6 @@ void HTCompressedHText (HText *text, int compressed, int plain)
free (cmd);
*/
unlink(fnam);
-
+
return;
}
diff --git a/libwww2/HTFTP.c b/libwww2/HTFTP.c
index d29ceaa..fde9129 100644
--- a/libwww2/HTFTP.c
+++ b/libwww2/HTFTP.c
@@ -109,9 +109,9 @@ struct _HTStream {
/* ... */
};
-/*
+/*
** Info for cached connection; right now we only keep one around for a while
-*/
+*/
extern XtAppContext app_context;
extern int ftp_timeout_val;
extern int securityType;
@@ -201,12 +201,12 @@ PRIVATE char next_data_char NOARGS
{
int status;
interrupted_in_next_data_char = 0;
- if (data_read_pointer >= data_write_pointer)
+ if (data_read_pointer >= data_write_pointer)
{
status = NETREAD(data_soc, data_buffer, DATA_BUFFER_SIZE);
if (status == HT_INTERRUPTED)
interrupted_in_next_data_char = 1;
- if (status <= 0)
+ if (status <= 0)
return (char)-1;
data_write_pointer = data_buffer + status;
data_read_pointer = data_buffer;
@@ -264,19 +264,19 @@ int bytes;
#endif
return -99;
}
-
- if (cmd)
+
+ if (cmd)
{
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, " Tx: %s", cmd);
#endif
-
+
status = NETWRITE(control, cmd, (int)strlen(cmd));
- if (status<0)
+ if (status<0)
{
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
+ if (www2Trace) fprintf(stderr,
"FTP: Error %d sending command: closing socket %d\n",
status, control);
#endif
@@ -285,12 +285,12 @@ int bytes;
return status;
}
}
-
+
/* Patch to be generally compatible with RFC 959 servers -spok@cs.cmu.edu */
/* Multiline responses start with a number and a hyphen;
end with same number and a space. When it ends, the number must
be flush left. */
- do
+ do
{
char *p = response_text;
/* If nonzero, it's set to initial code of multiline response */
@@ -299,7 +299,7 @@ int bytes;
int foo;
/* This is set to 0 at the start of HTGetCharacter. */
extern int interrupted_in_htgetcharacter;
-
+
foo = (*p++ = HTGetCharacter ());
if (interrupted_in_htgetcharacter)
{
@@ -311,20 +311,20 @@ int bytes;
control = -1;
return HT_INTERRUPTED;
}
-
- if (foo == LF ||
+
+ if (foo == LF ||
/* if (((*p++=NEXT_CHAR) == '\n') || */
- (p == &response_text[LINE_LENGTH]))
+ (p == &response_text[LINE_LENGTH]))
{
*p++=0; /* Terminate the string */
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, " Rx: %s", response_text);
#endif
if (!strncmp(response_text,"150",3)) {
if((ptr=strrchr(response_text,'(')) && *ptr){
bytes = atoi((ptr+1));
- } else {
+ } else {
bytes=0;
}
if (bytes==0) {
@@ -344,7 +344,7 @@ int bytes;
sscanf(response_text, "%d%c", &result, &continuation);
if ((response_text[0] == '2') || (response_text[0] == '5')) {
-
+
if (continuation == '-') {
char *p;
@@ -361,25 +361,25 @@ int bytes;
}
}
-
- if (continuation == '-' && !multiline_response)
+
+ if (continuation == '-' && !multiline_response)
{
multiline_response = result;
}
else if (multiline_response && continuation == ' ' &&
multiline_response == result &&
- isdigit(response_text[0]))
+ isdigit(response_text[0]))
{
/* End of response (number must be flush on left) */
multiline_response = 0;
}
break;
} /* if end of line */
-
- if (*(p-1) < 0)
+
+ if (*(p-1) < 0)
{
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "Error on rx: closing socket %d\n",
control);
#endif
@@ -392,19 +392,19 @@ int bytes;
return -1; /* End of file on response */
}
} /* Loop over characters */
- }
+ }
while (multiline_response);
if (messageStarted)
HText_appendText(HT, "
\n");
-
+
#ifdef OLD
- do
+ do
{
char *p = response_text;
- for(;;)
- {
+ for(;;)
+ {
int foo;
/* This is set to 0 at the start of HTGetCharacter. */
extern int interrupted_in_htgetcharacter;
@@ -421,15 +421,15 @@ int bytes;
return HT_INTERRUPTED;
}
- if (foo == LF ||
- p == &response_text[LINE_LENGTH])
+ if (foo == LF ||
+ p == &response_text[LINE_LENGTH])
{
char continuation;
int rv;
*p++=0; /* Terminate the string */
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, " Rx: %s", response_text);
#endif
/* Clear out result ahead of time to see if we couldn't
@@ -439,7 +439,7 @@ int bytes;
/* Try just continuing if we couldn't pull out
a value for result and the response_text starts with
whitespace. */
- if (rv < 2 && result == -1 &&
+ if (rv < 2 && result == -1 &&
(*response_text == ' ' || *response_text == '\t'))
{
/* Dunno what to do here -- the code isn't really
@@ -447,23 +447,23 @@ int bytes;
with whitespace. Testcase is
reports.adm.cs.cmu.edu. */
}
- else if (continuation_response == -1)
+ else if (continuation_response == -1)
{
if (continuation == '-') /* start continuation */
continuation_response = result;
- }
- else
+ }
+ else
{ /* continuing */
if (continuation_response == result && continuation == ' ')
continuation_response = -1; /* ended */
- }
- break;
+ }
+ break;
} /* if end of line */
-
- if (*(p-1) == EOF)
+
+ if (*(p-1) == EOF)
{
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "Error on rx: closing socket %d\n",
control);
#endif
@@ -473,15 +473,15 @@ int bytes;
return -1; /* End of file on response */
}
} /* Loop over characters */
-
- }
+
+ }
while (continuation_response != -1);
#endif
-
- if (result == 421)
+
+ if (result == 421)
{
#ifndef DISABLE_TRACE
- if(www2Trace)
+ if(www2Trace)
fprintf(stderr, "FTP: They close so we close socket %d\n",
control);
#endif
@@ -519,21 +519,21 @@ int bytes;
PRIVATE int get_connection ARGS1 (char *,arg)
{
int status, con;
-
+
static char host[BUFSIZ];
static char username[BUFSIZ];
static char password[BUFSIZ];
- char dummy[MAXHOSTNAMELEN+32];
+ char dummy[MAXHOSTNAMELEN+32];
int redial=0;
- if (!arg)
+ if (!arg)
return -1; /* Bad if no name sepcified */
- if (!*arg)
+ if (!*arg)
return -1; /* Bad if name had zero length */
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP: Looking for %s\n", arg);
#endif
@@ -559,7 +559,7 @@ int redial=0;
*p2=0; /* terminate */
p1 = p2+1; /* point to host */
pw = strchr(un, ':');
- if (pw)
+ if (pw)
{
*pw++ = 0;
/*
@@ -582,15 +582,15 @@ int redial=0;
}
}
/*no username*/
- else {
+ else {
if (strcmp(username,"anonymous")) { /*last one was not anon*/
*username='\0';
*password='\0';
}
}
- /* copy hostname into dummy URL, since username:password@
- might have been part of original */
+ /* copy hostname into dummy URL, since username:password@
+ might have been part of original */
sprintf(dummy, "ftp://%s", p1);
#ifndef DISABLE_TRACE
@@ -672,7 +672,7 @@ redialFTP:
#endif
status = HTDoConnect (dummy, "FTP", IPPORT_FTP, &con);
-
+
if (status < 0)
{
#ifndef DISABLE_TRACE
@@ -682,7 +682,7 @@ redialFTP:
fprintf (stderr,
"FTP: Interrupted on connect\n");
else
- fprintf(stderr,
+ fprintf(stderr,
"FTP: Unable to connect to remote host for `%s'.\n",
arg);
}
@@ -695,15 +695,15 @@ redialFTP:
con = -1;
}
/*
- if (username)
+ if (username)
free(username);
*/
HTProgress ("Unable to connect to remote host.");
return status; /* Bad return */
}
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP connected, assigning control socket %d\n", con);
#endif
control = con; /* Current control connection */
@@ -712,7 +712,7 @@ redialFTP:
/* Initialise buffering for contron connection */
HTInitInput (con);
-
+
/* Now we log in; Look up username, prompt for pw. */
{
@@ -733,10 +733,10 @@ redialFTP:
control = -1;
return HT_INTERRUPTED;
}
- if (status == 2)
+ if (status == 2)
{ /* Send username */
char * command;
- if (*username)
+ if (*username)
{
command = (char*)malloc(10+strlen(username)+2+1);
sprintf(command, "USER %s%c%c", username, CR, LF);
@@ -759,8 +759,8 @@ redialFTP:
return HT_INTERRUPTED;
}
}
- }
- else
+ }
+ else
{
command = (char*)malloc(25);
sprintf(command, "USER anonymous%c%c", CR, LF);
@@ -785,20 +785,20 @@ redialFTP:
return HT_INTERRUPTED;
}
}
- if (status == 3)
+ if (status == 3)
{ /* Send password */
char * command;
- if (*password)
+ if (*password)
{
command = (char*)malloc(10+strlen(password)+2+1);
sprintf(command, "PASS %s%c%c", password, CR, LF);
- }
- else
+ }
+ else
{
char * user = getenv("USER");
extern char *machine_with_domain;
char *host = machine_with_domain;
- if (!user)
+ if (!user)
user = "WWWuser";
/* If not fully qualified, suppress it as ftp.uu.net
prefers a blank to a bad name */
@@ -829,12 +829,12 @@ redialFTP:
return HT_INTERRUPTED;
}
}
-
- if (status == 3)
+
+ if (status == 3)
{
char temp[80];
/*
- if (username)
+ if (username)
free(username);
*/
sprintf (temp, "ACCT noaccount%c%c", CR, LF);
@@ -855,7 +855,7 @@ redialFTP:
return HT_INTERRUPTED;
}
}
- if (status != 2)
+ if (status != 2)
{
if (status==HT_INTERRUPTED) {
#ifndef DISABLE_TRACE
@@ -914,7 +914,7 @@ redialFTP:
/*if we're tracing, explain it all*/
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP: Login fail: %s", response_text);
#endif
/*
@@ -952,7 +952,7 @@ redialFTP:
}
HTProgress("Login failed");
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP: Login fail: %s", response_text);
#endif
@@ -970,7 +970,7 @@ redialFTP:
return -1; /* Bad return */
}
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP: Logged in.\n");
#endif
@@ -983,7 +983,7 @@ redialFTP:
securityType=HTAA_NONE;
}
}
-
+
return con; /* Good return */
} /* Scope of con */
@@ -1000,7 +1000,7 @@ PRIVATE void close_master_socket()
#endif
{
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP: Closing master socket %d\n", master_socket);
#endif
NETCLOSE(master_socket);
@@ -1033,18 +1033,18 @@ PRIVATE int get_listen_socket()
struct sockaddr_in soc_address; /* Binary network address */
struct sockaddr_in *sin = &soc_address;
int new_socket; /* Will be master_socket */
-
+
/* Create internet socket */
new_socket = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
-
+
if (new_socket < 0)
return -1;
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP: Opened master socket number %d\n", new_socket);
#endif
-
+
/* Search for a free port. */
sin->sin_family = AF_INET; /* Family = internet, host order */
sin->sin_addr.s_addr = INADDR_ANY; /* Any peer address */
@@ -1058,7 +1058,7 @@ PRIVATE int get_listen_socket()
#endif
(struct sockaddr *)&soc_address,
&address_length);
- if (status<0)
+ if (status<0)
return -1;
#ifndef DISABLE_TRACE
@@ -1081,9 +1081,9 @@ PRIVATE int get_listen_socket()
#else
sizeof(soc_address));
#endif
- if (status<0)
+ if (status<0)
return -1;
-
+
address_length = sizeof(soc_address);
#ifdef SOCKS
status = Rgetsockname(new_socket,
@@ -1092,10 +1092,10 @@ PRIVATE int get_listen_socket()
#endif
(struct sockaddr*)&soc_address,
&address_length);
- if (status<0)
+ if (status<0)
return -1;
}
-
+
#ifndef DISABLE_TRACE
if(www2Trace) {
fprintf(stderr, "FTP: bound to port %d on %s\n",
@@ -1104,11 +1104,11 @@ PRIVATE int get_listen_socket()
}
#endif
- if (master_socket >= 0)
+ if (master_socket >= 0)
close_master_socket ();
-
+
master_socket = new_socket;
-
+
/* Now we must find out who we are to tell the other guy */
(void)HTHostName(); /* Make address valid - doesn't work*/
sprintf(port_command, "PORT %d,%d,%d,%d,%d,%d%c%c",
@@ -1119,12 +1119,12 @@ PRIVATE int get_listen_socket()
(int)*((unsigned char *)(&sin->sin_port)+0),
(int)*((unsigned char *)(&sin->sin_port)+1),
CR, LF);
-
+
/* Inform TCP that we will accept connections */
#ifdef SOCKS
- if (Rlisten (master_socket, 1) < 0)
+ if (Rlisten (master_socket, 1) < 0)
#else
- if (listen (master_socket, 1) < 0)
+ if (listen (master_socket, 1) < 0)
#endif
{
close_master_socket ();
@@ -1270,7 +1270,7 @@ char szTime[32];
#if 0
ret=sscanf(buffer,"%c%*9s%*d %*s %*s %s", &itemtype, itemsize);
- if (ret != 2)
+ if (ret != 2)
continue;
#endif
/* Retain whole string -- we don't use it at the moment, but we will. */
@@ -1317,10 +1317,10 @@ char szTime[32];
/* Due to the various time stamp formats, its "safer" to retrieve the */
/* filename by taking it from the right side of the string, we do that here. */
ptr = strrchr(buffer,' ');
-
- if(ptr == NULL)
+
+ if(ptr == NULL)
continue;
-
+
strcpy(itemname,ptr+1);
if (!strcmp(itemname,".") || !strcmp(itemname,"..")) {
@@ -1348,18 +1348,18 @@ char szTime[32];
HText_appendText (HT, "");
/* Spit out the anchor refrence, and continue on... */
-
+
HText_appendText (HT, "");
-
+
/* There are 3 "types", directory, link and file. If its a directory we */
/* just spit out the name with a directory icon. If its a link, we go */
/* retrieve the proper name (i.e. the input looks like bob -> ../../../bob */
@@ -1378,7 +1378,7 @@ char szTime[32];
HText_appendText(HT, "\"> ");
break;
}
-
+
case 'l':
{
ptr = strrchr(buffer,' ');
@@ -1387,28 +1387,28 @@ char szTime[32];
*ptr = '\0';
ptr = strrchr(buffer,' ');
}
-
+
if(ptr != NULL)
{
*ptr = '\0';
ptr = strrchr(buffer,' ');
}
-
+
if(ptr != NULL) strcpy(itemname,ptr+1);
if (compact_string(itemname,ellipsis_string,ftpFilenameLength,ftpEllipsisMode,ftpEllipsisLength)) {
strcpy(itemname,ellipsis_string);
}
}
-
+
case '-':
{
-
- /* If this is a link type, and the bytes are small,
+
+ /* If this is a link type, and the bytes are small,
its probably a directory so lets not show the byte
count */
-#if 0
- if(itemtype == 'l' && atoi(itemsize) < 128)
+#if 0
+ if(itemtype == 'l' && atoi(itemsize) < 128)
{
sprintf(buffer,"%s",itemname);
}
@@ -1419,7 +1419,7 @@ char szTime[32];
#endif
#if 0
- if(itemtype == 'l')
+ if(itemtype == 'l')
{
#endif
if (compact_string(itemname,ellipsis_string,ftpFilenameLength,ftpEllipsisMode,ftpEllipsisLength)) {
@@ -1456,7 +1456,7 @@ char szTime[32];
}
else
{
- HText_appendText(HT, HTgeticonname(format, "text"));
+ HText_appendText(HT, HTgeticonname(format, "text"));
}
HText_appendText(HT, "\"> ");
@@ -1464,7 +1464,7 @@ char szTime[32];
else
{
HText_appendText(HT, " ");
}
@@ -1474,7 +1474,7 @@ char szTime[32];
default:
{
HText_appendText(HT, " ");
break;
}
@@ -1496,7 +1496,7 @@ char szTime[32];
t=time(0);
ptr=localtime(&t);
sprintf(szYear,"%d",1900+ptr->tm_year);
- sprintf(szDate, "%*s%9s %s %s %s %2.2s, %s", nSpaces, " ", itemsize, szFileInfo, szTime, szMonth, szDay, szYear);
+ sprintf(szDate, "%*s%9s %s %s %s %2.2s, %s", nSpaces, " ", itemsize, szFileInfo, szTime, szMonth, szDay, szYear);
}
else if (nTime == 0) {
sprintf(szDate, "%*s%9s %s %s %s %2.2s, %s", nSpaces, " ", itemsize, szFileInfo, " ", szMonth, szDay, szYear);
@@ -1514,7 +1514,7 @@ char szTime[32];
free (full_ftp_name);
}
-
+
HText_appendText (HT, "\n");
#ifdef NEW_PARSE
HText_appendText (HT, "\n");
@@ -1560,15 +1560,15 @@ ARGS4 (
}
HT = HText_new ();
HText_beginAppend (HT);
-
- for (retry = 0; retry < 2; retry++)
+
+ for (retry = 0; retry < 2; retry++)
{
#ifndef DISABLE_TRACE
if (www2Trace)
fprintf (stderr, "FTP: TRYING in HTFTPLoad, attempt %d\n", retry);
#endif
status = get_connection(name);
- if (status < 0)
+ if (status < 0)
{
CLOSE_CONTROL (control);
control = -1;
@@ -1578,7 +1578,7 @@ ARGS4 (
#endif
return status;
}
-
+
status = get_listen_socket();
if (status < 0)
{
@@ -1594,7 +1594,7 @@ ARGS4 (
somehow in the middle of it, which we currently can't. */
return status;
}
-
+
/* Inform the server of the port number we will listen on */
{
status = response (port_command);
@@ -1613,9 +1613,9 @@ ARGS4 (
close_master_socket ();
return HT_INTERRUPTED;
}
- if (status !=2)
+ if (status !=2)
{ /* Could have timed out */
- if (status < 0)
+ if (status < 0)
{
CLOSE_CONTROL (control);
control = -1;
@@ -1650,21 +1650,21 @@ ARGS4 (
#endif
return status; /* Failed with this code */
}
-
- /* Ask for the file: */
+
+ /* Ask for the file: */
{
char *filename = HTParse(name, "", PARSE_PATH + PARSE_PUNCTUATION);
char *fname, *ptr;
char command[LINE_LENGTH+1];
HTAtom *encoding;
- if (!(*filename))
+ if (!(*filename))
StrAllocCopy(filename, "/");
format = HTFileFormat (filename, &encoding, WWW_PLAINTEXT, &compressed);
-
+
sprintf(command, "TYPE %s%c%c", "I", CR, LF);
status = response (command);
- if (status != 2)
+ if (status != 2)
{
if (status == HT_INTERRUPTED)
HTProgress ("Connection interrupted.");
@@ -1845,7 +1845,7 @@ skipDir:
free(filename);
free(fname);
- if (status != 1)
+ if (status != 1)
{
CLOSE_CONTROL (control);
control = -1;
@@ -1856,7 +1856,7 @@ skipDir:
return HT_NOT_LOADED; /* Action not started */
}
}
-
+
/* Wait for the connection */
{
struct sockaddr_in soc_address;
@@ -1891,7 +1891,7 @@ skipDir:
data_soc = status;
}
- if (isDirectory)
+ if (isDirectory)
{
int s = read_directory (anchor, name, format_out, sink);
@@ -1909,28 +1909,28 @@ skipDir:
#endif
/* HT_INTERRUPTED should fall right through. */
return s;
- }
- else
+ }
+ else
{
/* We reproduce ParseSocket below because of socket/child process
problem. */
HTStream * stream;
- HTStreamClass targetClass;
+ HTStreamClass targetClass;
int rv;
-
+
stream = HTStreamStack(format,
format_out,
compressed,
sink, anchor);
-
- if (!stream)
+
+ if (!stream)
{
char buffer[1024]; /* @@@@@@@@ */
sprintf(buffer, "Sorry, can't convert from %s to %s.",
HTAtom_name(format), HTAtom_name(format_out));
HTProgress (buffer);
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "FTP: %s\n", buffer);
#endif
#ifdef SWP_HACK
@@ -1938,7 +1938,7 @@ skipDir:
#endif
return HT_NOT_LOADED;
}
-
+
targetClass = *(stream->isa); /* Copy pointers to procedures */
ftpKludge=1;
rv = HTCopy(data_soc, stream, 0);
@@ -1979,7 +1979,7 @@ skipDir:
Testcase for problems (10/30/93): uxc.cso.uiuc.edu,
AnswerGarden COPYRIGHT in X11R5 contrib clients.
-
+
Of course, we may already be triggering hostile actions
by allowing client-side interrupts as follows... */
if (rv != HT_INTERRUPTED)
@@ -2014,7 +2014,7 @@ skipDir:
return HT_NOT_LOADED;
}
}
-
+
close_master_socket ();
if (rv != HT_INTERRUPTED)
@@ -2036,7 +2036,7 @@ skipDir:
/* HTFTPMkDir Request that a directory be created on the FTP site.
-** Expects: *name is a pointer to a string that consists of the FTP URL with
+** Expects: *name is a pointer to a string that consists of the FTP URL with
** the remote directory name.
** Returns 0 if successful, nonzero on error
*/
@@ -2151,7 +2151,7 @@ PUBLIC int HTFTPRemove ARGS1 ( char *, name )
control = -1;
return -1;
}
-
+
/* *fname is the full path to the file, *filename is just the filename */
for (method =0; method < 2; method++ ) {
switch (method) {
@@ -2256,15 +2256,15 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
struct sockaddr_in soc_address;
socklen_t soc_addrlen = sizeof (soc_address);
struct stat sbuf;
-
+
HTProgress ("FTP send in progress.");
if (fTimerStarted) {
XtRemoveTimeOut (timer);
fTimerStarted = 0;
}
-
- /* The local filename is in the url, so pull it out
+
+ /* The local filename is in the url, so pull it out
i.e. ftp://warez.yomama.com/pub/31337&/u/warezboy/Mosaic0.1a.tar.gz
means to send /u/warezboy/Mosaic0.1a.tar.gz to warez.yomama.com/pub/31337
*/
@@ -2272,7 +2272,7 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
close_master_socket ();
CLOSE_CONTROL (control);
control = -1;
- return -1;
+ return -1;
}
*fname = '\0'; /* Make the url normal */
@@ -2284,10 +2284,10 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
close_master_socket ();
CLOSE_CONTROL (control);
control = -1;
- return -1;
+ return -1;
}
-
- /* *fname is the full path and filename, *filename is just the filename */
+
+ /* *fname is the full path and filename, *filename is just the filename */
/* get size information */
if( stat (fname, &sbuf) < 0) {
CLOSE_CONTROL (control);
@@ -2295,7 +2295,7 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
close_master_socket ();
return -1;
}
-
+
bTotal = sbuf.st_size;
#ifndef DISABLE_TRACE
if(www2Trace)
@@ -2317,7 +2317,7 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
close_master_socket ();
return status;
}
-
+
status = response (port_command);
if (status == HT_INTERRUPTED) {
HTProgress ("Connection interrupted.");
@@ -2336,26 +2336,26 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
}
return -3;
}
-
+
/* Logged in, set up the port, now let's send the sucka */
/* Set the type to image */
sprintf (command, "TYPE %s%c%c", "I", CR, LF);
- status = response (command);
+ status = response (command);
if (status != 2) {
close_master_socket ();
CLOSE_CONTROL (control);
control = -1;
- if (status == HT_INTERRUPTED)
+ if (status == HT_INTERRUPTED)
HTProgress ("Connection interrupted.");
- return (status == HT_INTERRUPTED)?-2:-1;
+ return (status == HT_INTERRUPTED)?-2:-1;
}
-
+
/* Move to correct directory */
path = HTParse (name, "", PARSE_PATH+PARSE_PUNCTUATION);
if (!(*path))
StrAllocCopy (path, "/");
-
+
sprintf (command, "CWD %s%c%c", path, CR, LF);
status = response (command);
@@ -2363,9 +2363,9 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
close_master_socket ();
CLOSE_CONTROL (control);
control = -1;
- if (status == HT_INTERRUPTED)
+ if (status == HT_INTERRUPTED)
HTProgress ("Connection interrupted.");
- return (status == HT_INTERRUPTED)?-2:-1;
+ return (status == HT_INTERRUPTED)?-2:-1;
}
/* Send it */
@@ -2378,7 +2378,7 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
close_master_socket ();
return -2;
}
-
+
if (status != 1) { /* Does not seem to understand the STOR command */
HTProgress ("FTP host does not understand STOR command.");
CLOSE_CONTROL (control);
@@ -2386,9 +2386,9 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
close_master_socket ();
return -3;
}
-
+
/* Ready to send the data now, server is primed and ready... here we go, go go */
-
+
#ifdef SOCKS
status = Raccept (master_socket, (struct sockaddr *)&soc_address, &soc_addrlen);
#else
@@ -2409,46 +2409,46 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
if( (f = fopen( fname, "r")) == NULL) {
CLOSE_CONTROL (control);
control = -1;
- close_master_socket ();
+ close_master_socket ();
return -1;
}
-
+
HTMeter (0,NULL);
bDone = 0;
bLeft = bTotal;
mo_busy ();
for (;;) {
-
+
if (bDone > next_twirl) {
intr = HTCheckActiveIcon(1);
next_twirl += twirl_increment;
} else {
intr = HTCheckActiveIcon(0);
- }
+ }
if (intr) {
HTProgress ("Data transfer interrupted");
HTMeter (100,NULL);
break;
}
-
+
if (bLeft < OUTBUFSIZE) { /* Handle last block */
- if ((chunk = fread (outBuf, 1, bLeft, f)) == 0)
- break;
+ if ((chunk = fread (outBuf, 1, bLeft, f)) == 0)
+ break;
NETWRITE (data_soc, outBuf, chunk);
bLeft -= chunk;
bDone += chunk;
} else if (bLeft <= 0) { /* Exit */
- break;
+ break;
} else { /* Handle a block of the data */
- if ( (chunk = fread (outBuf, 1, OUTBUFSIZE, f)) == 0)
+ if ( (chunk = fread (outBuf, 1, OUTBUFSIZE, f)) == 0)
break;
NETWRITE (data_soc, outBuf, chunk);
bLeft -= chunk;
bDone += chunk;
}
HTMeter ((bDone*100)/bTotal, NULL);
- }
-
+ }
+
mo_not_busy ();
/* Done, now clean up */
fclose (f);
@@ -2472,15 +2472,15 @@ PUBLIC int HTFTPSend ARGS1 ( char *, name ) {
#endif
return intr?-2:-1;
}
-
+
timer = XtAppAddTimeOut(app_context, ftp_timeout_val*1000, close_it_up, NULL);
fTimerStarted = 1;
-
+
#ifndef DISABLE_TRACE
if(www2Trace)
fprintf (stderr, "HTFTPSend: File sent, returning OK\n");
#endif
- return 0;
+ return 0;
} /* End of HTFTPSend */
@@ -2620,7 +2620,7 @@ static char *tmpbuf=NULL;
int ParseDate(char *szBuffer, char *szFileInfo, char *szMonth, char *szDay, char *szYear, char *szTime) {
-
+
char *szPtr,*szEndPtr;
int nCount;
char *tmpbuf=(char *)calloc(BUFSIZ,sizeof(char));
@@ -2727,7 +2727,7 @@ char *tmpbuf=(char *)calloc(BUFSIZ,sizeof(char));
szPtr++;
}
- if (szPtr) {
+ if (szPtr) {
szPtr = strchr(szPtr, ' ');
while (szPtr && (*szPtr == ' ')) {
szPtr++;
@@ -2769,14 +2769,14 @@ char *tmpbuf=(char *)calloc(BUFSIZ,sizeof(char));
else {
strcpy(szMonth, " ");
}
- break;
+ break;
case 2:
szEndPtr = strchr(szPtr, ' ');
if (szEndPtr) {
strncpy(szDay, szPtr, szEndPtr - szPtr);
szDay[szEndPtr - szPtr] = '\0';
- szPtr = szEndPtr+1;
+ szPtr = szEndPtr+1;
while (szPtr && (*szPtr == ' ')) {
szPtr++;
}
@@ -2791,7 +2791,7 @@ char *tmpbuf=(char *)calloc(BUFSIZ,sizeof(char));
if (szEndPtr) {
strncpy(szYear, szPtr, szEndPtr - szPtr);
szYear[szEndPtr - szPtr] = '\0';
- szPtr = szEndPtr+1;
+ szPtr = szEndPtr+1;
}
else if (szEndPtr) {
strcpy(szYear, " ");
@@ -2816,7 +2816,7 @@ char *tmpbuf=(char *)calloc(BUFSIZ,sizeof(char));
strncpy(szTime, szPtr, 5);
szTime[5] = '\0';
-
+
free(tmpbuf);
return(1); /* ie the info is month, day, time */
}
diff --git a/libwww2/HTFTP.h b/libwww2/HTFTP.h
index 48d42ab..88c207a 100644
--- a/libwww2/HTFTP.h
+++ b/libwww2/HTFTP.h
@@ -1,12 +1,12 @@
/* FTP access module for libwww
FTP ACCESS FUNCTIONS
-
+
This isn't really a valid protocol module -- it is lumped together
with HTFile . That could be changed easily.
-
+
Author: Tim Berners-Lee. Public Domain. Please mail changes to
timbl@info.cern.ch
-
+
*/
#ifndef HTFTP_H
#define HTFTP_H
@@ -21,9 +21,9 @@
Retrieve File from Server
ON EXIT,
-
+
returns Socket number for file if good.<0 if bad.
-
+
*/
extern int HTFTPLoad PARAMS
((
diff --git a/libwww2/HTFWriter.c b/libwww2/HTFWriter.c
index b8f2568..431f3b8 100644
--- a/libwww2/HTFWriter.c
+++ b/libwww2/HTFWriter.c
@@ -40,7 +40,7 @@ extern int www2Trace;
struct _HTStream {
WWW_CONST HTStreamClass * isa;
-
+
FILE * fp;
char * fnam;
char * end_command;
@@ -121,7 +121,7 @@ PRIVATE void HTFWriter_write ARGS3(HTStream *, me, WWW_CONST char*, s, int, l)
if (me->write_error)
return;
- rv = fwrite(s, 1, l, me->fp);
+ rv = fwrite(s, 1, l, me->fp);
if (rv != l)
{
HTProgress ("Error writing to temporary file.");
@@ -194,7 +194,7 @@ PRIVATE void HTFWriter_free ARGS1(HTStream *, me)
free (cmd);
*/
/*ddt*/unlink(me->fnam);
-
+
HTProgress ("Insufficient temporary disk space; could not transfer data.");
free (me->fnam);
@@ -397,7 +397,7 @@ PRIVATE void HTFWriter_handle_interrupt ARGS1(HTStream *, me)
if (www2Trace)
fprintf (stderr, "*** HTFWriter interrupted; killed '%s'\n", me->fnam);
#endif
-
+
outtahere:
me->interrupted = 1;
@@ -409,14 +409,14 @@ PRIVATE void HTFWriter_handle_interrupt ARGS1(HTStream *, me)
** -----------------------
*/
PRIVATE WWW_CONST HTStreamClass HTFWriter = /* As opposed to print etc */
-{
+{
"FileWriter",
HTFWriter_free,
HTFWriter_end_document,
HTFWriter_put_character, HTFWriter_put_string,
HTFWriter_write,
HTFWriter_handle_interrupt
-};
+};
/* Take action using a system command
@@ -439,11 +439,11 @@ PUBLIC HTStream* HTSaveAndExecute ARGS5(
{
char *command;
WWW_CONST char * suffix;
-
+
HTStream* me;
me = (HTStream*)malloc(sizeof(*me));
- me->isa = &HTFWriter;
+ me->isa = &HTFWriter;
me->interrupted = 0;
me->write_error = 0;
me->fnam = NULL;
@@ -466,20 +466,20 @@ PUBLIC HTStream* HTSaveAndExecute ARGS5(
fprintf (stderr, "[HTSaveAndExecute] me->compressed is '%d'\n",
me->compressed);
#endif
-
+
/* Save the file under a suitably suffixed name */
-
+
if (!force_dump_to_file)
{
extern char *mo_tmpnam (char *);
suffix = HTFileSuffix(pres->rep);
-
+
me->fnam = mo_tmpnam(anchor->address);
- if (suffix)
+ if (suffix)
{
char *freeme = me->fnam;
-
+
me->fnam = (char *)malloc (strlen (me->fnam) + strlen (suffix) + 8);
strcpy(me->fnam, freeme);
strcat(me->fnam, suffix);
@@ -492,7 +492,7 @@ PUBLIC HTStream* HTSaveAndExecute ARGS5(
}
me->fp = fopen (me->fnam, "w");
- if (!me->fp)
+ if (!me->fp)
{
HTProgress("Can't open temporary file -- serious problem.");
me->write_error = 1;
@@ -515,15 +515,15 @@ PUBLIC HTStream* HTSaveAndExecute ARGS5(
strstr (pres->command, "mosaic-internal"))
{
/* Make command to process file */
- command = (char *)malloc
- ((strlen (pres->command) + 10 + 3*strlen(me->fnam)) *
+ command = (char *)malloc
+ ((strlen (pres->command) + 10 + 3*strlen(me->fnam)) *
sizeof (char));
-
+
/* Cute. pres->command will be something like "xv %s"; me->fnam
gets filled in as many times as appropriate. */
sprintf (command, pres->command, me->fnam, me->fnam, me->fnam);
-
- me->end_command = (char *)malloc
+
+ me->end_command = (char *)malloc
((strlen (command) + 32 + strlen(me->fnam)) * sizeof (char));
sprintf (me->end_command, "(%s ; /bin/rm -f %s) &",
command, me->fnam);
@@ -534,8 +534,8 @@ PUBLIC HTStream* HTSaveAndExecute ARGS5(
{
/* Make command to process file -- but we have to cat
to the viewer's stdin. */
- me->end_command = (char *)malloc
- ((strlen (pres->command) + 64 + (2 * strlen(me->fnam))) *
+ me->end_command = (char *)malloc
+ ((strlen (pres->command) + 64 + (2 * strlen(me->fnam))) *
sizeof (char));
sprintf (me->end_command, "((cat %s | %s); /bin/rm -f %s) &",
me->fnam, pres->command, me->fnam);
@@ -550,6 +550,6 @@ PUBLIC HTStream* HTSaveAndExecute ARGS5(
sprintf (me->end_command, "<%s \"%s\">\n", "mosaic-internal-reference", me->fnam);
}
}
-
+
return me;
}
diff --git a/libwww2/HTFWriter.h b/libwww2/HTFWriter.h
index 3e9b995..cb84ee7 100644
--- a/libwww2/HTFWriter.h
+++ b/libwww2/HTFWriter.h
@@ -1,9 +1,9 @@
/*
C FILE WRITER
-
+
It is useful to have both FWriter and Writer for environments in
which fdopen() doesn't exist for example.
-
+
*/
#ifndef HTFWRITE_H
#define HTFWRITE_H
diff --git a/libwww2/HTFile.c b/libwww2/HTFile.c
index 37e10dd..33e8a5b 100644
--- a/libwww2/HTFile.c
+++ b/libwww2/HTFile.c
@@ -159,7 +159,7 @@ PRIVATE char * vms_name(WWW_CONST char * nn, WWW_CONST char * fn)
/* We try converting the filename into Files-11 syntax. That is, we assume
** first that the file is, like us, on a VMS node. We try remote
** (or local) DECnet access. Files-11, VMS, VAX and DECnet
-** are trademarks of Digital Equipment Corporation.
+** are trademarks of Digital Equipment Corporation.
** The node is assumed to be local if the hostname WITHOUT DOMAIN
** matches the local one. @@@
*/
@@ -266,7 +266,7 @@ PUBLIC char * HTLocalName ARGS1(WWW_CONST char *,name)
HTUnEscape(path); /* Interpret % signs */
- if (0==strcmp(access, "file"))
+ if (0==strcmp(access, "file"))
{
free(access);
if (!host || !*host || (0==my_strcasecmp(host, HTHostName())) ||
@@ -275,7 +275,7 @@ PUBLIC char * HTLocalName ARGS1(WWW_CONST char *,name)
if (host)
free(host);
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "Node `%s' means path `%s'\n", name, path);
#endif
return(path);
@@ -288,7 +288,7 @@ PUBLIC char * HTLocalName ARGS1(WWW_CONST char *,name)
return NULL;
}
}
-
+
/* not file */
if (host)
free (host);
@@ -425,55 +425,55 @@ PUBLIC HTFormat HTFileFormat ARGS4 (
lf = strlen (filename);
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[HTFileFormat] Got hit on .gz; filename '%s'\n",
filename);
#endif
goto ok_ready;
}
- }
- }
-
+ }
+ }
+
ok_ready:
- if (!HTSuffixes)
+ if (!HTSuffixes)
HTFileInit();
*pencoding = NULL;
n = HTList_count(HTSuffixes);
- for(i=0; isuffix);
- if ((ls <= lf) && 0==my_strcasecmp(suff->suffix, filename + lf - ls))
+ if ((ls <= lf) && 0==my_strcasecmp(suff->suffix, filename + lf - ls))
{
int j;
*pencoding = suff->encoding;
- if (suff->rep)
+ if (suff->rep)
goto done;
-
- for(j=0; jsuffix);
- if ((ls <= lf) &&
- 0==my_strncasecmp(suff->suffix, filename + lf - ls -ls2, ls2))
- if (suff->rep)
+ if ((ls <= lf) &&
+ 0==my_strncasecmp(suff->suffix, filename + lf - ls -ls2, ls2))
+ if (suff->rep)
goto done;
}
}
}
-
+
suff = strchr(filename, '.') ? /* Unknown suffix */
( unknown_suffix.rep ? &unknown_suffix : &no_suffix)
: &no_suffix;
-
+
/* For now, assuming default is 8bit text/plain.
We also want default 8bit text/html for http connections. */
-
+
/* set default encoding unless found with suffix already */
if (!*pencoding) *pencoding = suff->encoding ? suff->encoding
: HTAtom_for("8bit");
@@ -541,7 +541,7 @@ char *HTDescribeURL (char *url)
}
}
got_subtype:
-
+
access = HTParse (url, "", PARSE_ACCESS);
if (strcmp (access, "http") == 0)
{
@@ -578,7 +578,7 @@ char *HTDescribeURL (char *url)
if (host[i] == ':')
host[i] = '\0';
#endif
-
+
if (st)
{
/* Uppercase type, to start sentence. */
@@ -588,15 +588,15 @@ char *HTDescribeURL (char *url)
st = &(st[2]);
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"DESCRIBE: in if (st); pasting together %s %s %s %s %s\n",
- t,
- (strcmp (t, "Application") == 0 ? " data" : ""),
+ t,
+ (strcmp (t, "Application") == 0 ? " data" : ""),
st, host, access);
#endif
- sprintf (line, "%s%s, type %s, on host %s, via %s.",
- t,
- (strcmp (t, "Application") == 0 ? " data" : ""),
+ sprintf (line, "%s%s, type %s, on host %s, via %s.",
+ t,
+ (strcmp (t, "Application") == 0 ? " data" : ""),
st, host, access);
#ifndef DISABLE_TRACE
if (www2Trace)
@@ -682,12 +682,12 @@ PUBLIC BOOL HTEditable ARGS1 (WWW_CONST char *,filename)
#ifdef NO_GROUPS
return NO; /* Safe answer till we find the correct algorithm */
#else
- gid_t groups[NGROUPS];
+ gid_t groups[NGROUPS];
uid_t myUid;
int ngroups; /* The number of groups */
struct stat fileStatus;
int i;
-
+
if (stat(filename, &fileStatus)) /* Get details of filename */
return NO; /* Can't even access file! */
@@ -698,7 +698,7 @@ PUBLIC BOOL HTEditable ARGS1 (WWW_CONST char *,filename)
#ifndef DISABLE_TRACE
if (www2Trace) {
int i;
- fprintf(stderr,
+ fprintf(stderr,
"File mode is 0%o, uid=%d, gid=%d. My uid=%d, %d groups (",
(unsigned int) fileStatus.st_mode, fileStatus.st_uid,
fileStatus.st_gid,
@@ -707,10 +707,10 @@ PUBLIC BOOL HTEditable ARGS1 (WWW_CONST char *,filename)
fprintf(stderr, ")\n");
}
#endif
-
+
if (fileStatus.st_mode & 0002) /* I can write anyway? */
return YES;
-
+
if ((fileStatus.st_mode & 0200) /* I can write my own file? */
&& (fileStatus.st_uid == myUid))
return YES;
@@ -752,7 +752,7 @@ PUBLIC void HTDirEntry ARGS3(HTStructured *, target,
PUTS(entry);
PUTS("");
}
-
+
/* Output parent directory entry
**
** This gives the TITLE and H1 header, and also a link
@@ -776,8 +776,8 @@ PUBLIC void HTDirTitles ARGS2(HTStructured *, target,
START(HTML_TITLE);
PUTS(*printable ? printable : "Welcome ");
PUTS(" directory");
- END(HTML_TITLE);
-
+ END(HTML_TITLE);
+
START(HTML_H1);
PUTS(*printable ? printable : "Welcome");
END(HTML_H1);
@@ -881,7 +881,7 @@ PUBLIC int HTLoadFile ARGS4 (
fd = open(ultrixname, O_RDONLY, 0);
if (fd<0) {
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
+ if (www2Trace) fprintf(stderr,
"HTFile: Can't open as %s\n", ultrixname);
#endif
}
@@ -1036,7 +1036,7 @@ forget_multi:
struct stat statbuf;
STRUCT_DIRENT * dp;
DIR *dfp;
-
+
int cmpr;
int count;
@@ -1119,7 +1119,7 @@ forget_multi:
/* We dont want to see . */
if(strcmp(dataptr,".") == 0) continue;
-
+
/* If its .. *and* the current directory is / dont show anything, otherwise
* print out a nice Parent Directory entry.
* */
@@ -1150,18 +1150,18 @@ forget_multi:
continue;
}
}
-
+
/* Get the filesize information from a stat, if we cant stat it, we probably */
/* cant read it either, so ignore it. */
sprintf(filepath,"%s/%s",localname, dataptr);
if(stat(filepath, &statbuf) == -1) continue;
-
+
HText_appendText(HT," ");
@@ -1229,9 +1229,9 @@ forget_multi:
free(localname);
return HT_LOADED;
} /* end if localname is directory */
-
+
} /* end if file stat worked */
-
+
/* End of directory reading section
*/
#endif
@@ -1259,7 +1259,7 @@ This is closed elsewhere...SWP
return HT_LOADED;
} /* If succesfull open */
} /* scope of fp */
- } /* local unix file system */
+ } /* local unix file system */
#endif
#endif
diff --git a/libwww2/HTFile.h b/libwww2/HTFile.h
index d87c063..31371b8 100644
--- a/libwww2/HTFile.h
+++ b/libwww2/HTFile.h
@@ -1,12 +1,12 @@
/* File access in libwww
FILE ACCESS
-
+
These are routines for local file access used by WWW browsers and
servers. Implemented by HTFile.c.
-
+
If the file is not a local file, then we pass it on to HTFTP in
case it can be reached by FTP.
-
+
*/
#ifndef HTFILE_H
#define HTFILE_H
@@ -24,7 +24,7 @@ Controlling globals
These flags control how directories and files are represented as
hypertext, and are typically set by the application from command
line options, etc.
-
+
*/
extern int HTDirAccess; /* Directory access level */
@@ -75,7 +75,7 @@ Output directory titles
This is (like the next one) used by HTFTP. It is common code to
generate the title and heading 1 and the parent directory link for
any anchor.
-
+
*/
extern void HTDirTitles PARAMS((
HTStructured * target,
@@ -87,7 +87,7 @@ Output a directory entry
This is used by HTFTP.c for example -- it is a common routine for
generating a linked directory entry.
-
+
*/
extern void HTDirEntry PARAMS((
HTStructured * target, /* in which to put the linked text */
@@ -100,18 +100,18 @@ HTSetSuffix: Define the representation for a file suffix
This defines a mapping between local file suffixes and file content
types and encodings.
-
+
ON ENTRY,
-
+
suffix includes the "." if that is important (normally, yes!)
-
+
representation is MIME-style content-type
-
+
encoding is MIME-style content-transfer-encoding (8bit, 7bit, etc)
-
+
quality an a priori judgement of the quality of such files
(0.0..1.0)
-
+
*/
/* Example: HTSetSuffix(".ps", "application/postscript", "8bit", 1.0);
**
@@ -122,18 +122,18 @@ extern void HTSetSuffix PARAMS((
WWW_CONST char * representation,
WWW_CONST char * encoding,
float quality));
-
+
/*
HTFileFormat: Get Representation and Encoding from file name
ON EXIT,
-
+
return The represntation it imagines the file is in
-
+
*pEncoding The encoding (binary, 7bit, etc). See HTSetSuffix.
-
+
*/
#define COMPRESSED_NOT 0
@@ -166,17 +166,17 @@ extern float HTFileValue PARAMS((
Determine write access to a file
ON EXIT,
-
+
return value YES if file can be accessed and can be written to.
-
+
*/
/*
BUGS
-
+
Isn't there a quicker way?
-
+
*/
@@ -188,14 +188,14 @@ extern BOOL HTEditable PARAMS((WWW_CONST char * filename));
Determine a suitable suffix, given the representation
ON ENTRY,
-
+
rep is the atomized MIME style representation
-
+
ON EXIT,
-
+
returns a pointer to a suitable suffix string if one has been found,
else NULL.
-
+
*/
extern WWW_CONST char * HTFileSuffix PARAMS((
HTAtom* rep));
diff --git a/libwww2/HTFormat.c b/libwww2/HTFormat.c
index e023389..9d2f90f 100644
--- a/libwww2/HTFormat.c
+++ b/libwww2/HTFormat.c
@@ -66,12 +66,12 @@ PUBLIC void HTSetPresentation ARGS5(
WWW_CONST char *, representation,
WWW_CONST char *, command,
float, quality,
- float, secs,
+ float, secs,
float, secs_per_byte
){
HTPresentation * pres = (HTPresentation *)malloc(sizeof(HTPresentation));
-
+
pres->rep = HTAtom_for(representation);
pres->rep_out = WWW_PRESENT; /* Fixed for now ... :-) */
pres->converter = HTSaveAndExecute; /* Fixed for now ... */
@@ -81,9 +81,9 @@ PUBLIC void HTSetPresentation ARGS5(
pres->rep = HTAtom_for(representation);
pres->command = 0;
StrAllocCopy(pres->command, command);
-
+
if (!HTPresentations) HTPresentations = HTList_new();
-
+
if (strcmp(representation, "*")==0) {
if (default_presentation) free(default_presentation);
default_presentation = pres;
@@ -101,12 +101,12 @@ PUBLIC void HTSetConversion ARGS6(
WWW_CONST char *, representation_out,
HTConverter*, converter,
float, quality,
- float, secs,
+ float, secs,
float, secs_per_byte
){
HTPresentation * pres = (HTPresentation *)malloc(sizeof(HTPresentation));
-
+
pres->rep = HTAtom_for(representation_in);
pres->rep_out = HTAtom_for(representation_out);
pres->converter = converter;
@@ -115,9 +115,9 @@ PUBLIC void HTSetConversion ARGS6(
pres->secs = secs;
pres->secs_per_byte = secs_per_byte;
pres->command = 0;
-
+
if (!HTPresentations) HTPresentations = HTList_new();
-
+
if (strcmp(representation_in, "*")==0) {
if (default_presentation) free(default_presentation);
default_presentation = pres;
@@ -137,7 +137,7 @@ PUBLIC void HTRemoveConversion ARGS3(
WWW_CONST char *, representation_out,
HTConverter*, converter
){
-int numberOfPresentations;
+int numberOfPresentations;
HTPresentation * pres;
HTAtom *rep_in, *rep_out;
int x;
@@ -157,7 +157,7 @@ int x;
HTList_removeObject(HTPresentations,pres);
}
}
-
+
}
}
@@ -196,15 +196,15 @@ PUBLIC char HTGetCharacter NOARGS
{
char ch;
interrupted_in_htgetcharacter = 0;
- do
+ do
{
- if (input_pointer >= input_limit)
+ if (input_pointer >= input_limit)
{
- int status =
+ int status =
NETREAD(input_file_number, input_buffer, INPUT_BUFFER_SIZE);
- if (status <= 0)
+ if (status <= 0)
{
- if (status == 0)
+ if (status == 0)
return (char)EOF;
if (status == HT_INTERRUPTED)
{
@@ -216,7 +216,7 @@ PUBLIC char HTGetCharacter NOARGS
return (char)EOF;
}
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr,
"HTFormat: File read error %d\n", status);
#endif
@@ -228,7 +228,7 @@ PUBLIC char HTGetCharacter NOARGS
ch = *input_pointer++;
}
while (ch == (char) 13); /* Ignore ASCII carriage return */
-
+
return ch;
}
@@ -237,12 +237,12 @@ PUBLIC char HTGetCharacter NOARGS
PUBLIC int HTOutputBinary ARGS2( int, input,
FILE *, output)
{
- do
+ do
{
int status = NETREAD(input, input_buffer, INPUT_BUFFER_SIZE);
- if (status <= 0)
+ if (status <= 0)
{
- if (status == 0)
+ if (status == 0)
return 0;
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr,
@@ -267,7 +267,7 @@ static int partial_wildcard_matches (HTFormat r1, HTFormat r2)
if (!s1 || !s2)
return 0;
-
+
s1 = strdup (s1);
s2 = strdup (s2);
@@ -284,7 +284,7 @@ static int partial_wildcard_matches (HTFormat r1, HTFormat r2)
done1:
if (!subtype1)
goto nope;
-
+
/* Bail if we don't have a wildcard possibility. */
if (subtype1[0] != '*')
goto nope;
@@ -319,7 +319,7 @@ static int partial_wildcard_matches (HTFormat r1, HTFormat r2)
free (s2);
return 0;
}
-
+
/* Create a filter stack
** ---------------------
@@ -344,10 +344,10 @@ PUBLIC HTStream * HTStreamStack ARGS5(
extern int force_dump_to_file;
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr,
"[HTStreamStack] Constructing stream stack for %s to %s\n",
- HTAtom_name(format_in),
+ HTAtom_name(format_in),
HTAtom_name(rep_out));
#endif
#ifndef DISABLE_TRACE
@@ -355,9 +355,9 @@ PUBLIC HTStream * HTStreamStack ARGS5(
fprintf (stderr,
" Compressed is %d\n", compressed);
#endif
-
+
if (rep_out == WWW_SOURCE ||
- rep_out == format_in)
+ rep_out == format_in)
{
#ifndef DISABLE_TRACE
if (www2Trace)
@@ -366,20 +366,20 @@ PUBLIC HTStream * HTStreamStack ARGS5(
#endif
return sink;
}
-
- if (!HTPresentations)
+
+ if (!HTPresentations)
HTFormatInit(); /* set up the list */
-
+
if (force_dump_to_file && format_in != WWW_MIME)
{
return HTSaveAndExecute (NULL, anchor, sink, format_in, compressed);
}
-
+
{
int n = HTList_count(HTPresentations);
int i;
HTPresentation * pres;
- for(i=0; iconverter)(pres, anchor, sink, format_in, compressed);
}
- if (pres->rep_out == wildcard)
+ if (pres->rep_out == wildcard)
{
#ifndef DISABLE_TRACE
if (www2Trace)
@@ -435,10 +435,10 @@ PUBLIC HTStream * HTStreamStack ARGS5(
fprintf (stderr, "[HTStreamStack] Returning NULL at bottom.\n");
}
#endif
-
+
return NULL;
}
-
+
/* Find the cost of a filter stack
** -------------------------------
@@ -462,12 +462,12 @@ PUBLIC float HTStackValue ARGS4(
HTAtom_name(format_in), initial_value,
HTAtom_name(rep_out));
#endif
-
+
if (rep_out == WWW_SOURCE ||
rep_out == format_in) return 0.0;
if (!HTPresentations) HTFormatInit(); /* set up the list */
-
+
{
int n = HTList_count(HTPresentations);
int i;
@@ -485,11 +485,11 @@ PUBLIC float HTStackValue ARGS4(
}
}
}
-
+
return -1e30; /* Really bad */
}
-
+
/* Push data from a socket down a stream
** -------------------------------------
@@ -509,7 +509,7 @@ PUBLIC int HTCopy ARGS3(int, file_number,
HTStream*, sink,
int, bytes_already_read)
{
- HTStreamClass targetClass;
+ HTStreamClass targetClass;
char line[256];
char *msg;
int bytes = bytes_already_read;
@@ -527,11 +527,11 @@ PUBLIC int HTCopy ARGS3(int, file_number,
**
*/
targetClass = *(sink->isa); /* Copy pointers to procedures */
-
+
hdr_len = HTMIME_get_header_length(sink);
/* Push binary from socket down sink */
- for(;;)
+ for(;;)
{
int status, intr;
@@ -557,13 +557,13 @@ PUBLIC int HTCopy ARGS3(int, file_number,
rv = -1;
goto ready_to_leave;
}
-
+
if(loading_length == -1) {
left = -1;
status = NETREAD(file_number, input_buffer, INPUT_BUFFER_SIZE);
} else {
left = (loading_length+hdr_len)-total_read;
- if(left>0) status = NETREAD(file_number, input_buffer,
+ if(left>0) status = NETREAD(file_number, input_buffer,
(left>INPUT_BUFFER_SIZE?
INPUT_BUFFER_SIZE:left));
else status=0;
@@ -571,17 +571,17 @@ PUBLIC int HTCopy ARGS3(int, file_number,
if (status > 0)
total_read += status;
-
+
/* fprintf(stderr,"ll = %d status = %d left = %d hdr = %d tr = %d\n",
loading_length,status,left,hdr_len,total_read);
- */
+ */
/*
status = NETREAD(file_number, input_buffer, INPUT_BUFFER_SIZE);
*/
- if (status <= 0)
+ if (status <= 0)
{
- if (status == 0)
+ if (status == 0)
break;
if (status == HT_INTERRUPTED)
{
@@ -625,14 +625,14 @@ PUBLIC int HTCopy ARGS3(int, file_number,
/* moved msg stuff here as loading_length may change midstream -bjs*/
if (loading_length == -1){
- msg = (loading_inlined_images ?
- "Read %d bytes of inlined image data." :
+ msg = (loading_inlined_images ?
+ "Read %d bytes of inlined image data." :
"Read %d bytes of data.");
sprintf (line, msg, bytes);
/* HTMeter(0,NULL);*/
}else{
- msg = (loading_inlined_images ?
- "Read %d of %d bytes of inlined image data." :
+ msg = (loading_inlined_images ?
+ "Read %d of %d bytes of inlined image data." :
"Read %d of %d bytes of data.");
sprintf (line, msg, bytes, loading_length+hdr_len);
HTMeter((bytes*100)/(loading_length+hdr_len),NULL);
@@ -643,10 +643,10 @@ PUBLIC int HTCopy ARGS3(int, file_number,
break;
}
} /* next bufferload */
-
+
/*
HTProgress (loading_inlined_images ?
- "Data transfer complete." : "Data transfer complete.");
+ "Data transfer complete." : "Data transfer complete.");
*/
HTProgress("Data transfer complete.");
noLength=0;
@@ -682,10 +682,10 @@ PUBLIC void HTFileCopy ARGS2(
FILE *, fp,
HTStream*, sink)
{
- HTStreamClass targetClass;
-
+ HTStreamClass targetClass;
+
targetClass = *(sink->isa); /* Copy pointers to procedures */
-
+
for(;;) {
int status = fread(input_buffer, 1, INPUT_BUFFER_SIZE, fp);
if (status == 0) { /* EOF or error */
@@ -708,10 +708,10 @@ PUBLIC void HTFileCopyToText ARGS2(
FILE *, fp,
HText *, text)
{
- for(;;)
+ for(;;)
{
int status = fread(input_buffer, 1, INPUT_BUFFER_SIZE, fp);
- if (status == 0)
+ if (status == 0)
{ /* EOF or error */
if (ferror(fp) == 0) break;
#ifndef DISABLE_TRACE
@@ -722,7 +722,7 @@ PUBLIC void HTFileCopyToText ARGS2(
}
HText_appendBlock (text, input_buffer, status);
} /* next bufferload */
-
+
fclose (fp);
return;
}
@@ -747,15 +747,15 @@ PUBLIC int HTParseSocket ARGS6(
int, compressed)
{
HTStream * stream;
- HTStreamClass targetClass;
+ HTStreamClass targetClass;
int rv;
-
+
stream = HTStreamStack(format_in,
format_out,
compressed,
sink, anchor);
-
- if (!stream)
+
+ if (!stream)
{
char buffer[1024]; /* @@@@@@@@ */
sprintf(buffer, "Sorry, can't convert from %s to %s.",
@@ -765,7 +765,7 @@ PUBLIC int HTParseSocket ARGS6(
#endif
return HTLoadError(sink, 501, buffer);
}
-
+
targetClass = *(stream->isa); /* Copy pointers to procedures */
rv = HTCopy(file_number, stream, 0);
if (rv == -1)
@@ -784,7 +784,7 @@ PUBLIC int HTParseSocket ARGS6(
NETCLOSE (file_number);
(*targetClass.free)(stream);
-
+
return HT_LOADED;
}
@@ -809,13 +809,13 @@ PUBLIC int HTParseFile ARGS6(
int, compressed)
{
HTStream * stream;
- HTStreamClass targetClass;
-
+ HTStreamClass targetClass;
+
stream = HTStreamStack(format_in,
format_out,
compressed,
sink , anchor);
-
+
if (!stream) {
char buffer[1024]; /* @@@@@@@@ */
sprintf(buffer, "Sorry, can't convert from %s to %s.",
@@ -825,11 +825,11 @@ PUBLIC int HTParseFile ARGS6(
#endif
return HTLoadError(sink, 501, buffer);
}
-
+
targetClass = *(stream->isa); /* Copy pointers to procedures */
HTFileCopy(fp, stream);
(*targetClass.end_document)(stream);
(*targetClass.free)(stream);
-
+
return HT_LOADED;
}
diff --git a/libwww2/HTFormat.h b/libwww2/HTFormat.h
index fc0ae1e..4a56585 100644
--- a/libwww2/HTFormat.h
+++ b/libwww2/HTFormat.h
@@ -1,13 +1,13 @@
/* HTFormat: The format manager in the WWW Library
MANAGE DIFFERENT DOCUMENT FORMATS
-
+
Here we describe the functions of the HTFormat module which handles conversion between
different data representations. (In MIME parlance, a representation is known as a
content-type. In WWW the term "format" is often used as it is shorter).
-
+
This module is implemented by HTFormat.c . This hypertext document is used to generate
the HTFormat.h inlude file. Part of the WWW library.
-
+
Preamble
*/
@@ -30,18 +30,18 @@ The HTFormat type
We use the HTAtom object for holding representations. This allows faster manipulation
(comparison and copying) that if we stayed with strings.
-
+
*/
typedef HTAtom * HTFormat;
-
+
/*
These macros (which used to be constants) define some basic internally referenced
representations. The www/xxx ones are of course not MIME standard.
-
+
www/source is an output format which leaves the input untouched. It is useful for
diagnostics, and for users who want to see the original, whatever it is.
-
+
*/
/* Internal ones */
#define WWW_SOURCE HTAtom_for("www/source") /* Whatever it was originally*/
@@ -50,7 +50,7 @@ typedef HTAtom * HTFormat;
www/present represents the user's perception of the document. If you convert to
www/present, you present the material to the user.
-
+
*/
#define WWW_PRESENT HTAtom_for("www/present") /* The user's perception */
@@ -58,13 +58,13 @@ typedef HTAtom * HTFormat;
The message/rfc822 format means a MIME message or a plain text message with no MIME
header. This is what is returned by an HTTP server.
-
+
*/
#define WWW_MIME HTAtom_for("www/mime") /* A MIME message */
/*
www/print is like www/present except it represents a printed copy.
-
+
*/
#define WWW_PRINT HTAtom_for("www/print") /* A printed copy */
@@ -78,21 +78,21 @@ typedef HTAtom * HTFormat;
We must include the following file after defining HTFormat, to which it makes
reference.
-
+
The HTEncoding type
-
+
typedef HTAtom* HTEncoding;
-
+
The following are values for the MIME types:
-
+
#define WWW_ENC_7BIT
-
+
#define WWW_ENC_8BIT
-
+
#define WWW_ENC_BINARY
-
+
We also add
-
+
*/
#include "HTAnchor.h"
@@ -106,7 +106,7 @@ The HTPresentation and HTConverter types
which data should be fed. See also HTStreamStack which scans the
list of registered converters and calls one. See the initialisation
module for a list of conversion routines.
-
+
*/
typedef struct _HTPresentation HTPresentation;
@@ -116,7 +116,7 @@ typedef HTStream * HTConverter PARAMS((
HTStream * sink,
HTFormat format_in,
int compressed));
-
+
struct _HTPresentation {
HTAtom* rep; /* representation name atmoized */
HTAtom* rep_out; /* resulting representation */
@@ -131,7 +131,7 @@ struct _HTPresentation {
The list of presentations is kept by this module. It is also scanned by modules which
want to know the set of formats supported. for example.
-
+
*/
extern HTList * HTPresentations;
@@ -140,17 +140,17 @@ extern HTList * HTPresentations;
HTSetPresentation: Register a system command to present a format
ON ENTRY,
-
+
rep is the MIME - style format name
-
+
command is the MAILCAP - style command template
-
+
quality A degradation faction 0..1
-
+
maxbytes A limit on the length acceptable as input (0 infinite)
-
+
maxsecs A limit on the time user will wait (0 for infinity)
-
+
*/
extern void HTSetPresentation PARAMS((
WWW_CONST char * representation,
@@ -166,13 +166,13 @@ extern void HTSetPresentation PARAMS((
HTSetConversion: Register a converstion routine
ON ENTRY,
-
+
rep_in is the content-type input
-
+
rep_out is the resulting content-type
-
+
converter is the routine to make the stream to do it
-
+
*/
extern void HTSetConversion PARAMS((
@@ -196,7 +196,7 @@ HTStreamStack: Create a stack of streams
and returns a stream into which the data in the input format should
be fed. The anchor is passed because hypertxet objects load
information into the anchor object which represents them.
-
+
*/
extern HTStream * HTStreamStack PARAMS((
HTFormat format_in,
@@ -210,18 +210,18 @@ extern HTStream * HTStreamStack PARAMS((
HTStackValue: Find the cost of a filter stack
Must return the cost of the same stack which HTStreamStack would set up.
-
+
ON ENTRY,
-
+
format_in The fomat of the data to be converted
-
+
format_out The format required
-
+
initial_value The intrinsic "value" of the data before conversion on a scale
from 0 to 1
-
+
length The number of bytes expected in the input format
-
+
*/
extern float HTStackValue PARAMS((
HTFormat format_in,
@@ -237,14 +237,14 @@ HTCopy: Copy a socket to a stream
This is used by the protocol engines to send data down a stream,
typically one which has been generated by HTStreamStack.
-
+
*/
extern int HTCopy PARAMS((
int file_number,
HTStream* sink,
int bytes_already_read));
-
+
/*
HTFileCopy: Copy a file to a stream
@@ -252,7 +252,7 @@ HTFileCopy: Copy a file to a stream
This is used by the protocol engines to send data down a stream,
typically one which has been generated by HTStreamStack. It is
currently called by HTParseFile
-
+
*/
extern void HTFileCopy PARAMS((
FILE* fp,
@@ -262,7 +262,7 @@ extern void HTFileCopyToText PARAMS((
FILE* fp,
HText* text));
#endif
-
+
/*
Clear input buffer and set file number
@@ -270,7 +270,7 @@ Clear input buffer and set file number
This routine and the one below provide simple character input from sockets. (They are
left over from the older architecure and may not be used very much.) The existence of
a common routine and buffer saves memory space in small implementations.
-
+
*/
extern void HTInitInput PARAMS((int file_number));
@@ -289,7 +289,7 @@ HTParseSocket: Parse a socket given its format
This routine is called by protocol modules to load an object. uses
HTStreamStack and the copy routines above. Returns HT_LOADED if
succesful, <0 if not.
-
+
*/
extern int HTParseSocket PARAMS((
HTFormat format_in,
@@ -306,7 +306,7 @@ HTParseFile: Parse a File through a file pointer
This routine is called by protocols modules to load an object. uses
HTStreamStack and HTFileCopy . Returns HT_LOADED if succesful, <0
if not.
-
+
*/
extern int HTParseFile PARAMS((
HTFormat format_in,
diff --git a/libwww2/HTGopher.c b/libwww2/HTGopher.c
index 9907356..4366b38 100644
--- a/libwww2/HTGopher.c
+++ b/libwww2/HTGopher.c
@@ -173,7 +173,7 @@ PRIVATE int parse_menu ARGS2 (
PUTS("Gopher Menu
\n");
START(HTML_DL);
- while ((ch=HTGetCharacter ()) != (char)EOF)
+ while ((ch=HTGetCharacter ()) != (char)EOF)
{
if (interrupted_in_htgetcharacter)
{
@@ -184,45 +184,45 @@ PRIVATE int parse_menu ARGS2 (
(*targetClass.handle_interrupt)(target);
return HT_INTERRUPTED;
}
- if (ch != LF)
+ if (ch != LF)
{
*p = ch; /* Put character in line */
if (p< &line[BIG-1]) p++;
- }
- else
+ }
+ else
{
*p++ = 0; /* Terminate line */
p = line; /* Scan it to parse it */
port = 0; /* Flag "not parsed" */
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTGopher: Menu item: %s\n", line);
#endif
gtype = *p++;
-
+
/* Break on line with a dot by itself */
- if ((gtype=='.') && ((*p=='\r') || (*p==0)))
+ if ((gtype=='.') && ((*p=='\r') || (*p==0)))
break;
-
- if (gtype && *p)
+
+ if (gtype && *p)
{
name = p;
selector = strchr(name, TAB);
START(HTML_DD);
- if (selector)
+ if (selector)
{
*selector++ = 0; /* Terminate name */
host = strchr(selector, TAB);
- if (host)
+ if (host)
{
*host++ = 0; /* Terminate selector */
port = strchr(host, TAB);
- if (port)
+ if (port)
{
char *junk;
port[0] = ':'; /* delimit host a la W3 */
junk = strchr(port, TAB);
- if (junk)
+ if (junk)
*junk++ = 0; /* Chop port */
if ((port[1]=='0') && (!port[2]))
port[0] = 0; /* 0 means none */
@@ -230,39 +230,39 @@ PRIVATE int parse_menu ARGS2 (
} /* host ok */
} /* selector ok */
} /* gtype and name ok */
-
- if (gtype == GOPHER_WWW)
+
+ if (gtype == GOPHER_WWW)
{ /* Gopher pointer to W3 */
write_anchor(name, selector, "internal-gopher-text");
- }
- else if (port)
+ }
+ else if (port)
{ /* Other types need port */
- if (gtype == GOPHER_TELNET)
+ if (gtype == GOPHER_TELNET)
{
- if (*selector)
+ if (*selector)
sprintf(address, "telnet://%s@%s/",
selector, host);
- else
+ else
sprintf(address, "telnet://%s/", host);
- }
- else if (gtype == GOPHER_TN3270)
+ }
+ else if (gtype == GOPHER_TN3270)
{
- if (*selector)
+ if (*selector)
sprintf(address, "tn3270://%s@%s/",
selector, host);
- else
+ else
sprintf(address, "tn3270://%s/", host);
}
- else
+ else
{ /* If parsed ok */
char *q;
unsigned char *p;
sprintf(address, "//%s/%c", host, gtype);
q = address+ strlen(address);
- for(p=(unsigned char *)selector; *p; p++)
+ for(p=(unsigned char *)selector; *p; p++)
{ /* Encode selector string */
if (acceptable[*p]) *q++ = *p;
- else
+ else
{
*q++ = HEX_ESCAPE; /* Means hex coming */
*q++ = hex[(*p) >> 4];
@@ -325,8 +325,8 @@ PRIVATE int parse_menu ARGS2 (
/* Good error handling??? */
PUTS(line);
}
- }
- else
+ }
+ else
{ /* parse error */
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr,
@@ -346,13 +346,13 @@ PRIVATE int parse_menu ARGS2 (
(*targetClass.handle_interrupt)(target);
return HT_INTERRUPTED;
}
-
+
END(HTML_DL);
END_TARGET;
FREE_TARGET;
HTProgress ("Retrieved Gopher menu.");
-
+
return 1;
}
@@ -414,7 +414,7 @@ PRIVATE int parse_cso ARGS2 (WWW_CONST char *, arg,
PUTS("CSO Search Results
\n");
/* start grabbing chars from the network */
- while ((ch=HTGetCharacter ()) != (char)EOF)
+ while ((ch=HTGetCharacter ()) != (char)EOF)
{
if (interrupted_in_htgetcharacter)
{
@@ -425,25 +425,25 @@ PRIVATE int parse_cso ARGS2 (WWW_CONST char *, arg,
(*targetClass.handle_interrupt)(target);
return HT_INTERRUPTED;
}
- if (ch != '\n')
+ if (ch != '\n')
{
*p = ch; /* Put character in line */
if (p< &line[BIG-1]) p++;
- }
- else
+ }
+ else
{
*p++ = 0; /* Terminate line */
p = line; /* Scan it to parse it */
/* OK we now have a line in 'p' lets parse it and print it */
-
+
/* Break on line that begins with a 2. It's the end of
* data.
*/
if (*p == '2')
break;
- /* lines beginning with 5 are errors,
+ /* lines beginning with 5 are errors,
* print them and quit
*/
if (*p == '5') {
@@ -455,11 +455,11 @@ PRIVATE int parse_cso ARGS2 (WWW_CONST char *, arg,
if(*p == '-') {
/* data lines look like -200:#:
- * where # is the search result number and can be multiple
+ * where # is the search result number and can be multiple
* digits (infinate?)
* find the second colon and check the digit to the
* left of it to see if they are diferent
- * if they are then a different person is starting.
+ * if they are then a different person is starting.
* make this line an
*/
@@ -504,7 +504,7 @@ PRIVATE int parse_cso ARGS2 (WWW_CONST char *, arg,
} /* end if second_colon */
} /* end if *p == '-' */
} /* if end of line */
-
+
} /* Loop over characters */
if (interrupted_in_htgetcharacter)
{
@@ -515,7 +515,7 @@ PRIVATE int parse_cso ARGS2 (WWW_CONST char *, arg,
(*targetClass.handle_interrupt)(target);
return HT_INTERRUPTED;
}
-
+
/* end the text block */
PUTS("\n");
END_TARGET;
@@ -544,7 +544,7 @@ PRIVATE void de_escape ARGS2(char *, command, WWW_CONST char *, selector)
p = strdup (selector);
HTUnEscape (p);
-
+
strcpy (command, p);
free (p);
@@ -576,33 +576,33 @@ PUBLIC int HTLoadGopher ARGS4(
char gtype; /* Gopher Node type */
char * selector; /* Selector string */
int rv = 0;
-
+
if (!acceptable_inited) init_acceptable();
-
- if (!arg)
+
+ if (!arg)
return -3; /* Bad if no name sepcified */
- if (!*arg)
+ if (!*arg)
return -2; /* Bad if name had zero length */
-
+
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "HTGopher: Looking for %s\n", arg);
#endif
-
+
/* Get entity type, and selector string.
- */
+ */
{
char * p1 = HTParse(arg, "", PARSE_PATH|PARSE_PUNCTUATION);
gtype = '1'; /* Default = menu */
selector = p1;
- if ((*selector++=='/') && (*selector))
+ if ((*selector++=='/') && (*selector))
{ /* Skip first slash */
gtype = *selector++; /* Pick up gtype */
}
- if (gtype == GOPHER_INDEX)
+ if (gtype == GOPHER_INDEX)
{
char * query;
query = strchr(selector, '?'); /* Look for search string */
- if (!query || !query[1])
+ if (!query || !query[1])
{ /* No search required */
target = HTML_new(anAnchor, format_out, sink);
targetClass = *target->isa;
@@ -612,17 +612,17 @@ PUBLIC int HTLoadGopher ARGS4(
*query++ = 0; /* Skip '?' */
HTUnEscape (query);
command = malloc(strlen(selector)+ 1 + strlen(query)+ 2 + 1);
-
+
de_escape(command, selector);
-
+
strcat(command, "\t");
strcat(command, query);
- }
- else if (gtype == GOPHER_CSO)
+ }
+ else if (gtype == GOPHER_CSO)
{
char * query;
query = strchr(selector, '?'); /* Look for search string */
- if (!query || !query[1])
+ if (!query || !query[1])
{ /* No search required */
target = HTML_new(anAnchor, format_out, sink);
targetClass = *target->isa;
@@ -632,20 +632,20 @@ PUBLIC int HTLoadGopher ARGS4(
*query++ = 0; /* Skip '?' */
HTUnEscape (query);
command = malloc(strlen("query")+ 1 + strlen(query)+ 2 + 1);
-
+
de_escape(command, selector);
-
+
strcpy(command, "query ");
strcat(command, query);
- }
- else
+ }
+ else
{ /* Not index */
command = malloc(strlen(selector)+2+1);
de_escape(command, selector);
}
free(p1);
}
-
+
/* Patch security hole. */
{
char *tmp;
@@ -680,24 +680,24 @@ PUBLIC int HTLoadGopher ARGS4(
if (status<0)
{
#ifndef DISABLE_TRACE
- if (www2Trace)
- fprintf(stderr,
+ if (www2Trace)
+ fprintf(stderr,
"HTTPAccess: Unable to connect to remote host for `%s'.\n",
arg);
#endif
free(command);
return HT_NOT_LOADED;
}
-
+
HTInitInput(s); /* Set up input buffering */
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
- fprintf(stderr,
- "HTGopher: Connected, writing command `%s' to socket %d\n",
+ if (www2Trace)
+ fprintf(stderr,
+ "HTGopher: Connected, writing command `%s' to socket %d\n",
command, s);
#endif
-
+
status = NETWRITE(s, command, (int)strlen(command));
free(command);
if (status<0)
@@ -708,14 +708,14 @@ PUBLIC int HTLoadGopher ARGS4(
NETCLOSE (s);
return HT_NOT_LOADED;
}
-
- /* Now read the data from the socket: */
- switch (gtype)
+
+ /* Now read the data from the socket: */
+ switch (gtype)
{
int compressed;
HTAtom *enc;
extern int tweak_gopher_types;
-
+
case GOPHER_MENU:
case GOPHER_INDEX:
target = HTML_new(anAnchor, format_out, sink);
@@ -728,7 +728,7 @@ PUBLIC int HTLoadGopher ARGS4(
targetClass = *target->isa;
rv = parse_cso(arg, anAnchor);
break;
-
+
case GOPHER_MACBINHEX:
case GOPHER_PCBINHEX:
case GOPHER_UUENCODED:
@@ -744,10 +744,10 @@ PUBLIC int HTLoadGopher ARGS4(
case GOPHER_IMAGE:
case GOPHER_PLUS_IMAGE:
if (!tweak_gopher_types)
- rv = HTParseSocket(HTAtom_for ("image/gif"),
+ rv = HTParseSocket(HTAtom_for ("image/gif"),
format_out, anAnchor, s, sink, 0);
else
- rv = HTParseSocket(HTFileFormat (arg, &enc, HTAtom_for ("image/gif"),
+ rv = HTParseSocket(HTFileFormat (arg, &enc, HTAtom_for ("image/gif"),
&compressed),
format_out, anAnchor, s, sink, 0);
break;
@@ -755,11 +755,11 @@ PUBLIC int HTLoadGopher ARGS4(
case GOPHER_SOUND:
case GOPHER_PLUS_SOUND:
if (!tweak_gopher_types)
- rv = HTParseSocket(HTAtom_for ("audio/basic"),
+ rv = HTParseSocket(HTAtom_for ("audio/basic"),
format_out, anAnchor, s, sink, 0);
else
- rv = HTParseSocket(HTFileFormat (arg, &enc,
- HTAtom_for ("audio/basic"),
+ rv = HTParseSocket(HTFileFormat (arg, &enc,
+ HTAtom_for ("audio/basic"),
&compressed),
format_out, anAnchor, s, sink, 0);
break;
@@ -767,11 +767,11 @@ PUBLIC int HTLoadGopher ARGS4(
case GOPHER_PLUS_MOVIE:
/* Sigh..... */
if (!tweak_gopher_types)
- rv = HTParseSocket(HTAtom_for ("video/mpeg"),
+ rv = HTParseSocket(HTAtom_for ("video/mpeg"),
format_out, anAnchor, s, sink, 0);
else
- rv = HTParseSocket(HTFileFormat (arg, &enc,
- HTAtom_for ("video/mpeg"),
+ rv = HTParseSocket(HTFileFormat (arg, &enc,
+ HTAtom_for ("video/mpeg"),
&compressed),
format_out, anAnchor, s, sink, 0);
break;
@@ -783,7 +783,7 @@ PUBLIC int HTLoadGopher ARGS4(
rv = HTParseSocket(HTFileFormat (arg, &enc, WWW_HTML, &compressed),
format_out, anAnchor, s, sink, 0);
break;
-
+
case GOPHER_TEXT:
default: /* @@ parse as plain text */
if (!tweak_gopher_types)
@@ -794,7 +794,7 @@ PUBLIC int HTLoadGopher ARGS4(
format_out, anAnchor, s, sink, 0);
break;
} /* switch(gtype) */
-
+
NETCLOSE(s);
if (rv == HT_INTERRUPTED)
{
diff --git a/libwww2/HTGroup.c b/libwww2/HTGroup.c
index a75c2f3..5970b54 100644
--- a/libwww2/HTGroup.c
+++ b/libwww2/HTGroup.c
@@ -71,7 +71,7 @@ typedef struct {
GroupDef * translation;
} Ref;
-
+
PRIVATE void syntax_error ARGS3(FILE *, fp,
char *, msg,
@@ -118,7 +118,7 @@ PRIVATE AddressDefList *parse_address_part ARGS1(FILE *, fp)
ref->name = NULL;
ref->translation = NULL;
StrAllocCopy(ref->name, lex_buffer);
-
+
HTList_addObject(address_def_list, (void*)ref);
if (only_one || (lex_item = lex(fp)) != LEX_ITEM_SEP)
@@ -172,7 +172,7 @@ PRIVATE UserDefList *parse_user_part ARGS1(FILE *, fp)
StrAllocCopy(ref->name, lex_buffer);
HTList_addObject(user_def_list, (void*)ref);
-
+
if (only_one || (lex_item = lex(fp)) != LEX_ITEM_SEP)
break;
/*
@@ -287,9 +287,9 @@ PUBLIC GroupDef *HTAA_parseGroupDef ARGS1(FILE *, fp)
if ((lex_item = lex(fp)) != LEX_REC_SEP) {
syntax_error(fp, "Garbage after group definition", lex_item);
}
-
+
return group_def;
-}
+}
PRIVATE GroupDef *parse_group_decl ARGS1(FILE *, fp)
@@ -323,7 +323,7 @@ PRIVATE GroupDef *parse_group_decl ARGS1(FILE *, fp)
return group_def;
}
-
+
/*
@@ -379,10 +379,10 @@ PRIVATE GroupDefList *parse_group_file ARGS1(FILE *, fp)
{
GroupDefList *group_def_list = HTList_new();
GroupDef *group_def;
-
+
while (NULL != (group_def = parse_group_decl(fp)))
add_group_def(group_def_list, group_def);
-
+
return group_def_list;
}
@@ -451,7 +451,7 @@ PRIVATE void print_group_def_list ARGS1(GroupDefList *, group_list)
{
GroupDefList *cur = group_list;
GroupDef *group_def;
-
+
while (NULL != (group_def = (GroupDef*)HTList_nextObject(cur)))
HTAA_printGroupDef(group_def);
}
@@ -524,7 +524,7 @@ PRIVATE BOOL ip_number_match ARGS2(WWW_CONST char *, template,
WWW_CONST char *tcur = template;
WWW_CONST char *icur = inet_addr;
int cnt;
-
+
for (cnt=0; cnt<4; cnt++) {
if (!tcur || !icur || !part_match(tcur, icur))
return NO;
@@ -571,7 +571,7 @@ PRIVATE BOOL is_domain_mask ARGS1(WWW_CONST char *, mask)
/* PRIVATE ip_mask_match()
** MATCH AN IP NUMBER MASK OR IP NAME MASK
** AGAINST ACTUAL IP NUMBER OR IP NAME
-**
+**
** ON ENTRY:
** mask mask. Mask may be either an inet number
** mask or a domain name mask,
@@ -729,7 +729,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group,
while (NULL != (item = (Item*)HTList_nextObject(cur1))) {
if (!item->address_def_list || /* Any address allowed */
ip_in_def_list(item->address_def_list, ip_number, ip_name)) {
-
+
if (!item->user_def_list) /* Any user allowed */
return HTAA_OK;
else {
@@ -737,7 +737,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group,
Ref *ref;
while (NULL != (ref = (Ref*)HTList_nextObject(cur2))) {
-
+
if (ref->translation) { /* Group, check recursively */
reason = HTAA_userAndInetInGroup(ref->translation,
username,
@@ -758,7 +758,7 @@ PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup ARGS4(GroupDef *, group,
}
} /* while items in group */
} /* valid parameters */
-
+
return reason; /* No match, or invalid parameters */
}
diff --git a/libwww2/HTGroup.h b/libwww2/HTGroup.h
index a26f587..75f3eb5 100644
--- a/libwww2/HTGroup.h
+++ b/libwww2/HTGroup.h
@@ -1,5 +1,5 @@
/* GROUP FILE ROUTINES
-
+
*/
#ifndef HTGROUP_H
@@ -46,63 +46,63 @@ Group definition grammar
string
"sequence of alphanumeric characters"
-
+
user_name
string
-
+
group_name
string
-
+
group_ref
group_name
-
+
user_def
user_name | group_ref
-
+
user_def_list
user_def { ',' user_def }
-
+
user_part
user_def | '(' user_def_list ')'
-
+
templ
-
+
"sequence of alphanumeric characters and '*'s"
-
+
ip_number_mask
templ '.' templ '.' templ '.' templ
-
+
domain_name_mask
templ { '.' templ }
-
+
address
-
+
ip_number_mask | domain_name_mask
-
+
address_def
-
+
address
-
+
address_def_list
address_def { ',' address_def }
-
+
address_part
address_def | '(' address_def_list ')'
-
+
item
[user_part] ['@' address_part]
-
+
item_list
item { ',' item }
-
+
group_def
item_list
-
+
group_decl
group_name ':' group_def
-
+
PARSE GROUP DEFINITION
-
+
*/
PUBLIC GroupDef *HTAA_parseGroupDef PARAMS((FILE * fp));
@@ -112,7 +112,7 @@ Fill in Pointers to referenced Group Definitions in a Group Definition
References to groups (by their name) are resolved from group_def_list and pointers to
those structures are added to group_def.
-
+
*/
PUBLIC void HTAA_resolveGroupReferences PARAMS((GroupDef * group_def,
@@ -123,7 +123,7 @@ Read Group File (and do caching)
If group file is already in cache returns a pointer to previously read group definition
list.
-
+
*/
PUBLIC GroupDefList *HTAA_readGroupFile PARAMS((WWW_CONST char * filename));
@@ -133,7 +133,7 @@ Delete Group Definition
Groups in cache should never be freed by this function. This should only be used to
free group definitions read by HTAA_parseGroupDef.
-
+
*/
PUBLIC void GroupDef_delete PARAMS((GroupDef * group_def));
@@ -149,7 +149,7 @@ PUBLIC void HTAA_printGroupDef PARAMS((GroupDef * group_def));
Does a User Belong to a Given Set of Groups
This function checks both the username and the internet address.
-
+
*/
/* PUBLIC HTAA_userAndInetInGroup()
diff --git a/libwww2/HTIcon.c b/libwww2/HTIcon.c
index 7b75078..5542b90 100644
--- a/libwww2/HTIcon.c
+++ b/libwww2/HTIcon.c
@@ -7,7 +7,7 @@
** the format or from the default, then the unknown icon is returned.
**
** Note: This routine gurantee's to return something!
-**
+**
*/
#include "../config.h"
#include "HTFile.h"
@@ -37,34 +37,34 @@ char *HTgeticonname(HTFormat format, char *defaultformat)
int count;
char *ptr;
char subtype[128];
-
+
if(format != NULL)
{
strcpy(subtype, format->name);
-
+
ptr=strchr(subtype,'/');
-
- if(ptr != NULL)
+
+ if(ptr != NULL)
*ptr = '\0';
}
else
{
subtype[0] = '\0';
}
-
+
ptr = NULL;
-
+
for(count = 0;strcmp(type_map[count].image,"EOFEOF") != 0; count++)
{
if(strcmp(type_map[count].format, subtype) == 0)
return type_map[count].image;
-
+
if(strcmp(type_map[count].format, defaultformat) == 0)
ptr = type_map[count].image;
}
-
- if(ptr != NULL)
+
+ if(ptr != NULL)
return ptr;
-
+
return "internal-gopher-unknown";
}
diff --git a/libwww2/HTInit.c b/libwww2/HTInit.c
index 75ad96b..16aefc3 100644
--- a/libwww2/HTInit.c
+++ b/libwww2/HTInit.c
@@ -68,17 +68,17 @@ PUBLIC void HTFormatInit NOARGS
can be overridden by users. */
if (have_hdf)
{
- HTSetPresentation("application/x-hdf", "mosaic-internal-reference",
+ HTSetPresentation("application/x-hdf", "mosaic-internal-reference",
1.0, 3.0, 0.0);
- HTSetPresentation("application/x-netcdf", "mosaic-internal-reference",
+ HTSetPresentation("application/x-netcdf", "mosaic-internal-reference",
1.0, 3.0, 0.0);
/* Jumping the gun, but still... */
- HTSetPresentation("application/hdf", "mosaic-internal-reference",
+ HTSetPresentation("application/hdf", "mosaic-internal-reference",
1.0, 3.0, 0.0);
- HTSetPresentation("application/netcdf", "mosaic-internal-reference",
+ HTSetPresentation("application/netcdf", "mosaic-internal-reference",
1.0, 3.0, 0.0);
}
-
+
if (use_default_type_map)
{
#if defined(__sgi)
@@ -121,7 +121,7 @@ PUBLIC void HTFormatInit NOARGS
HTSetPresentation("application/postscript", "ghostview %s", 1.0, 3.0, 0.0);
HTSetPresentation("application/x-dvi", "xdvi %s", 1.0, 3.0, 0.0);
- HTSetPresentation("message/rfc822",
+ HTSetPresentation("message/rfc822",
"xterm -e metamail %s", 1.0, 3.0, 0.0);
HTSetPresentation("application/x-latex", "mosaic-internal-present", 1.0, 3.0, 0.0);
@@ -149,19 +149,19 @@ PUBLIC void HTFormatInit NOARGS
/*
Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
-Permission to use, copy, modify, and distribute this material
-for any purpose and without fee is hereby granted, provided
-that the above copyright notice and this permission notice
-appear in all copies, and that the name of Bellcore not be
-used in advertising or publicity pertaining to this
-material without the specific, prior written permission
-of an authorized representative of Bellcore. BELLCORE
-MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
-OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
+Permission to use, copy, modify, and distribute this material
+for any purpose and without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies, and that the name of Bellcore not be
+used in advertising or publicity pertaining to this
+material without the specific, prior written permission
+of an authorized representative of Bellcore. BELLCORE
+MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
+OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
*/
-/******************************************************
- Metamail -- A tool to help diverse mail readers
+/******************************************************
+ Metamail -- A tool to help diverse mail readers
cope with diverse multimedia mail formats.
Author: Nathaniel S. Borenstein, Bellcore
@@ -204,12 +204,12 @@ static char *GetCommand(char *s, char **t)
}
*s2 = 0;
return(NULL);
-}
+}
static char *Cleanse(char *s) /* no leading or trailing space, all lower case */
{
char *tmp, *news;
-
+
/* strip leading white space */
while (*s && isspace((unsigned char) *s)) ++s;
news = s;
@@ -374,20 +374,20 @@ PUBLIC void HTFileInit NOARGS
HTSetSuffix(".eps", "application/postscript", "binary", 1.0);
HTSetSuffix(".ai", "application/postscript", "binary", 1.0);
HTSetSuffix(".ps", "application/postscript", "binary", 1.0);
-
+
HTSetSuffix(".rtf", "application/rtf", "binary", 1.0);
HTSetSuffix(".dvi","application/x-dvi", "binary", 1.0);
HTSetSuffix(".hdf","application/x-hdf", "binary", 1.0);
-
+
HTSetSuffix(".latex", "application/x-latex", "binary", 1.0);
HTSetSuffix(".cdf","application/x-netcdf", "binary", 1.0);
HTSetSuffix(".nc","application/x-netcdf", "binary", 1.0);
HTSetSuffix(".tex", "application/x-tex", "binary", 1.0);
-
+
HTSetSuffix(".texinfo", "application/x-texinfo", "binary", 1.0);
HTSetSuffix(".texi", "application/x-texinfo", "binary", 1.0);
@@ -419,7 +419,7 @@ PUBLIC void HTFileInit NOARGS
HTSetSuffix(".aif", "audio/x-aiff", "binary", 1.0);
HTSetSuffix(".aiff", "audio/x-aiff", "binary", 1.0);
HTSetSuffix(".wav", "audio/x-wav", "binary", 1.0);
-
+
HTSetSuffix(".gif", "image/gif", "binary", 1.0);
HTSetSuffix(".png", "image/png", "binary", 1.0);
@@ -431,10 +431,10 @@ PUBLIC void HTFileInit NOARGS
HTSetSuffix(".jpe", "image/jpeg", "binary", 1.0);
HTSetSuffix(".jpg", "image/jpeg", "binary", 1.0);
HTSetSuffix(".jpeg","image/jpeg", "binary", 1.0);
-
+
HTSetSuffix(".tif", "image/tiff", "binary", 1.0);
HTSetSuffix(".tiff","image/tiff", "binary", 1.0);
-
+
HTSetSuffix(".ras", "image/x-cmu-rast", "binary", 1.0);
HTSetSuffix(".pnm", "image/x-portable-anymap", "binary", 1.0);
HTSetSuffix(".pbm", "image/x-portable-bitmap", "binary", 1.0);
@@ -455,7 +455,7 @@ PUBLIC void HTFileInit NOARGS
HTSetSuffix(".h", "text/plain", "binary", 1.0);
HTSetSuffix(".pl", "text/plain", "binary", 1.0);
HTSetSuffix(".txt", "text/plain", "binary", 1.0);
-
+
HTSetSuffix(".rtx", "text/richtext", "binary", 1.0); /* MIME richtext */
HTSetSuffix(".tsv", "text/tab-separated-values", "binary", 1.0);
HTSetSuffix(".etx", "text/x-setext", "binary", 1.0);
@@ -477,7 +477,7 @@ PUBLIC void HTFileInit NOARGS
/* These should override the default extensions as necessary. */
HTLoadExtensionsConfigFile (global_extension_map);
-
+
/* These should override everything else. */
HTLoadExtensionsConfigFile (personal_extension_map);
}
@@ -513,7 +513,7 @@ PUBLIC void HTFileInit NOARGS
/**//* NOTREACHED */
/*}*/
-static void getword(char *word, char *line, char stop, char stop2)
+static void getword(char *word, char *line, char stop, char stop2)
{
int x = 0, y;
@@ -521,9 +521,9 @@ static void getword(char *word, char *line, char stop, char stop2)
{
word[x] = line[x];
}
-
+
word[x] = '\0';
- if (line[x])
+ if (line[x])
++x;
y=0;
@@ -545,8 +545,8 @@ int HTLoadExtensionsConfigFile (char *fn)
fprintf (stderr, "Loading extensions config file '%s'\n",
fn);
#endif
-
- if(!(f = fopen(fn,"r")))
+
+ if(!(f = fopen(fn,"r")))
{
#ifndef DISABLE_TRACE
if (www2Trace)
@@ -556,7 +556,7 @@ int HTLoadExtensionsConfigFile (char *fn)
return -1;
}
- while(!(getline((char**)&l,&len,f)))
+ while(!(getline((char**)&l,&len,f)))
{
/* always get rid of leading white space for "line" -- SWP */
for (ptr=l; *ptr && isspace(*ptr); ptr++);
@@ -566,11 +566,11 @@ int HTLoadExtensionsConfigFile (char *fn)
continue;
ct = (char *)malloc(sizeof(char) * (strlen(w) + 1));
strcpy(ct,w);
-
- while(ptr[0])
+
+ while(ptr[0])
{
getword(w,ptr,' ','\t');
- if(w[0] && (w[0] != ' '))
+ if(w[0] && (w[0] != ' '))
{
char *ext = (char *)malloc(sizeof(char) * (strlen(w)+1+1));
@@ -586,13 +586,13 @@ int HTLoadExtensionsConfigFile (char *fn)
HTSetSuffix (ext, ct, "binary", 1.0);
count++;
-
+
free (ext);
}
}
free(ct);
}
-
+
fclose(f);
return count;
diff --git a/libwww2/HTLex.h b/libwww2/HTLex.h
index ecb5fff..c9e6cad 100644
--- a/libwww2/HTLex.h
+++ b/libwww2/HTLex.h
@@ -1,5 +1,5 @@
/* LEXICAL ANALYSOR (MAINLY FOR CONFIG FILES)
-
+
*/
#ifndef HTLEX_H
@@ -34,7 +34,7 @@ extern int lex_line; /* Line number in source file */
Get Next Lexical Item
If returns LEX_ALPH_STR or LEX_TMPL_STR the string is in global buffer lex_buffer.
-
+
*/
PUBLIC LexItem lex PARAMS((FILE * fp));
diff --git a/libwww2/HTList.c b/libwww2/HTList.c
index ca454ff..93d0636 100644
--- a/libwww2/HTList.c
+++ b/libwww2/HTList.c
@@ -51,13 +51,13 @@ void HTList_addObject ARGS2(HTList *,me, void *,newObject)
void HTList_addObjectAtEnd ARGS2(HTList *,me, void *,newObject)
{
- if (me)
+ if (me)
{
HTList *newNode = (HTList *)malloc (sizeof (HTList));
if (newNode == NULL) outofmem(__FILE__, "HTList_addObject");
newNode->object = newObject;
newNode->next = NULL;
- while (me->next)
+ while (me->next)
me = me->next;
me->next = newNode;
}
diff --git a/libwww2/HTMIME.c b/libwww2/HTMIME.c
index 1da9c23..bc457c9 100644
--- a/libwww2/HTMIME.c
+++ b/libwww2/HTMIME.c
@@ -43,7 +43,7 @@ char *HTTP_expires;
/* MIME Object
** -----------
*/
-typedef enum _MIME_state
+typedef enum _MIME_state
{
BEGINNING_OF_LINE,
CONTENT_,
@@ -73,24 +73,24 @@ typedef enum _MIME_state
} MIME_state;
#define VALUE_SIZE 8192 /* @@@@@@@ Arbitrary? */
-struct _HTStream
+struct _HTStream
{
WWW_CONST HTStreamClass * isa;
-
+
MIME_state state; /* current state */
MIME_state if_ok; /* got this state if match */
MIME_state field; /* remember which field */
MIME_state fold_state; /* state on a fold */
WWW_CONST char * check_pointer; /* checking input */
-
+
char * value_pointer; /* storing values */
char value[VALUE_SIZE];
-
+
HTParentAnchor * anchor; /* Given on creation */
HTStream * sink; /* Given on creation */
-
+
char * boundary; /* For multipart */
-
+
HTFormat encoding; /* Content-Transfer-Encoding */
char * compression_encoding;
int content_length;
@@ -98,9 +98,9 @@ struct _HTStream
HTFormat format; /* Content-Type */
HTStream * target; /* While writing out */
HTStreamClass targetClass;
-
+
HTAtom * targetRep; /* Converting into? */
-
+
char * location;
char * expires;
char * last_modified;
@@ -138,7 +138,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->header_length ++; /* bjs - update this first */
}
- switch(me->state)
+ switch(me->state)
{
case MIME_IGNORE:
#ifndef DISABLE_TRACE
@@ -146,20 +146,20 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
fprintf (stderr, "[HTMIME_put_character] Got MIME_IGNORE; returning...\n");
#endif
return;
-
+
/* case MIME_TRANSPARENT:*/
-
+
case NEWLINE:
- if (c != '\n' && WHITE(c))
+ if (c != '\n' && WHITE(c))
{
/* Folded line */
me->state = me->fold_state; /* pop state before newline */
break;
}
/* else Falls through */
-
+
case BEGINNING_OF_LINE:
- switch(c)
+ switch(c)
{
case 'c':
case 'C':
@@ -168,7 +168,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->state = CHECK;
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] Got C at beginning of line; checking for 'ontent-'\n");
#endif
break;
@@ -180,7 +180,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->state = E;
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] Got E at beginning of line; checking for 'X'\n");
#endif
}
@@ -214,7 +214,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
{
int compressed = COMPRESSED_NOT;
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf (stderr,
"HTMIME: DOING STREAMSTACK: MIME content type is %s, converting to %s\n",
HTAtom_name(me->format), HTAtom_name(me->targetRep));
@@ -251,10 +251,10 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
#endif
me->target = HTStreamStack(me->format, me->targetRep, compressed,
me->sink, me->anchor);
- if (!me->target)
+ if (!me->target)
{
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
{
fprintf(stderr, "MIME: Can't translate! ** \n");
fprintf(stderr, "HTMIME: Defaulting to HTML.\n");
@@ -267,7 +267,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->sink,
me->anchor);
}
- if (me->target)
+ if (me->target)
{
me->targetClass = *me->target->isa;
/* Check for encoding and select state from there @@ */
@@ -276,17 +276,17 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
if (www2Trace)
fprintf (stderr, "[MIME] Entering MIME_TRANSPARENT\n");
#endif
- me->state = MIME_TRANSPARENT;
+ me->state = MIME_TRANSPARENT;
/* bjs note: header is now completely read */
-
- }
- else
+
+ }
+ else
{
/* This is HIGHLY EVIL -- the browser WILL BREAK
if it ever reaches here. Thus the default to
HTML above, which should always happen... */
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf (stderr, "MIME: HIT HIGHLY EVIL!!! ***\n");
#endif
me->state = MIME_IGNORE; /* What else to do? */
@@ -301,20 +301,20 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
#endif
goto bad_field_name;
break;
-
+
} /* switch on character */
break;
-
+
case CHECK: /* Check against string */
- if (TOLOWER(c) == *(me->check_pointer)++)
+ if (TOLOWER(c) == *(me->check_pointer)++)
{
- if (!*me->check_pointer)
+ if (!*me->check_pointer)
me->state = me->if_ok;
- }
- else
+ }
+ else
{ /* Error */
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr,
"HTMIME: Bad character `%c' found where `%s' expected\n",
c, me->check_pointer - 1);
@@ -326,21 +326,21 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
case CONTENT_:
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] in case CONTENT_\n");
#endif
- switch(c)
+ switch(c)
{
case 't':
case 'T':
me->state = CONTENT_T;
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] Was CONTENT_, found T, state now CONTENT_T\n");
#endif
break;
-
+
case 'e':
case 'E':
me->check_pointer = "ncoding:";
@@ -348,11 +348,11 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->state = CHECK;
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] Was CONTENT_, found E, checking for 'ncoding:'\n");
#endif
break;
-
+
case 'l':
case 'L':
me->check_pointer = "ength:";
@@ -360,29 +360,29 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->state = CHECK;
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] Was CONTENT_, found L, checking for 'ength:'\n");
#endif
break;
-
+
default:
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] Was CONTENT_, found nothing; bleah\n");
#endif
goto bad_field_name;
-
+
} /* switch on character */
break;
-
+
case CONTENT_T:
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] in case CONTENT_T\n");
#endif
- switch(c)
+ switch(c)
{
case 'r':
case 'R':
@@ -391,11 +391,11 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->state = CHECK;
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME] Was CONTENT_T; going to check for ansfer-encoding:\n");
#endif
break;
-
+
case 'y':
case 'Y':
me->check_pointer = "pe:";
@@ -406,7 +406,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
fprintf (stderr, "[MIME] Was CONTENT_T; going to check for pe:\n");
#endif
break;
-
+
default:
#ifndef DISABLE_TRACE
if (www2Trace)
@@ -544,25 +544,25 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->state = SKIP_GET_VALUE;
/* Fall through! (no break!) */
case SKIP_GET_VALUE:
- if (c == '\n')
+ if (c == '\n')
{
me->fold_state = me->state;
me->state = NEWLINE;
break;
}
- if (WHITE(c))
+ if (WHITE(c))
break; /* Skip white space */
-
+
me->value_pointer = me->value;
- me->state = GET_VALUE;
+ me->state = GET_VALUE;
/* Fall through to store first character */
-
+
case GET_VALUE:
- if (WHITE(c))
+ if (WHITE(c))
{
/* End of field */
*me->value_pointer = 0;
- switch (me->field)
+ switch (me->field)
{
case CONTENT_TYPE:
#ifndef DISABLE_TRACE
@@ -593,7 +593,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->encoding = HTAtom_for(me->value);
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"[MIME_put_char] Picked up transfer_encoding '%s'\n",
(char*)me->encoding);
#endif
@@ -602,8 +602,8 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
me->compression_encoding = strdup (me->value);
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
- "[MIME_put_char] Picked up compression encoding '%s'\n",
+ fprintf (stderr,
+ "[MIME_put_char] Picked up compression encoding '%s'\n",
me->compression_encoding);
#endif
break;
@@ -614,8 +614,8 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
noLength=0;
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
- "[MIME_put_char] Picked up content length '%d'\n",
+ fprintf (stderr,
+ "[MIME_put_char] Picked up content length '%d'\n",
me->content_length);
#endif
break;
@@ -755,7 +755,7 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
}
else
{
- if (me->value_pointer < me->value + VALUE_SIZE - 1)
+ if (me->value_pointer < me->value + VALUE_SIZE - 1)
{
*me->value_pointer++ = c;
break;
@@ -766,25 +766,25 @@ PRIVATE void HTMIME_put_character ARGS2(HTStream *, me, char, c)
}
}
/* Fall through */
-
+
case JUNK_LINE:
- if (c == '\n')
+ if (c == '\n')
{
me->state = NEWLINE;
me->fold_state = me->state;
}
break;
-
+
} /* switch on state*/
-
+
return;
-
+
value_too_long:
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr,
"HTMIME: *** Syntax error. (string too long)\n");
#endif
-
+
bad_field_name: /* Ignore it */
me->state = JUNK_LINE;
return;
@@ -818,7 +818,7 @@ PRIVATE void HTMIME_put_string ARGS2(HTStream *, me, WWW_CONST char*, s)
if (www2Trace)
fprintf (stderr, "[HTMIME_put_string] Doing char-by-char put_character\n");
#endif
- for (p=s; *p; p++)
+ for (p=s; *p; p++)
HTMIME_put_character(me, *p);
}
else
@@ -857,7 +857,7 @@ PRIVATE void HTMIME_write ARGS3(HTStream *, me, WWW_CONST char*, s, int, l)
fprintf (stderr, "[HTMIME_write] Doing char-by-char put_character\n");
#endif
- for (p=s; p < s+l; p++)
+ for (p=s; p < s+l; p++)
HTMIME_put_character(me, *p);
}
else
@@ -903,10 +903,10 @@ PRIVATE void HTMIME_free ARGS1(HTStream *, me)
me->targetClass = *me->target->isa;
(*me->targetClass.put_string) (me->target, "ERROR IN HTTP/1.0 RESPONSE
The remote server returned a HTTP/1.0 response that Mosaic's MIME parser could not understand. Please contact the server maintainer. Sorry for the inconvenience,
The Management");
securityType=HTAA_UNKNOWN;
- }
- if (me->target)
+ }
+ if (me->target)
(*me->targetClass.free)(me->target);
-
+
if (me->expires)
{
char *p;
@@ -947,7 +947,7 @@ PRIVATE void HTMIME_free ARGS1(HTStream *, me)
PRIVATE void HTMIME_end_document ARGS1(HTStream *, me)
{
- if (me->target)
+ if (me->target)
(*me->targetClass.end_document)(me->target);
}
@@ -968,14 +968,14 @@ PRIVATE void HTMIME_handle_interrupt ARGS1(HTStream *, me)
** -----------------------
*/
PUBLIC WWW_CONST HTStreamClass HTMIME =
-{
+{
"MIMEParser",
HTMIME_free,
HTMIME_end_document,
HTMIME_put_character, HTMIME_put_string,
HTMIME_write,
HTMIME_handle_interrupt
- };
+ };
/* Subclass-specific Methods
@@ -990,9 +990,9 @@ PUBLIC HTStream* HTMIMEConvert ARGS5(
int, compressed)
{
HTStream* me;
-
+
me = malloc(sizeof(*me));
- me->isa = &HTMIME;
+ me->isa = &HTMIME;
#ifndef DISABLE_TRACE
if (www2Trace)
@@ -1021,6 +1021,6 @@ PUBLIC HTStream* HTMIMEConvert ARGS5(
/* bjs - a kludge for HTFormat.c */
int HTMIME_get_header_length(HTStream *me)
{
- if(me->isa != &HTMIME) return 0; /* in case we screw up */
+ if(me->isa != &HTMIME) return 0; /* in case we screw up */
return me->header_length;
}
diff --git a/libwww2/HTML.c b/libwww2/HTML.c
index cd689ca..739d828 100644
--- a/libwww2/HTML.c
+++ b/libwww2/HTML.c
@@ -47,71 +47,71 @@ struct _HTStream {
** This MUST match exactly the table referred to in the DTD!
*/
static char * ISO_Latin1[] = {
- "\306", /* capital AE diphthong (ligature) */
- "\301", /* capital A, acute accent */
- "\302", /* capital A, circumflex accent */
- "\300", /* capital A, grave accent */
- "\305", /* capital A, ring */
- "\303", /* capital A, tilde */
- "\304", /* capital A, dieresis or umlaut mark */
- "\307", /* capital C, cedilla */
- "\320", /* capital Eth, Icelandic */
- "\311", /* capital E, acute accent */
- "\312", /* capital E, circumflex accent */
- "\310", /* capital E, grave accent */
- "\313", /* capital E, dieresis or umlaut mark */
- "\315", /* capital I, acute accent */
- "\316", /* capital I, circumflex accent */
- "\314", /* capital I, grave accent */
- "\317", /* capital I, dieresis or umlaut mark */
- "\321", /* capital N, tilde */
- "\323", /* capital O, acute accent */
- "\324", /* capital O, circumflex accent */
- "\322", /* capital O, grave accent */
- "\330", /* capital O, slash */
- "\325", /* capital O, tilde */
- "\326", /* capital O, dieresis or umlaut mark */
- "\336", /* capital THORN, Icelandic */
- "\332", /* capital U, acute accent */
- "\333", /* capital U, circumflex accent */
- "\331", /* capital U, grave accent */
- "\334", /* capital U, dieresis or umlaut mark */
- "\335", /* capital Y, acute accent */
- "\341", /* small a, acute accent */
- "\342", /* small a, circumflex accent */
- "\346", /* small ae diphthong (ligature) */
- "\340", /* small a, grave accent */
- "\046", /* ampersand */
- "\345", /* small a, ring */
- "\343", /* small a, tilde */
- "\344", /* small a, dieresis or umlaut mark */
- "\347", /* small c, cedilla */
- "\351", /* small e, acute accent */
- "\352", /* small e, circumflex accent */
- "\350", /* small e, grave accent */
- "\360", /* small eth, Icelandic */
- "\353", /* small e, dieresis or umlaut mark */
- "\076", /* greater than */
- "\355", /* small i, acute accent */
- "\356", /* small i, circumflex accent */
- "\354", /* small i, grave accent */
- "\357", /* small i, dieresis or umlaut mark */
- "\074", /* less than */
- "\361", /* small n, tilde */
- "\363", /* small o, acute accent */
- "\364", /* small o, circumflex accent */
- "\362", /* small o, grave accent */
- "\370", /* small o, slash */
- "\365", /* small o, tilde */
- "\366", /* small o, dieresis or umlaut mark */
- "\337", /* small sharp s, German (sz ligature) */
- "\376", /* small thorn, Icelandic */
- "\372", /* small u, acute accent */
- "\373", /* small u, circumflex accent */
- "\371", /* small u, grave accent */
- "\374", /* small u, dieresis or umlaut mark */
- "\375", /* small y, acute accent */
- "\377", /* small y, dieresis or umlaut mark */
+ "\306", /* capital AE diphthong (ligature) */
+ "\301", /* capital A, acute accent */
+ "\302", /* capital A, circumflex accent */
+ "\300", /* capital A, grave accent */
+ "\305", /* capital A, ring */
+ "\303", /* capital A, tilde */
+ "\304", /* capital A, dieresis or umlaut mark */
+ "\307", /* capital C, cedilla */
+ "\320", /* capital Eth, Icelandic */
+ "\311", /* capital E, acute accent */
+ "\312", /* capital E, circumflex accent */
+ "\310", /* capital E, grave accent */
+ "\313", /* capital E, dieresis or umlaut mark */
+ "\315", /* capital I, acute accent */
+ "\316", /* capital I, circumflex accent */
+ "\314", /* capital I, grave accent */
+ "\317", /* capital I, dieresis or umlaut mark */
+ "\321", /* capital N, tilde */
+ "\323", /* capital O, acute accent */
+ "\324", /* capital O, circumflex accent */
+ "\322", /* capital O, grave accent */
+ "\330", /* capital O, slash */
+ "\325", /* capital O, tilde */
+ "\326", /* capital O, dieresis or umlaut mark */
+ "\336", /* capital THORN, Icelandic */
+ "\332", /* capital U, acute accent */
+ "\333", /* capital U, circumflex accent */
+ "\331", /* capital U, grave accent */
+ "\334", /* capital U, dieresis or umlaut mark */
+ "\335", /* capital Y, acute accent */
+ "\341", /* small a, acute accent */
+ "\342", /* small a, circumflex accent */
+ "\346", /* small ae diphthong (ligature) */
+ "\340", /* small a, grave accent */
+ "\046", /* ampersand */
+ "\345", /* small a, ring */
+ "\343", /* small a, tilde */
+ "\344", /* small a, dieresis or umlaut mark */
+ "\347", /* small c, cedilla */
+ "\351", /* small e, acute accent */
+ "\352", /* small e, circumflex accent */
+ "\350", /* small e, grave accent */
+ "\360", /* small eth, Icelandic */
+ "\353", /* small e, dieresis or umlaut mark */
+ "\076", /* greater than */
+ "\355", /* small i, acute accent */
+ "\356", /* small i, circumflex accent */
+ "\354", /* small i, grave accent */
+ "\357", /* small i, dieresis or umlaut mark */
+ "\074", /* less than */
+ "\361", /* small n, tilde */
+ "\363", /* small o, acute accent */
+ "\364", /* small o, circumflex accent */
+ "\362", /* small o, grave accent */
+ "\370", /* small o, slash */
+ "\365", /* small o, tilde */
+ "\366", /* small o, dieresis or umlaut mark */
+ "\337", /* small sharp s, German (sz ligature) */
+ "\376", /* small thorn, Icelandic */
+ "\372", /* small u, acute accent */
+ "\373", /* small u, circumflex accent */
+ "\371", /* small u, grave accent */
+ "\374", /* small u, dieresis or umlaut mark */
+ "\375", /* small y, acute accent */
+ "\377", /* small y, dieresis or umlaut mark */
};
@@ -138,7 +138,7 @@ PUBLIC void HTMLUseCharacterSet ARGS1(HTMLCharacterSet, i)
*/
PRIVATE void HTML_put_character ARGS2(HTStructured *, me, char, c)
{
- if (!me->text)
+ if (!me->text)
{
me->text = HText_new();
HText_beginAppend(me->text);
@@ -156,7 +156,7 @@ PRIVATE void HTML_put_character ARGS2(HTStructured *, me, char, c)
*/
PRIVATE void HTML_put_string ARGS2(HTStructured *, me, WWW_CONST char*, s)
{
- if (!me->text)
+ if (!me->text)
{
me->text = HText_new();
HText_beginAppend(me->text);
@@ -185,17 +185,17 @@ PRIVATE void HTML_start_element ARGS4(
WWW_CONST BOOL*, present,
WWW_CONST char **, value)
{
- if (!me->text)
+ if (!me->text)
{
me->text = HText_new();
HText_beginAppend(me->text);
}
- switch (element_number)
+ switch (element_number)
{
case HTML_A:
{
char *href = NULL;
- if (present[HTML_A_HREF])
+ if (present[HTML_A_HREF])
{
StrAllocCopy(href, value[HTML_A_HREF]);
HTSimplify(href);
@@ -204,7 +204,7 @@ PRIVATE void HTML_start_element ARGS4(
free (href);
}
break;
-
+
case HTML_TITLE:
HText_appendText(me->text, "");
break;
@@ -253,7 +253,7 @@ PRIVATE void HTML_start_element ARGS4(
case HTML_IMG:
{
char *href = NULL;
- if (present[HTML_A_HREF])
+ if (present[HTML_A_HREF])
{
StrAllocCopy(href, value[HTML_A_HREF]);
HTSimplify(href);
@@ -291,7 +291,7 @@ PRIVATE void HTML_start_element ARGS4(
case HTML_BLOCKQUOTE:
HText_appendText(me->text, "");
break;
-
+
case HTML_TT: /* Physical character highlighting */
case HTML_B: /* Currently ignored */
case HTML_I:
@@ -308,7 +308,7 @@ PRIVATE void HTML_start_element ARGS4(
default:
break;
-
+
} /* end switch */
}
@@ -319,7 +319,7 @@ PRIVATE void HTML_start_element ARGS4(
*/
PRIVATE void HTML_end_element ARGS2(HTStructured *, me, int , element_number)
{
- switch(element_number)
+ switch(element_number)
{
case HTML_A:
HText_endAnchor(me->text);
@@ -403,14 +403,14 @@ PRIVATE void HTML_put_entity ARGS2(HTStructured *, me, int, entity_number)
of document, so we don't.
**
** If non-interactive, everything is freed off. No: crashes -listrefs
-** Otherwise, the interactive object is left.
+** Otherwise, the interactive object is left.
*/
PUBLIC void HTML_free ARGS1(HTStructured *, me)
{
if (me->text)
HText_endAppend(me->text);
-
- if (me->target)
+
+ if (me->target)
{
(*me->targetClass.end_document)(me->target);
(*me->targetClass.free)(me->target);
@@ -423,8 +423,8 @@ PUBLIC void HTML_handle_interrupt ARGS1(HTStructured *, me)
{
if (me->text)
HText_doAbort (me->text);
-
- if (me->target)
+
+ if (me->target)
{
(*me->targetClass.handle_interrupt)(me->target);
}
@@ -442,14 +442,14 @@ PRIVATE void HTML_end_document ARGS1(HTStructured *, me)
** -----------------------
*/
PUBLIC WWW_CONST HTStructuredClass HTMLPresentation = /* As opposed to print etc */
-{
+{
"text/html",
HTML_free,
HTML_end_document, HTML_handle_interrupt,
HTML_put_character, HTML_put_string, HTML_write,
HTML_start_element, HTML_end_element,
HTML_put_entity
-};
+};
/* New Structured Text object
@@ -465,7 +465,7 @@ PUBLIC HTStructured* HTML_new ARGS3(
{
HTStructured * me;
-
+
#if 0
if (format_out != WWW_PLAINTEXT && format_out != WWW_PRESENT) {
HTStream * intermediate = HTStreamStack(WWW_HTML, format_out, 0,
@@ -485,9 +485,9 @@ PUBLIC HTStructured* HTML_new ARGS3(
me->node_anchor = anchor;
me->text = 0;
me->target = stream;
- if (stream)
+ if (stream)
me->targetClass = *stream->isa; /* Copy pointers */
-
+
return (HTStructured*) me;
}
@@ -521,5 +521,5 @@ PUBLIC int HTLoadError ARGS3(
return -number;
#endif
return -1;
-}
+}
diff --git a/libwww2/HTML.h b/libwww2/HTML.h
index cc20141..86167cd 100644
--- a/libwww2/HTML.h
+++ b/libwww2/HTML.h
@@ -33,7 +33,7 @@ Record error message as a hypertext object
The error message should be marked as an error so that it can be
reloaded later. This implementation just throws up an error message
and leaves the document unloaded.
-
+
*/
/* On entry,
** sink is a stream to the output device if any
diff --git a/libwww2/HTMLDTD.c b/libwww2/HTMLDTD.c
index c7f5ab2..35275ea 100644
--- a/libwww2/HTMLDTD.c
+++ b/libwww2/HTMLDTD.c
@@ -13,71 +13,71 @@
** This table must be matched exactly with ALL the translation tables
*/
static WWW_CONST char* entities[] = {
- "AElig", /* capital AE diphthong (ligature) */
- "Aacute", /* capital A, acute accent */
- "Acirc", /* capital A, circumflex accent */
- "Agrave", /* capital A, grave accent */
- "Aring", /* capital A, ring */
- "Atilde", /* capital A, tilde */
- "Auml", /* capital A, dieresis or umlaut mark */
- "Ccedil", /* capital C, cedilla */
- "ETH", /* capital Eth, Icelandic */
- "Eacute", /* capital E, acute accent */
- "Ecirc", /* capital E, circumflex accent */
- "Egrave", /* capital E, grave accent */
- "Euml", /* capital E, dieresis or umlaut mark */
- "Iacute", /* capital I, acute accent */
- "Icirc", /* capital I, circumflex accent */
- "Igrave", /* capital I, grave accent */
- "Iuml", /* capital I, dieresis or umlaut mark */
- "Ntilde", /* capital N, tilde */
- "Oacute", /* capital O, acute accent */
- "Ocirc", /* capital O, circumflex accent */
- "Ograve", /* capital O, grave accent */
- "Oslash", /* capital O, slash */
- "Otilde", /* capital O, tilde */
- "Ouml", /* capital O, dieresis or umlaut mark */
- "THORN", /* capital THORN, Icelandic */
- "Uacute", /* capital U, acute accent */
- "Ucirc", /* capital U, circumflex accent */
- "Ugrave", /* capital U, grave accent */
- "Uuml", /* capital U, dieresis or umlaut mark */
- "Yacute", /* capital Y, acute accent */
- "aacute", /* small a, acute accent */
- "acirc", /* small a, circumflex accent */
- "aelig", /* small ae diphthong (ligature) */
- "agrave", /* small a, grave accent */
- "amp", /* ampersand */
- "aring", /* small a, ring */
- "atilde", /* small a, tilde */
- "auml", /* small a, dieresis or umlaut mark */
- "ccedil", /* small c, cedilla */
- "eacute", /* small e, acute accent */
- "ecirc", /* small e, circumflex accent */
- "egrave", /* small e, grave accent */
- "eth", /* small eth, Icelandic */
- "euml", /* small e, dieresis or umlaut mark */
- "gt", /* greater than */
- "iacute", /* small i, acute accent */
- "icirc", /* small i, circumflex accent */
- "igrave", /* small i, grave accent */
- "iuml", /* small i, dieresis or umlaut mark */
- "lt", /* less than */
- "ntilde", /* small n, tilde */
- "oacute", /* small o, acute accent */
- "ocirc", /* small o, circumflex accent */
- "ograve", /* small o, grave accent */
- "oslash", /* small o, slash */
- "otilde", /* small o, tilde */
- "ouml", /* small o, dieresis or umlaut mark */
- "szlig", /* small sharp s, German (sz ligature) */
- "thorn", /* small thorn, Icelandic */
- "uacute", /* small u, acute accent */
- "ucirc", /* small u, circumflex accent */
- "ugrave", /* small u, grave accent */
- "uuml", /* small u, dieresis or umlaut mark */
- "yacute", /* small y, acute accent */
- "yuml", /* small y, dieresis or umlaut mark */
+ "AElig", /* capital AE diphthong (ligature) */
+ "Aacute", /* capital A, acute accent */
+ "Acirc", /* capital A, circumflex accent */
+ "Agrave", /* capital A, grave accent */
+ "Aring", /* capital A, ring */
+ "Atilde", /* capital A, tilde */
+ "Auml", /* capital A, dieresis or umlaut mark */
+ "Ccedil", /* capital C, cedilla */
+ "ETH", /* capital Eth, Icelandic */
+ "Eacute", /* capital E, acute accent */
+ "Ecirc", /* capital E, circumflex accent */
+ "Egrave", /* capital E, grave accent */
+ "Euml", /* capital E, dieresis or umlaut mark */
+ "Iacute", /* capital I, acute accent */
+ "Icirc", /* capital I, circumflex accent */
+ "Igrave", /* capital I, grave accent */
+ "Iuml", /* capital I, dieresis or umlaut mark */
+ "Ntilde", /* capital N, tilde */
+ "Oacute", /* capital O, acute accent */
+ "Ocirc", /* capital O, circumflex accent */
+ "Ograve", /* capital O, grave accent */
+ "Oslash", /* capital O, slash */
+ "Otilde", /* capital O, tilde */
+ "Ouml", /* capital O, dieresis or umlaut mark */
+ "THORN", /* capital THORN, Icelandic */
+ "Uacute", /* capital U, acute accent */
+ "Ucirc", /* capital U, circumflex accent */
+ "Ugrave", /* capital U, grave accent */
+ "Uuml", /* capital U, dieresis or umlaut mark */
+ "Yacute", /* capital Y, acute accent */
+ "aacute", /* small a, acute accent */
+ "acirc", /* small a, circumflex accent */
+ "aelig", /* small ae diphthong (ligature) */
+ "agrave", /* small a, grave accent */
+ "amp", /* ampersand */
+ "aring", /* small a, ring */
+ "atilde", /* small a, tilde */
+ "auml", /* small a, dieresis or umlaut mark */
+ "ccedil", /* small c, cedilla */
+ "eacute", /* small e, acute accent */
+ "ecirc", /* small e, circumflex accent */
+ "egrave", /* small e, grave accent */
+ "eth", /* small eth, Icelandic */
+ "euml", /* small e, dieresis or umlaut mark */
+ "gt", /* greater than */
+ "iacute", /* small i, acute accent */
+ "icirc", /* small i, circumflex accent */
+ "igrave", /* small i, grave accent */
+ "iuml", /* small i, dieresis or umlaut mark */
+ "lt", /* less than */
+ "ntilde", /* small n, tilde */
+ "oacute", /* small o, acute accent */
+ "ocirc", /* small o, circumflex accent */
+ "ograve", /* small o, grave accent */
+ "oslash", /* small o, slash */
+ "otilde", /* small o, tilde */
+ "ouml", /* small o, dieresis or umlaut mark */
+ "szlig", /* small sharp s, German (sz ligature) */
+ "thorn", /* small thorn, Icelandic */
+ "uacute", /* small u, acute accent */
+ "ucirc", /* small u, circumflex accent */
+ "ugrave", /* small u, grave accent */
+ "uuml", /* small u, dieresis or umlaut mark */
+ "yacute", /* small y, acute accent */
+ "yuml", /* small y, dieresis or umlaut mark */
};
#define HTML_ENTITIES 65
@@ -89,7 +89,7 @@ static WWW_CONST char* entities[] = {
** Lists must be in alphatbetical order by attribute name
** The tag elements contain the number of attributes
*/
-static attr no_attr[] =
+static attr no_attr[] =
{{ 0 }};
static attr a_attr[] = { /* Anchor attributes */
@@ -99,12 +99,12 @@ static attr a_attr[] = { /* Anchor attributes */
{ "TYPE" },
{ "URN" },
{ 0 } /* Terminate list */
-};
+};
static attr img_attr[] = { /* Anchor attributes */
{ "SRC"},
{ 0 } /* Terminate list */
-};
+};
static attr list_attr[] = {
{ "COMPACT"},
diff --git a/libwww2/HTMLDTD.h b/libwww2/HTMLDTD.h
index 81b45be..e13c05a 100644
--- a/libwww2/HTMLDTD.h
+++ b/libwww2/HTMLDTD.h
@@ -1,12 +1,12 @@
/* The HTML DTD -- software interface in libwww
HTML DTD - SOFTWARE INTERFACE
-
+
SGML purists should excuse the use of the term "DTD" in this file to represent
DTD-related information which is not exactly a DTD itself.
-
+
The C modular structure doesn't work very well here, as the dtd is partly in the .h and
partly in the .c which are not very independent. Tant pis.
-
+
*/
#ifndef HTMLDTD_H
#define HTMLDTD_H
@@ -24,7 +24,7 @@ Element Numbers
Must Match all tables by element! These include tables in HTMLDTD.c and code in HTML.c
.
-
+
*/
typedef enum _HTMLElement {
HTML_A, HTML_ADDRESS,
@@ -58,7 +58,7 @@ Attribute numbers
/*
Identifier is HTML__. These must match the tables in HTML.c!
-
+
*/
#define HTML_A_HREF 0
#define HTML_A_NAME 1
diff --git a/libwww2/HTMLGen.c b/libwww2/HTMLGen.c
index b0f71b7..e9617b9 100644
--- a/libwww2/HTMLGen.c
+++ b/libwww2/HTMLGen.c
@@ -31,7 +31,7 @@
*/
struct _HTStream {
- WWW_CONST HTStreamClass * isa;
+ WWW_CONST HTStreamClass * isa;
HTStream * target;
HTStreamClass targetClass; /* COPY for speed */
};
@@ -169,14 +169,14 @@ PRIVATE void PlainToHTML_end_document ARGS1(HTStructured *, me)
** -----------------------
*/
PRIVATE WWW_CONST HTStructuredClass HTMLGeneration = /* As opposed to print etc */
-{
+{
"text/html",
HTMLGen_free,
HTMLGen_end_document, HTMLGen_handle_interrupt,
HTMLGen_put_character, HTMLGen_put_string, HTMLGen_write,
HTMLGen_start_element, HTMLGen_end_element,
HTMLGen_put_entity
-};
+};
/* Subclass-specific Methods
@@ -187,7 +187,7 @@ PUBLIC HTStructured * HTMLGenerator ARGS1(HTStream *, output)
{
HTStructured* me = (HTStructured*)malloc(sizeof(*me));
if (me == NULL) outofmem(__FILE__, "HTMLGenerator");
- me->isa = &HTMLGeneration;
+ me->isa = &HTMLGeneration;
me->target = output;
me->targetClass = *me->target->isa; /* Copy pointers to routines for speed*/
@@ -203,10 +203,10 @@ PUBLIC HTStructured * HTMLGenerator ARGS1(HTStream *, output)
** This is just the easiest way of typecasting all the routines.
*/
PRIVATE WWW_CONST HTStructuredClass PlainToHTMLConversion =
-{
+{
"plaintexttoHTML",
- HTMLGen_free,
- PlainToHTML_end_document,
+ HTMLGen_free,
+ PlainToHTML_end_document,
HTMLGen_handle_interrupt,
HTMLGen_put_character,
HTMLGen_put_string,
@@ -214,7 +214,7 @@ PRIVATE WWW_CONST HTStructuredClass PlainToHTMLConversion =
NULL, /* Structured stuff */
NULL,
NULL
-};
+};
/* HTConverter from plain text to HTML Stream
@@ -223,18 +223,18 @@ PRIVATE WWW_CONST HTStructuredClass PlainToHTMLConversion =
PUBLIC HTStream* HTPlainToHTML ARGS5(
HTPresentation *, pres,
- HTParentAnchor *, anchor,
+ HTParentAnchor *, anchor,
HTStream *, sink,
HTFormat, format_in,
int, compressed)
{
HTStream* me = (HTStream*)malloc(sizeof(*me));
- me->isa = (HTStreamClass*) &PlainToHTMLConversion;
+ me->isa = (HTStreamClass*) &PlainToHTMLConversion;
me->target = sink;
me->targetClass = *me->target->isa;
/* Copy pointers to routines for speed*/
-
+
PUTS("\n\n");
return me;
}
diff --git a/libwww2/HTMailto.c b/libwww2/HTMailto.c
index 7b317c8..35b67e7 100644
--- a/libwww2/HTMailto.c
+++ b/libwww2/HTMailto.c
@@ -23,7 +23,7 @@
extern int www2Trace;
#endif
-struct _HTStructured
+struct _HTStructured
{
WWW_CONST HTStructuredClass * isa;
/* ... */
@@ -58,13 +58,13 @@ PUBLIC int HTSendMailTo ARGS4(
char *mailtoSubject;
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTMailto: Mailing to %s\n", arg);
#endif
-
- if (!initialized)
+
+ if (!initialized)
initialized = initialize();
- if (!initialized)
+ if (!initialized)
{
HTProgress ((char *) 0);
return HT_NOT_LOADED;
@@ -72,16 +72,16 @@ PUBLIC int HTSendMailTo ARGS4(
{
WWW_CONST char * p1=arg;
-
+
/* We will ask for the document, omitting the host name & anchor.
**
** Syntax of address is
** xxx@yyy User xxx at site yyy (xxx is optional).
- */
+ */
if (!my_strncasecmp (arg, "mailto:", 7))
p1 = arg + 7; /* Skip "mailto:" prefix */
-
- if (!*arg)
+
+ if (!*arg)
{
HTProgress ("Could not find email address");
return HT_NOT_LOADED; /* Ignore if no name */
diff --git a/libwww2/HTMosaicHTML.c b/libwww2/HTMosaicHTML.c
index d4f1a69..9bd0096 100644
--- a/libwww2/HTMosaicHTML.c
+++ b/libwww2/HTMosaicHTML.c
@@ -83,8 +83,8 @@ PRIVATE void HTMosaicHTML_free ARGS1(HTStream *, me)
{
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf
- (stderr,
+ fprintf
+ (stderr,
"[HTMosaicHTMLFree] OK, we're going to decompress HText\n");
#endif
HTCompressedHText (me->text, me->compressed, 0);
@@ -113,14 +113,14 @@ PRIVATE void HTMosaicHTML_handle_interrupt ARGS1(HTStream *, me)
** -----------------------
*/
PUBLIC WWW_CONST HTStreamClass HTMosaicHTML =
-{
+{
"SocketWriter",
HTMosaicHTML_free,
HTMosaicHTML_end_document,
- HTMosaicHTML_put_character, HTMosaicHTML_put_string,
+ HTMosaicHTML_put_character, HTMosaicHTML_put_string,
HTMosaicHTML_write,
HTMosaicHTML_handle_interrupt
-};
+};
/* New object
@@ -128,7 +128,7 @@ PUBLIC WWW_CONST HTStreamClass HTMosaicHTML =
*/
PUBLIC HTStream* HTMosaicHTMLPresent ARGS5(
HTPresentation *, pres,
- HTParentAnchor *, anchor,
+ HTParentAnchor *, anchor,
HTStream *, sink,
HTFormat, format_in,
int, compressed)
@@ -137,15 +137,15 @@ PUBLIC HTStream* HTMosaicHTMLPresent ARGS5(
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr, "[HTMosaicHTMLPresent] Hi there! Compressed is %d\n",
+ fprintf (stderr, "[HTMosaicHTMLPresent] Hi there! Compressed is %d\n",
compressed);
#endif
- me->isa = &HTMosaicHTML;
+ me->isa = &HTMosaicHTML;
me->text = HText_new();
me->interrupted = 0;
me->compressed = compressed;
HText_beginAppend(me->text);
-
+
return (HTStream*) me;
}
diff --git a/libwww2/HTMosaicHTML.h b/libwww2/HTMosaicHTML.h
index eb8aa03..691abe1 100644
--- a/libwww2/HTMosaicHTML.h
+++ b/libwww2/HTMosaicHTML.h
@@ -13,7 +13,7 @@
extern HTStream* HTMosaicHTMLPresent PARAMS((
HTPresentation * pres,
HTParentAnchor * anchor,
- HTStream * sink,
+ HTStream * sink,
HTFormat format_in,
int compressed));
diff --git a/libwww2/HTNews.c b/libwww2/HTNews.c
index 632ccc0..e66a003 100644
--- a/libwww2/HTNews.c
+++ b/libwww2/HTNews.c
@@ -19,7 +19,7 @@
*
*
* - fixed > and <'s with ;'s
-* - added xhdr patch by MH
+* - added xhdr patch by MH
*
*/
#include "../config.h"
@@ -62,7 +62,7 @@ char *mo_tmpnam(char *url);
extern int www2Trace;
#endif
-struct _HTStructured
+struct _HTStructured
{
WWW_CONST HTStructuredClass * isa;
/* ... */
@@ -105,8 +105,8 @@ int newsShowAllGroups = 0;
int newsShowReadGroups = 0;
int newsShowAllArticles = 0;
int newsNoThreadJumping = 0;
-int newsGotList = 0;
-int newsUseNewsRC = 1;
+int newsGotList = 0;
+int newsUseNewsRC = 1;
int newsNextIsUnread = 0;
int newsPrevIsUnread = 0;
extern int newsNoNewsRC;
@@ -129,23 +129,23 @@ int newsAuthWidth = 30;
*/
void escapeString (char *str, char *buf)
{
-
+
while (str && *str) {
switch (*str) {
case '<':
- *buf = '&'; buf++; *buf = 'l'; buf++;
+ *buf = '&'; buf++; *buf = 'l'; buf++;
*buf = 't'; buf++; *buf = ';'; buf++;
break;
case '>':
- *buf = '&'; buf++; *buf = 'g'; buf++;
+ *buf = '&'; buf++; *buf = 'g'; buf++;
*buf = 't'; buf++; *buf = ';'; buf++;
break;
case '&':
- *buf = '&'; buf++; *buf = 'a'; buf++;
+ *buf = '&'; buf++; *buf = 'a'; buf++;
*buf = 'm'; buf++; *buf = 'p'; buf++;
*buf = ';'; buf++;
break;
@@ -158,27 +158,27 @@ void escapeString (char *str, char *buf)
}
*buf = 0;
}
-
+
/* HTSetNewsConfig ()
- Expects: artView -- Article View configuration: 0 = Article View,
+ Expects: artView -- Article View configuration: 0 = Article View,
1 = Thread View
artAll -- Show All Articles? 0 = No, non zero = yes
grpAll -- Show All Groups? 0 = no, non zero = yes
grpRead -- Show Read Groups? 0 = no, non zero = yes
noThrJmp -- Don't jump threads? 0 = no, non zero = yes
newsRC -- Use the newsrc? 0 = no, non zero = yes
- nxtUnread -- Next thread should be the next unread?
+ nxtUnread -- Next thread should be the next unread?
0 = no, non zero = yes
- prevUnread -- Prev thread should be the prev unread?
+ prevUnread -- Prev thread should be the prev unread?
0 = no, non zero = yes
Returns: Nothing
Sets the current news config.
*/
-void HTSetNewsConfig (int artView, int artAll, int grpAll, int grpRead,
+void HTSetNewsConfig (int artView, int artAll, int grpAll, int grpRead,
int noThrJmp, int newsRC, int nxtUnread, int prevUnread)
{
if (artView != NO_CHANGE) {
@@ -332,7 +332,7 @@ int uudecodeline(FILE *fp, char *buf)
fclose(fp);
return 1;
}
-
+
p = buf;
/* N is used to avoid writing out all the characters at the end of
the file. */
@@ -556,9 +556,9 @@ PRIVATE void AddArtTop ARGS1(WWW_CONST NewsArt *, add)
/* If threaded, try to find some more of me ... */
if(add->FirstRef){
for(temp = LastArt; temp; temp = temp->prevt)
- if( strmatch(add->FirstRef,temp->FirstRef)
+ if( strmatch(add->FirstRef,temp->FirstRef)
|| strmatch(add->FirstRef,temp->ID) ) break;
- } else {
+ } else {
for(temp = LastArt; temp; temp = temp->prevt)
if(strmatch(add->ID,temp->FirstRef)) break;
}
@@ -604,7 +604,7 @@ PRIVATE void start_anchor ARGS1(WWW_CONST char *, href)
** HT has a selection of zero length at the end.
** text points to the text to be put into the file, 0 terminated.
** addr points to the hypertext refernce address,
-** terminated by white space, comma, NULL or '>'
+** terminated by white space, comma, NULL or '>'
*/
PRIVATE void write_anchor ARGS2(WWW_CONST char *,text, WWW_CONST char *,addr)
{
@@ -714,14 +714,14 @@ PRIVATE BOOL initialize NOARGS
fclose(fp);
}
}
- if (!HTNewsHost)
+ if (!HTNewsHost)
HTNewsHost = DEFAULT_NEWS_HOST;
-
-
+
+
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "HTNews: initialising newsrc for host\n");
#endif
-
+
s = -1; /* Disconnected */
return YES;
}
@@ -744,7 +744,7 @@ PRIVATE int newswrite ARGS1(WWW_CONST char *, msg)
int status;
if( (status = NETWRITE(s, msg, strlen(msg))) <0){
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTNews: Unable to send command. Disconnecting.\n");
#endif
NETCLOSE(s);
@@ -756,13 +756,13 @@ PRIVATE int newswrite ARGS1(WWW_CONST char *, msg)
PRIVATE int response ARGS1(WWW_CONST char *,command)
{
- int result;
+ int result;
char * p = response_text;
if (command) {
int status;
int length = strlen(command);
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "NNTP command to be sent: %s", command);
#endif
status = NETWRITE(s, command, length);
@@ -776,17 +776,17 @@ PRIVATE int response ARGS1(WWW_CONST char *,command)
return status;
} /* if bad status */
} /* if command to be sent */
-
- for(;;) {
+
+ for(;;) {
if (((*p++=HTGetCharacter ()) == LF) || (p == &response_text[LINE_LENGTH])) {
*p++=0; /* Terminate the string */
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "NNTP Response: %s\n", response_text);
#endif
sscanf(response_text, "%d", &result);
- return result;
+ return result;
} /* if end of line */
-
+
if (*(p-1) < 0) {
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr,
@@ -800,7 +800,7 @@ PRIVATE int response ARGS1(WWW_CONST char *,command)
/* Setup our networking */
-PRIVATE int OpenNNTP NOARGS
+PRIVATE int OpenNNTP NOARGS
{
/* CONNECTING to news host */
char url[1024];
@@ -829,14 +829,14 @@ PRIVATE int OpenNNTP NOARGS
NETCLOSE(s);
s = -1;
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTNews: Unable to connect to news host.\n");
#endif
return 2;
} else {
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTNews: Connected to news host %s.\n",HTNewsHost);
#endif
HTInitInput(s); /* set up buffering */
@@ -915,11 +915,11 @@ char *NNTPgetquoteline(char *art)
break;
}
}
-
+
if(qline[2]=='.' && qline[3] < ' ') return NULL;
return qline;
}
-
+
int NNTPgetarthdrs(char *art,char **ref, char **grp, char **subj, char **from)
{
int status, done;
@@ -928,7 +928,7 @@ int NNTPgetarthdrs(char *art,char **ref, char **grp, char **subj, char **from)
char buffer[LINE_LENGTH+1];
*ref = *grp = *subj = *from = NULL;
-
+
if (!initialized)
initialized = initialize();
if (!initialized){
@@ -938,7 +938,7 @@ int NNTPgetarthdrs(char *art,char **ref, char **grp, char **subj, char **from)
HTProgress ("Could not set up news connection.");
return HT_NOT_LOADED; /* FAIL */
}
-
+
if(s < 0) {
HTProgress("Attempting to connect to news server");
if(OpenNNTP()){
@@ -1404,13 +1404,13 @@ char *makespaces (char *str, int len)
p++;
}
*p = 0;
- } else if (l > len) {
+ } else if (l > len) {
spaces[0] = 0;
}
return spaces;
}
-
+
/* Read in an Article read_article
** ------------------
**
@@ -1422,7 +1422,7 @@ char *makespaces (char *str, int len)
** On entry,
** s Global socket number is OK
** HT Global hypertext object is ready for appending text
-*/
+*/
PRIVATE void read_article ARGS1 (char *, artID)
{
int i;
@@ -1487,17 +1487,17 @@ PRIVATE void read_article ARGS1 (char *, artID)
} else {
switch(line[0]) {
case '.':
- if (line[1]<' ')
+ if (line[1]<' ')
done = 1;
break;
case 'S':
case 's':
- if(match(line, "SUBJECT:"))
+ if(match(line, "SUBJECT:"))
subj = strdup(&line[8]);
break;
case 'D':
case 'd':
- if(match(line, "DATE:"))
+ if(match(line, "DATE:"))
date = strdup(&line[5]);
break;
case 'L':
@@ -1507,22 +1507,22 @@ PRIVATE void read_article ARGS1 (char *, artID)
break;
case 'F':
case 'f':
- if(match(line, "FROM:"))
+ if(match(line, "FROM:"))
from = strdup(&line[5]);
break;
case 'O':
case 'o':
- if(match(line, "ORGANIZATION:"))
+ if(match(line, "ORGANIZATION:"))
org = strdup(&line[13]);
break;
case 'N':
case 'n':
- if(match(line, "NEWSGROUPS:"))
+ if(match(line, "NEWSGROUPS:"))
newsgroups = strdup(&line[11]);
break;
case 'R':
case 'r':
- if(match(line, "REFERENCES:"))
+ if(match(line, "REFERENCES:"))
references = strdup(&line[11]);
break;
default:
@@ -1700,12 +1700,12 @@ PRIVATE void read_article ARGS1 (char *, artID)
continue;
}
break;
-
+
case 5: /* possible mime encap encoding crud */
if(match(line,"CONTENT-TYPE: IMAGE")) {
decode = 3;
break;
- } else {
+ } else {
decode = 0;
}
break;
@@ -1716,7 +1716,7 @@ PRIVATE void read_article ARGS1 (char *, artID)
decode = 3;
break;
}
- if(!strncmp(line,"begin",5)){
+ if(!strncmp(line,"begin",5)){
decode=1;
fp = startuudecode(filename = mo_tmpnam(NULL));
HTProgress("uudecoding image data...");
@@ -1724,9 +1724,9 @@ PRIVATE void read_article ARGS1 (char *, artID)
continue;
}
}
-
+
/* HTTP, FTP, MAILTO, GOPHER, */
- for(f=0, l=pp=line;*pp;pp++) {
+ for(f=0, l=pp=line;*pp;pp++) {
if(f) {
if(isspace(*pp) || (*pp=='"') || (*pp=='<') || (*pp=='>')){
ll = *pp;
@@ -1740,7 +1740,7 @@ PRIVATE void read_article ARGS1 (char *, artID)
l = pp;
f=0;
}
- }
+ }
if(*pp=='<') {
*pp=0;
PUTS(l);
@@ -1777,10 +1777,10 @@ PRIVATE void read_article ARGS1 (char *, artID)
}
}
continue;
- }
+ }
}
PUTS(l);
-#ifdef OLD
+#ifdef OLD
for(f=1,l=pp=line;*pp;pp++){
if(*pp == '<'){
if(strchr(pp,'>')){
@@ -1909,7 +1909,7 @@ PRIVATE void read_list NOARGS
} else {
intr = HTCheckActiveIcon(0);
}
-
+
if (intr) {
HTProgress ("Transfer Interrupted");
return;
@@ -1921,7 +1921,7 @@ PRIVATE void read_list NOARGS
/* Attempt to estimate where we are at in the big list */
if ((m*100/5000) < 100)
HTMeter (m*100/8000,NULL);
- else
+ else
HTMeter (99, "99%");
}
@@ -1943,7 +1943,7 @@ PRIVATE void read_list NOARGS
n = findgroup (group);
if (!LastGroup)
LastGroup = n;
- if (n) {
+ if (n) {
if (LastGroup == n)
lastg = 1;
@@ -1955,9 +1955,9 @@ PRIVATE void read_list NOARGS
}
if (postable == 'y')
n->attribs |= naPOST;
-
- if (n->attribs&naSUBSCRIBED &&
- (newsShowAllGroups || n->unread>0
+
+ if (n->attribs&naSUBSCRIBED &&
+ (newsShowAllGroups || n->unread>0
|| newsShowReadGroups)) {
sprintf(line,"%s % 7ld S %s \n",
(lastg==1)?">>>":" ",
@@ -1965,7 +1965,7 @@ PRIVATE void read_list NOARGS
PUTS (line);
if (lastg==1)
lastg=2;
- }
+ }
} else {
sprintf(line," % 7d U %s \n",
lastattribs |= naSEQUENCED;
}
-
- if (LastGroup == n && (n->unread>0 || newsShowAllGroups))
+
+ if (LastGroup == n && (n->unread>0 || newsShowAllGroups))
lastg = 1;
else if (LastGroup == n)
lastg = 2;
@@ -2023,14 +2023,14 @@ PRIVATE void read_list NOARGS
if (newsShowAllGroups || n->unread>0 || newsShowReadGroups) {
sprintf(line,"%s % 7ld %s %s \n",
(lastg==1)? ">>>":" ",
- n->unread, n->attribs&naSUBSCRIBED?"S":"U",
+ n->unread, n->attribs&naSUBSCRIBED?"S":"U",
n->name, elgroup);
PUTS(line);
l++;
if (lastg == 1)
mark = 1;
lastg--;
- }
+ }
n = nextgroup (n);
}
}
@@ -2081,7 +2081,7 @@ int parsexover(char *x, char **num, char **title, char **from,
*x = 0; /* terminate */
x++; /* bump to start of next field */
*ref = x;
-
+
while(*x && *x != '\t') x++; /* step to next tab */
if(!*x) return 0; /* early end of string - bad record */
*x = 0; /* terminate */
@@ -2141,12 +2141,12 @@ PRIVATE void XBuildArtList ARGS3(
}
GroupFirst = first;
- GroupLast = last;
+ GroupLast = last;
ReadLast = last;
- if (first_required GroupLast))
+ if (first_required GroupLast))
last_required = GroupLast;
if(first_required > last_required) return;
@@ -2155,19 +2155,19 @@ PRIVATE void XBuildArtList ARGS3(
HTInitInput(s);
sprintf(buf, "XOVER %d-%d\r\n", first_required, last_required);
- if(response(buf) != 224) return;
+ if(response(buf) != 224) return;
HTProgress("Threading Articles");
lineinc = count/100;
if(lineinc < 1) lineinc = 1;
-
-
+
+
for(;;){
if(!(Count%lineinc) && count) {
- HTMeter((Count*100)/(count),NULL);
+ HTMeter((Count*100)/(count),NULL);
}
-
+
/* EOS test needed */
for(p = buf;*p = HTGetCharacter();p++){
if(*p=='\r' || *p=='\n'){
@@ -2188,9 +2188,9 @@ PRIVATE void XBuildArtList ARGS3(
art->num = atoi(num);
Count++;
-
+
StrAllocCopy(art->SUBJ, title);
-
+
if(ref[0]){
p = ref;
aref = p;
@@ -2213,7 +2213,7 @@ PRIVATE void XBuildArtList ARGS3(
p--;
}
}
-
+
msgid++; /* Chop < */
msgid[strlen(msgid)-1]=0; /* Chop > */
StrAllocCopy(art->ID, msgid);
@@ -2232,7 +2232,7 @@ PRIVATE void XBuildArtList ARGS3(
}
HTMeter(100,NULL);
-
+
HTProgress("Done Threading Articles");
}
@@ -2274,29 +2274,29 @@ PRIVATE void BuildArtList ARGS3(
}
- if (first_required GroupLast))
+ if ((last_required==0) || (last_required > GroupLast))
last_required = GroupLast;
/* Read newsgroup using individual fields:
*/
- c = 0;
+ c = 0;
artlist = NULL;
if(count){
if(!(artlist = (int *) malloc(sizeof(int) * (count+2))))
outofmem(__FILE__, "BuildArtList");
-
+
if(response("listgroup\r\n") != 211){
/* try XHDR if LISTGROUP fails */
/* thanks to Martin Hamilton for this bit 'o code...
- his choice of header, not mine
+ his choice of header, not mine
*/
sprintf(buffer, "xhdr anarchy-in-the-uk %d-%d\r\n", first, last);
-
+
if(response(buffer) != 221) {
- HTProgress("Cannot get article list from news server");
+ HTProgress("Cannot get article list from news server");
return;
}
}
@@ -2305,7 +2305,7 @@ PRIVATE void BuildArtList ARGS3(
artlist[0]=0;
while(c<(count+2)){
char ch = HTGetCharacter ();
-
+
if (ch==(char)EOF) {
abort_socket(); /* End of file, close socket */
return; /* End of file on response */
@@ -2319,8 +2319,8 @@ PRIVATE void BuildArtList ARGS3(
artlist[c]=0;
} else {
if (isdigit(ch))
- artlist[c] = artlist[c]*10 + ch-'0';
- }
+ artlist[c] = artlist[c]*10 + ch-'0';
+ }
} /* Loop over characters */
}
@@ -2328,29 +2328,29 @@ PRIVATE void BuildArtList ARGS3(
for(i=0;inum = artno;
Count++;
-
+
if(!(Count % 25) ) {
sprintf(buffer, "Threading Article %d of %d",Count,count);
HTProgress (buffer);
}
-
+
if(!ReadFirst || artnoReadLast) ReadLast = artno;
-
+
p = line; /* Write pointer */
done = NO;
while(!done){
@@ -2359,26 +2359,26 @@ PRIVATE void BuildArtList ARGS3(
abort_socket(); /* End of file, close socket */
return; /* End of file on response */
}
-
+
if ((ch == LF) || (p == &line[LINE_LENGTH]) ) {
-
+
*--p=0; /* Terminate & chop LF*/
p = line; /* Restart at beginning */
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "G %s\n", line);
#endif
switch(line[0]) {
-
+
case '.':
done = (line[1]<' '); /* End of article? */
break;
-
+
case 'S':
case 's':
if (match(line, "SUBJECT:"))
StrAllocCopy(art->SUBJ, line+9);/* Save subject */
break;
-
+
case 'R':
case 'r':
if (match(line, "REFERENCES:")) {
@@ -2404,7 +2404,7 @@ PRIVATE void BuildArtList ARGS3(
}
}
break;
-
+
case 'M':
case 'm':
if (match(line, "MESSAGE-ID:")) {
@@ -2413,7 +2413,7 @@ PRIVATE void BuildArtList ARGS3(
StrAllocCopy(art->ID, addr);
}
break;
-
+
case 'f':
case 'F':
if (match(line, "FROM:")) {
@@ -2431,9 +2431,9 @@ PRIVATE void BuildArtList ARGS3(
}
}
break;
-
+
} /* end switch on first character */
-
+
p = line; /* Restart at beginning */
} /* if end of line */
} /* Loop over characters */
@@ -2441,15 +2441,15 @@ PRIVATE void BuildArtList ARGS3(
/* indicate progress! @@@@@@
*/
-
+
} /* If good response */
- } /* Loop over article */
-
+ } /* Loop over article */
+
if(artlist) free(artlist);
-
+
GroupLast = last;
GroupFirst = first;
-
+
HTProgress("Done Threading Articles");
}
@@ -2482,7 +2482,7 @@ PRIVATE void read_group ARGS3(
return;
}
NewsGroupS->attribs |= naUPDATE;
- }
+ }
if (NewsGroup) {
free (NewsGroup);
@@ -2490,19 +2490,19 @@ PRIVATE void read_group ARGS3(
}
if ((f = firstUnreadThread (FirstArt)) == NULL) {
- sprintf (buffer, "\nNo %sarticles in this group.\n",
+ sprintf (buffer, "\nNo %sarticles in this group.\n",
newsShowAllArticles?"":"unread ");
markrangeread (NewsGroupS, NewsGroupS->minart, NewsGroupS->maxart);
PUTS (buffer);
return;
}
-
+
/* Set window title */
START (HTML_TITLE);
sprintf (buffer, "Newsgroup: %s", groupName);
PUTS (buffer);
END (HTML_TITLE);
-
+
/* If !ConfigView then the format is:
@@ -2516,7 +2516,7 @@ PRIVATE void read_group ARGS3(
*/
/* nextUnreadThread determines the next thread to go to.
- it returns the next article in the next thread
+ it returns the next article in the next thread
It looks at a whole bunch of globals to see what the next article
should be ...
*/
@@ -2540,12 +2540,12 @@ PRIVATE void read_group ARGS3(
continue;
i++;
}
- if (!i && !newsShowAllArticles)
+ if (!i && !newsShowAllArticles)
continue;
/* Write summary */
- sprintf (buffer, "%s % 4d %s%s %s\n",
- (mark==1)?">>>":" ", i, art->ID, esubj,
- makespaces(subj,newsSubjWidth),
+ sprintf (buffer, "%s % 4d %s%s %s\n",
+ (mark==1)?">>>":" ", i, art->ID, esubj,
+ makespaces(subj,newsSubjWidth),
efrom);
PUTS (buffer);
if (mark==1)
@@ -2561,9 +2561,9 @@ PRIVATE void read_group ARGS3(
compact_string (art2->FROM, from, newsAuthWidth, 3,3);
escapeString (subj, esubj);
escapeString (from, efrom);
- sprintf (buffer, "%s %s%s %s\n",
- (mark==1)?">>>":" ", art2->ID, esubj,
- makespaces(subj,newsSubjWidth),
+ sprintf (buffer, "%s %s%s %s\n",
+ (mark==1)?">>>":" ", art2->ID, esubj,
+ makespaces(subj,newsSubjWidth),
efrom);
PUTS (buffer);
if (mark==1)
@@ -2594,21 +2594,21 @@ PUBLIC int HTLoadNews ARGS4(
char groupName[GROUP_NAME_LENGTH]; /* Just the group name */
char buf[LINE_LENGTH+1], *p1;
int status; /* tcp return */
- int retries; /* A count of how hard we have tried */
+ int retries; /* A count of how hard we have tried */
BOOL group_wanted; /* Flag: group was asked for, not article */
BOOL list_wanted; /* Flag: group was asked for, not article */
long first, last; /* First and last articles asked for */
-
+
int has_xover;
diagnostic = (format_out == WWW_SOURCE); /* set global flag */
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTNews: Looking for %s\n", arg);
#endif
-
- if (!initialized)
+
+ if (!initialized)
initialized = initialize();
if (!initialized) {
HTProgress ("Could not set up news connection.");
@@ -2616,10 +2616,10 @@ PUBLIC int HTLoadNews ARGS4(
}
/* Pull in the newsrc data if necessary */
- if (newsrc_init (HTNewsHost) != 0) {
+ if (newsrc_init (HTNewsHost) != 0) {
HTProgress ("Not using newsrc data...");
}
-
+
/* Update the preferences so we don't have to make a function call for
every newsShow** resource access.
*/
@@ -2729,9 +2729,9 @@ PUBLIC int HTLoadNews ARGS4(
}
status = response("XOVER\r\n");
- if(status != 500)
- has_xover = 1;
- else
+ if(status != 500)
+ has_xover = 1;
+ else
has_xover = 0;
/* FLUSH!!! */
@@ -2741,7 +2741,7 @@ PUBLIC int HTLoadNews ARGS4(
if (!list_wanted) {
status = response(command);
strcpy (buf, response_text);
- } else {
+ } else {
status = 211;
}
@@ -2749,7 +2749,7 @@ PUBLIC int HTLoadNews ARGS4(
if (www2Trace)
fprintf (stderr, "News: Sent '%s', status %d\n", command, status);
#endif
- if (status < 0)
+ if (status < 0)
break;
if ((status/100) != 2) {
PUTS(response_text);
@@ -2759,12 +2759,12 @@ PUBLIC int HTLoadNews ARGS4(
s = -1;
continue; /* Try again */
}
-
+
/* Load a group, article, etc */
if (list_wanted) {
/* Destroy all the article stuff */
ClearArtList ();
- if (NewsGroupS)
+ if (NewsGroupS)
NewsGroupS = NULL;
if (NewsGroup)
free (NewsGroup);
@@ -2774,21 +2774,21 @@ PUBLIC int HTLoadNews ARGS4(
HTMeter (100,NULL);
HTDoneWithIcon ();
HTProgress ("Rendering newsgroup listing... one moment please");
- } else if (group_wanted){
+ } else if (group_wanted){
int l,h,j;
-
- if(has_xover)
+
+ if(has_xover)
XBuildArtList(groupName, first, last);
- else
+ else
BuildArtList(groupName, first, last);
- if (sscanf (buf, "%d %d %d %d", &j, &j, &l, &h) == 4)
+ if (sscanf (buf, "%d %d %d %d", &j, &j, &l, &h) == 4)
read_group(groupName, l, h);
- else
+ else
read_group(groupName, 0, -1);
HTMeter (100,NULL);
HTDoneWithIcon ();
- } else {
+ } else {
read_article(&command[9]);
HTMeter (100,NULL);
HTDoneWithIcon ();
diff --git a/libwww2/HTNews.h b/libwww2/HTNews.h
index 0fae8ef..fa17e75 100644
--- a/libwww2/HTNews.h
+++ b/libwww2/HTNews.h
@@ -1,6 +1,6 @@
/* Network News Transfer protocol module for the WWW library
HTNEWS
-
+
*/
/* History:
** 26 Sep 90 Written TBL in Objective-C
diff --git a/libwww2/HTParse.c b/libwww2/HTParse.c
index d69ef83..1a73acb 100644
--- a/libwww2/HTParse.c
+++ b/libwww2/HTParse.c
@@ -35,7 +35,7 @@ char * HTStrip(s)
char *s;
#endif
{
-#define SPACE(c) ((c==' ')||(c=='\t')||(c=='\n'))
+#define SPACE(c) ((c==' ')||(c=='\t')||(c=='\n'))
char * p=s;
for(p=s;*p;p++); /* Find end of string */
for(p--;p>=s;p--) {
@@ -73,7 +73,7 @@ PRIVATE void scan(name, parts)
length = strlen(name);
else
length = 0;
-
+
parts->access = 0;
parts->host = 0;
parts->absolute = 0;
@@ -83,7 +83,7 @@ PRIVATE void scan(name, parts)
/* Argh. */
if (!length)
return;
-
+
after_access = name;
for(p=name; *p; p++) {
if (*p==':') {
@@ -94,7 +94,7 @@ PRIVATE void scan(name, parts)
if (*p=='/') break;
if (*p=='#') break;
}
-
+
for(p=name+length-1; p>=name; p--) {
if (*p =='#') {
parts->anchor=p+1;
@@ -113,7 +113,7 @@ PRIVATE void scan(name, parts)
}
} else {
parts->absolute = p+1; /* Root found but no host */
- }
+ }
} else {
parts->relative = (*after_access) ? after_access : 0; /* zero for "" */
}
@@ -125,7 +125,7 @@ PRIVATE void scan(name, parts)
parts->anchor = 0;
}
-} /*scan */
+} /*scan */
/* Parse a Name relative to another name
@@ -160,22 +160,22 @@ char * HTParse(aName, relatedName, wanted)
char * p;
char *access;
struct struct_parts given, related;
-
+
if (!aName)
aName = strdup ("\0");
if (!relatedName)
relatedName = strdup ("\0");
-
+
/* Make working copies of input strings to cut up:
*/
len = strlen(aName)+strlen(relatedName)+10;
result=(char *)malloc(len); /* Lots of space: more than enough */
-
+
StrAllocCopy(name, aName);
StrAllocCopy(rel, relatedName);
-
+
scan(name, &given);
- scan(rel, &related);
+ scan(rel, &related);
result[0]=0; /* Clear string */
access = given.access ? given.access : related.access;
if (wanted & PARSE_ACCESS)
@@ -183,7 +183,7 @@ char * HTParse(aName, relatedName, wanted)
strcat(result, access);
if(wanted & PARSE_PUNCTUATION) strcat(result, ":");
}
-
+
if (given.access && related.access) /* If different, inherit nothing. */
if (strcmp(given.access, related.access)!=0) {
related.host=0;
@@ -191,10 +191,10 @@ char * HTParse(aName, relatedName, wanted)
related.relative=0;
related.anchor=0;
}
-
+
if (wanted & PARSE_HOST)
if(given.host || related.host) {
- char * tail = result + strlen(result);
+ char * tail = result + strlen(result);
if(wanted & PARSE_PUNCTUATION) strcat(result, "//");
strcat(result, given.host ? given.host : related.host);
#define CLEAN_URLS
@@ -204,27 +204,27 @@ char * HTParse(aName, relatedName, wanted)
{
char * p;
p = strchr(tail, ':');
- if (p && access)
+ if (p && access)
{ /* Port specified */
if ((strcmp(access, "http") == 0 && strcmp(p, ":80") == 0) ||
- (strcmp(access, "gopher") == 0 &&
+ (strcmp(access, "gopher") == 0 &&
(strcmp(p, ":70") == 0 ||
strcmp(p, ":70+") == 0)))
*p = (char)0; /* It is the default: ignore it */
else if (p && *p && p[strlen(p)-1] == '+')
p[strlen(p)-1] = 0;
}
- if (!p)
+ if (!p)
p = tail + strlen(tail); /* After hostname */
p--; /* End of hostname */
- if (strlen (tail) > 3 && (*p == '.'))
+ if (strlen (tail) > 3 && (*p == '.'))
{
#ifndef DISABLE_TRACE
if (www2Trace)
fprintf (stderr, "[Parse] tail '%s' p '%s'\n", tail, p);
#endif
*p = (char)0; /* chop final . */
-
+
/* OK, at this point we know that *(p+1) exists,
else we would not be here.
@@ -238,7 +238,7 @@ char * HTParse(aName, relatedName, wanted)
{
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr, "[Parse] Copying '%s' to '%s', %zu bytes\n",
+ fprintf (stderr, "[Parse] Copying '%s' to '%s', %zu bytes\n",
p+1, p, strlen (p+1));
#endif
/*
@@ -268,14 +268,14 @@ char * HTParse(aName, relatedName, wanted)
}
#endif
}
-
+
if (given.host && related.host) /* If different hosts, inherit no path. */
if (strcmp(given.host, related.host)!=0) {
related.absolute=0;
related.relative=0;
related.anchor=0;
}
-
+
if (wanted & PARSE_PATH) {
if(given.absolute) { /* All is given */
if(wanted & PARSE_PUNCTUATION) strcat(result, "/");
@@ -299,7 +299,7 @@ char * HTParse(aName, relatedName, wanted)
strcat(result, "/");
}
}
-
+
if (wanted & PARSE_ANCHOR)
if(given.anchor || related.anchor) {
if(wanted & PARSE_PUNCTUATION) strcat(result, "#");
@@ -309,7 +309,7 @@ char * HTParse(aName, relatedName, wanted)
free(rel);
if (name)
free(name);
-
+
StrAllocCopy(return_value, result);
free(result);
return return_value; /* exactly the right length */
@@ -343,25 +343,25 @@ void HTSimplify(filename)
char * q;
if (filename[0] && filename[1])
{
- for(p=filename+2; *p; p++)
+ for(p=filename+2; *p; p++)
{
- if (*p=='/')
+ if (*p=='/')
{
- if ((p[1]=='.') && (p[2]=='.') && (p[3]=='/' || !p[3] ))
+ if ((p[1]=='.') && (p[2]=='.') && (p[3]=='/' || !p[3] ))
{
/* Changed clause below to (q>filename) due to attempted
read to q = filename-1 below. */
for (q = p-1; (q>filename) && (*q!='/'); q--)
; /* prev slash */
if (q[0]=='/' && 0!=strncmp(q, "/../", 4)
- && !(q-1>filename && q[-1]=='/'))
+ && !(q-1>filename && q[-1]=='/'))
{
strcpy(q, p+3); /* Remove /xxx/.. */
if (!*filename) strcpy(filename, "/");
p = q-1; /* Start again with prev slash */
- }
- }
- else if ((p[1]=='.') && (p[2]=='/' || !p[2]))
+ }
+ }
+ else if ((p[1]=='.') && (p[2]=='/' || !p[2]))
{
strcpy(p, p+2); /* Remove a slash and a dot */
}
@@ -369,7 +369,7 @@ void HTSimplify(filename)
}
}
}
-
+
/* Make Relative Name
** ------------------
@@ -403,7 +403,7 @@ char * HTRelative(aName, relatedName)
WWW_CONST char * path = 0;
WWW_CONST char * last_slash = 0;
int slashes = 0;
-
+
for(;*p; p++, q++) { /* Find extent of match */
if (*p!=*q) break;
if (*p==':') after_access = p+1;
@@ -413,9 +413,9 @@ char * HTRelative(aName, relatedName)
if (slashes==3) path=p;
}
}
-
+
/* q, p point to the first non-matching character or zero */
-
+
if (!after_access) { /* Different access */
StrAllocCopy(result, aName);
} else if (slashes<3){ /* Different nodes */
@@ -431,7 +431,7 @@ char * HTRelative(aName, relatedName)
strcat(result, last_slash+1);
}
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HT: `%s' expressed relative to\n `%s' is\n `%s'.",
aName, relatedName, result);
#endif
@@ -461,7 +461,7 @@ char *HTEscape (char *part)
return NULL;
escaped = (char *)malloc (strlen (part) * 3 + 1);
-
+
for (q = escaped, p = part; *p != '\0'; p++)
{
int c = (int)((unsigned char)(*p));
@@ -476,9 +476,9 @@ char *HTEscape (char *part)
*q++ = HT_HEX(c % 16);
}
}
-
+
*q=0;
-
+
return escaped;
}
@@ -496,7 +496,7 @@ char *HTEscape (char *part)
PRIVATE char from_hex ARGS1(char, c)
{
- return c >= '0' && c <= '9' ? c - '0'
+ return c >= '0' && c <= '9' ? c - '0'
: c >= 'A' && c <= 'F'? c - 'A' + 10
: c - 'a' + 10; /* accept small letters just in case */
}
@@ -516,11 +516,11 @@ PUBLIC char * HTUnEscape ARGS1( char *, str)
p++;
*q++ = ' ';
} else {
- *q++ = *p++;
+ *q++ = *p++;
}
}
-
+
*q++ = 0;
return str;
-
+
} /* HTUnEscape */
diff --git a/libwww2/HTParse.h b/libwww2/HTParse.h
index 6345d13..824e721 100644
--- a/libwww2/HTParse.h
+++ b/libwww2/HTParse.h
@@ -1,9 +1,9 @@
/* HTParse: URL parsing in the WWW Library
HTPARSE
-
+
This module of the WWW library contains code to parse URLs and various related things.
Implemented by HTParse.c .
-
+
*/
#ifndef HTPARSE_H
#define HTPARSE_H
@@ -13,7 +13,7 @@
The following are flag bits which may be ORed together to form a number to give the
'wanted' argument to HTParse.
-
+
*/
#define PARSE_ACCESS 16
#define PARSE_HOST 8
@@ -29,19 +29,19 @@ HTParse: Parse a URL relative to another URL
This returns those parts of a name which are given (and requested) substituting bits
from the related name where necessary.
-
+
ON ENTRY
-
+
aName A filename given
-
+
relatedName A name relative to which aName is to be parsed
-
+
wanted A mask for the bits which are wanted.
-
+
ON EXIT,
-
+
returns A pointer to a malloc'd string which MUST BE FREED
-
+
*/
extern char * HTParse PARAMS((char * aName, char * relatedName, int wanted));
@@ -52,11 +52,11 @@ extern char * HTParse PARAMS((char * aName, char * relatedName, int wanted));
HTStrip: Strip white space off a string
ON EXIT
-
+
Return value points to first non-white character, or to 0 if none.
-
+
All trailing white space is OVERWRITTEN with zero.
-
+
*/
#ifdef __STDC__
extern char * HTStrip(char * s);
@@ -72,7 +72,7 @@ HTSimplify: Simplify a UTL
seqeunce "/./" which may be replaced by "/". Simplification helps us recognize
duplicate filenames. It doesn't deal with soft links, though. The new (shorter)
filename overwrites the old.
-
+
*/
/*
** Thus, /etc/junk/../fred becomes /etc/fred
@@ -91,17 +91,17 @@ HTRelative: Make Relative (Partial) URL
This function creates and returns a string which gives an expression of one address as
related to another. Where there is no relation, an absolute address is retured.
-
+
ON ENTRY,
-
+
Both names must be absolute, fully qualified names of nodes (no anchor bits)
-
+
ON EXIT,
-
+
The return result points to a newly allocated name which, if parsed by HTParse relative
to relatedName, will yield aName. The caller is responsible for freeing the resulting
name later.
-
+
*/
#ifdef __STDC__
extern char * HTRelative(char * aName, char *relatedName);
@@ -117,7 +117,7 @@ HTEscape: Encode unacceptable characters in string
This funtion takes a string containing any sequence of ASCII characters, and returns a
malloced string containing the same infromation but with all "unacceptable" characters
represented in the form %xy where X and Y are two hex digits.
-
+
*/
extern char * HTEscape PARAMS((char * str));
@@ -129,7 +129,7 @@ HTUnEscape: Decode %xx escaped characters
This function takes a pointer to a string in which character smay have been encoded in
%xy form, where xy is the acsii hex code for character 16x+y. The string is converted
in place, as it will never grow.
-
+
*/
extern char * HTUnEscape PARAMS(( char * str));
@@ -140,5 +140,5 @@ extern char * HTUnEscape PARAMS(( char * str));
/*
end of HTParse
-
+
*/
diff --git a/libwww2/HTPasswd.c b/libwww2/HTPasswd.c
index 6a825a9..d00fe40 100644
--- a/libwww2/HTPasswd.c
+++ b/libwww2/HTPasswd.c
@@ -187,7 +187,7 @@ PUBLIC int HTAAFile_readPasswdRec ARGS3(FILE *, fp,
char *, out_password)
{
char terminator;
-
+
terminator = HTAAFile_readField(fp, out_username, MAX_USERNAME_LEN);
if (terminator == EOF) { /* End of file */
@@ -229,7 +229,7 @@ PUBLIC BOOL HTAA_checkPassword ARGS3(WWW_CONST char *, username,
char user[MAX_USERNAME_LEN+1];
char pw[MAX_PASSWORD_LEN+1];
int status;
-
+
if (filename && *filename) fp = fopen(filename,"r");
else fp = fopen(PASSWD_FILE,"r");
@@ -263,7 +263,7 @@ PUBLIC BOOL HTAA_checkPassword ARGS3(WWW_CONST char *, username,
} while (status != EOF);
fclose(fp);
-
+
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "HTAAFile_checkPassword: (%s,%s) %scorrect\n",
username, password, ((status != EOF) ? "" : "in"));
diff --git a/libwww2/HTPasswd.h b/libwww2/HTPasswd.h
index 54ed0d2..5b2e84c 100644
--- a/libwww2/HTPasswd.h
+++ b/libwww2/HTPasswd.h
@@ -1,5 +1,5 @@
/* PASSWORD FILE ROUTINES
-
+
*/
#ifndef HTPASSWD_H
@@ -22,10 +22,10 @@ User Authentication
HTAA_checkPassword(username,password,passwdfile)opens the password file, and checks if
the username-password pair is correct. Return value is YES, if and only if they are
correct. Otherwise, and also if the open fails, returns NO.
-
+
If the given password file name is NULL or an empty string, the default password file
name is used (macro PASSWD_FILE).
-
+
*/
/* PUBLIC HTAA_checkPassword()
diff --git a/libwww2/HTPlain.c b/libwww2/HTPlain.c
index 221375b..550c0de 100644
--- a/libwww2/HTPlain.c
+++ b/libwww2/HTPlain.c
@@ -74,8 +74,8 @@ PRIVATE void HTPlain_free ARGS1(HTStream *, me)
{
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf
- (stderr,
+ fprintf
+ (stderr,
"[HTPlain_free] OK, we're going to decompress HText\n");
#endif
HTCompressedHText (me->text, me->compressed, 1);
@@ -103,13 +103,13 @@ PRIVATE void HTPlain_handle_interrupt ARGS1(HTStream *, me)
** -----------------------
*/
PUBLIC WWW_CONST HTStreamClass HTPlain =
-{
+{
"SocketWriter",
HTPlain_free,
HTPlain_end_document,
HTPlain_put_character, HTPlain_put_string, HTPlain_write,
HTPlain_handle_interrupt
-};
+};
/* New object
@@ -117,18 +117,18 @@ PUBLIC WWW_CONST HTStreamClass HTPlain =
*/
PUBLIC HTStream* HTPlainPresent ARGS5(
HTPresentation *, pres,
- HTParentAnchor *, anchor,
+ HTParentAnchor *, anchor,
HTStream *, sink,
HTFormat, format_in,
int, compressed)
{
HTStream* me = (HTStream*)malloc(sizeof(*me));
- me->isa = &HTPlain;
-
+ me->isa = &HTPlain;
+
#ifndef DISABLE_TRACE
if (www2Trace)
fprintf (stderr, "[HTPlainPresent] here we are; format_in is '%s' and compressed is %d\n", HTAtom_name (format_in), compressed);
-#endif
+#endif
me->text = HText_new();
me->compressed = compressed;
diff --git a/libwww2/HTPlain.h b/libwww2/HTPlain.h
index ca6e64b..6dabfeb 100644
--- a/libwww2/HTPlain.h
+++ b/libwww2/HTPlain.h
@@ -13,7 +13,7 @@
extern HTStream* HTPlainPresent PARAMS((
HTPresentation * pres,
HTParentAnchor * anchor,
- HTStream * sink,
+ HTStream * sink,
HTFormat format_in,
int compressed));
diff --git a/libwww2/HTSort.c b/libwww2/HTSort.c
index cab32f8..f574d0f 100644
--- a/libwww2/HTSort.c
+++ b/libwww2/HTSort.c
@@ -18,7 +18,7 @@ void HTSortInit (void)
size_of_hunk = SIZE_OF_HUNK;
hunk = (char **)malloc (sizeof (char *) * size_of_hunk);
}
-
+
return;
}
@@ -38,7 +38,7 @@ void HTSortAdd (char *str)
expand_hunk ();
hunk[count++] = str;
-
+
return;
}
@@ -49,9 +49,9 @@ static int dsortf (char **s1, char **s2)
void HTSortSort (void)
{
- qsort ((void *)hunk,
- count,
- sizeof (char *),
+ qsort ((void *)hunk,
+ count,
+ sizeof (char *),
(void *)dsortf);
return;
diff --git a/libwww2/HTStream.h b/libwww2/HTStream.h
index b652935..3a2327a 100644
--- a/libwww2/HTStream.h
+++ b/libwww2/HTStream.h
@@ -1,11 +1,11 @@
/* The Stream class definition -- libwww
STREAM OBJECT DEFINITION
-
+
A Stream object is something which accepts a stream of text.
-
+
The creation methods will vary on the type of Stream Object, but
the methods used to write to it and close it are common.
-
+
*/
#ifndef HTSTREAM_H
#define HTSTREAM_H
@@ -20,37 +20,37 @@ typedef struct _HTStream HTStream;
self-explanatory, except for end_document which must be called
before free. It should be merged with free in fact: it should be
dummy for new streams.
-
+
The put_block method was write, but this upset systems whiuch had
macros for write().
-
+
*/
typedef struct _HTStreamClass {
char* name; /* Just for diagnostics */
-
+
void (*free) PARAMS((
HTStream* me));
void (*end_document) PARAMS((
HTStream* me));
-
+
void (*put_character) PARAMS((
HTStream* me,
char ch));
-
+
void (*put_string) PARAMS((
HTStream* me,
char * str));
-
+
void (*put_block) PARAMS((
HTStream* me,
char * str,
int len));
-
+
void (*handle_interrupt) PARAMS((
HTStream* me));
-
+
}HTStreamClass;
#endif /* HTSTREAM_H */
diff --git a/libwww2/HTString.c b/libwww2/HTString.c
index 111b23a..8154a99 100644
--- a/libwww2/HTString.c
+++ b/libwww2/HTString.c
@@ -43,7 +43,7 @@ PUBLIC int strncasecomp ARGS3(WWW_CONST char*,a, WWW_CONST char *,b, int,n)
{
WWW_CONST char *p =a;
WWW_CONST char *q =b;
-
+
for(p=a, q=b;; p++, q++) {
int diff;
if (p == a+n) return 0; /* Match up to n characters */
@@ -111,7 +111,7 @@ PUBLIC char * HTNextField ARGS1(char **, pstr)
{
char * p = *pstr;
char * start; /* start of field */
-
+
while(*p && WHITE(*p)) p++; /* Strip white space */
if (!*p) {
*pstr = p;
diff --git a/libwww2/HTString.h b/libwww2/HTString.h
index 1e7996d..f8d43f2 100644
--- a/libwww2/HTString.h
+++ b/libwww2/HTString.h
@@ -1,8 +1,8 @@
/* String handling for libwww
STRINGS
-
+
Case-independent string comparison and allocations with copies etc
-
+
*/
#ifndef HTSTRING_H
#define HTSTRING_H
@@ -18,7 +18,7 @@ extern WWW_CONST char * HTLibraryVersion; /* String for help screen etc */
Case-insensitive string comparison
The usual routines (comp instead of cmp) had some problem.
-
+
*/
extern int strcasecomp PARAMS((WWW_CONST char *a, WWW_CONST char *b));
extern int strncasecomp PARAMS((WWW_CONST char *a, WWW_CONST char *b, int n));
@@ -45,5 +45,5 @@ extern char * HTNextField PARAMS ((char** pstr));
/*
end
-
+
*/
diff --git a/libwww2/HTTCP.c b/libwww2/HTTCP.c
index a6baff6..1b88798 100644
--- a/libwww2/HTTCP.c
+++ b/libwww2/HTTCP.c
@@ -169,24 +169,24 @@ PUBLIC int HTParseInet ARGS2(SockA *,sin, WWW_CONST char *,str)
struct hostent *phost; /* Pointer to host - See netdb.h */
int numeric_addr;
char *tmp;
-
+
static char *cached_host = NULL;
static char *cached_phost_h_addr = NULL;
static int cached_phost_h_length = 0;
strcpy(host, str); /* Take a copy we can mutilate */
-
- /* Parse port number if present */
- if (port=strchr(host, ':'))
+
+ /* Parse port number if present */
+ if (port=strchr(host, ':'))
{
*port++ = 0; /* Chop off port */
- if (port[0]>='0' && port[0]<='9')
+ if (port[0]>='0' && port[0]<='9')
{
sin->sin_port = htons(atol(port));
}
}
-
- /* Parse host number if present. */
+
+ /* Parse host number if present. */
numeric_addr = 1;
for (tmp = host; *tmp; tmp++)
{
@@ -197,13 +197,13 @@ PUBLIC int HTParseInet ARGS2(SockA *,sin, WWW_CONST char *,str)
goto found_non_numeric_or_done;
}
}
-
+
found_non_numeric_or_done:
- if (numeric_addr)
+ if (numeric_addr)
{ /* Numeric node address: */
sin->sin_addr.s_addr = inet_addr(host); /* See arpa/inet.h */
- }
- else
+ }
+ else
{ /* Alphanumeric node name: */
if (cached_host && (strcmp (cached_host, host) == 0))
{
@@ -220,12 +220,12 @@ PUBLIC int HTParseInet ARGS2(SockA *,sin, WWW_CONST char *,str)
fprintf (stderr, "=+= Fetching on '%s'\n", host);
#endif
phost = gethostbyname (host);
- if (!phost)
+ if (!phost)
{
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf
- (stderr,
+ (stderr,
"HTTPAccess: Can't find internet node name `%s'.\n",host);
#endif
return -1; /* Fail? */
@@ -253,10 +253,10 @@ PUBLIC int HTParseInet ARGS2(SockA *,sin, WWW_CONST char *,str)
memcpy(&sin->sin_addr, phost->h_addr, phost->h_length);
}
}
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
- fprintf(stderr,
+ if (www2Trace)
+ fprintf(stderr,
"TCP: Parsed address as port %d, IP address %d.%d.%d.%d\n",
(int)ntohs(sin->sin_port),
(int)*((unsigned char *)(&sin->sin_addr)+0),
@@ -264,7 +264,7 @@ PUBLIC int HTParseInet ARGS2(SockA *,sin, WWW_CONST char *,str)
(int)*((unsigned char *)(&sin->sin_addr)+2),
(int)*((unsigned char *)(&sin->sin_addr)+3));
#endif
-
+
return 0; /* OK */
}
@@ -289,7 +289,7 @@ PRIVATE void get_host_details()
struct hostent * phost; /* Pointer to host -- See netdb.h */
#endif
int namelength = sizeof(name);
-
+
if (hostname) return; /* Already done */
gethostname(name, namelength); /* Without domain */
@@ -305,7 +305,7 @@ PRIVATE void get_host_details()
phost=gethostbyname(name); /* See netdb.h */
if (!phost) {
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
+ if (www2Trace) fprintf(stderr,
"TCP: Can't find my own internet node address for `%s'!!\n",
name);
#endif
@@ -344,7 +344,7 @@ PUBLIC int HTDoConnect (char *url, char *protocol, int default_port, int *s)
/* Set up defaults: */
sin->sin_family = AF_INET;
sin->sin_port = htons(default_port);
-
+
/* Get node name and optional port number: */
{
char line[256];
@@ -355,7 +355,7 @@ PUBLIC int HTDoConnect (char *url, char *protocol, int default_port, int *s)
HTProgress (line);
status = HTParseInet(sin, p1);
- if (status)
+ if (status)
{
sprintf (line, "Unable to locate remote host %s.", p1);
HTProgress(line);
@@ -368,7 +368,7 @@ PUBLIC int HTDoConnect (char *url, char *protocol, int default_port, int *s)
free (p1);
}
- /* Now, let's get a socket set up from the server for the data: */
+ /* Now, let's get a socket set up from the server for the data: */
*s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
#ifdef SOCKS
@@ -403,7 +403,7 @@ PUBLIC int HTDoConnect (char *url, char *protocol, int default_port, int *s)
int ret;
int val = 1;
char line[256];
-
+
ret = ioctl(*s, FIONBIO, &val);
if (ret == -1)
{
@@ -452,11 +452,11 @@ PUBLIC int HTDoConnect (char *url, char *protocol, int default_port, int *s)
{
fd_set writefds;
int intr;
-
+
FD_ZERO(&writefds);
FD_SET(*s, &writefds);
- /* linux (and some other os's, I think) clear timeout...
+ /* linux (and some other os's, I think) clear timeout...
let's reset it every time. bjs */
timeout.tv_sec = 0;
timeout.tv_usec = 100000;
@@ -539,7 +539,7 @@ PUBLIC int HTDoConnect (char *url, char *protocol, int default_port, int *s)
int ret;
int val = 0;
char line[256];
-
+
ret = ioctl(*s, FIONBIO, &val);
if (ret == -1)
{
@@ -574,7 +574,7 @@ int HTDoRead (int fildes, void *buf, unsigned nbyte)
FD_ZERO(&readfds);
FD_SET(fildes, &readfds);
- /* linux (and some other os's, I think) clear timeout...
+ /* linux (and some other os's, I think) clear timeout...
let's reset it every time. bjs */
timeout.tv_sec = 0;
timeout.tv_usec = 100000;
diff --git a/libwww2/HTTCP.h b/libwww2/HTTCP.h
index 5835f74..6593b04 100644
--- a/libwww2/HTTCP.h
+++ b/libwww2/HTTCP.h
@@ -1,8 +1,8 @@
/* /Net/dxcern/userd/timbl/hypertext/WWW/Library/src/HTTCP.html
GENERIC TCP/IP COMMUNICATION
-
+
This module has the common code for handling TCP/IP connections etc.
-
+
*/
#ifndef HTTCP_H
#define HTTCP_H
diff --git a/libwww2/HTTP.c b/libwww2/HTTP.c
index 69b40c6..437ca1a 100644
--- a/libwww2/HTTP.c
+++ b/libwww2/HTTP.c
@@ -46,7 +46,7 @@ char **extra_headers=NULL;
#define _LIBWWW2
#include "../src/kcms.h"
-struct _HTStream
+struct _HTStream
{
HTStreamClass * isa;
};
@@ -121,7 +121,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
BOOL extensions; /* Assume good HTTP server */
int compressed;
char line[2048]; /* bumped up to cover Kerb huge headers */
-
+
int length, doing_redirect, rv;
int already_retrying = 0;
int return_nothing;
@@ -139,13 +139,13 @@ PUBLIC int HTLoadHTTP ARGS4 (
HTProgress ("Bad request.");
goto done;
}
- if (!*arg)
+ if (!*arg)
{
status = -2;
HTProgress ("Bad request.");
goto done;
}
-
+
sprintf(crlf, "%c%c", CR, LF);
/* At this point, we're talking HTTP/1.0. */
@@ -164,20 +164,20 @@ PUBLIC int HTLoadHTTP ARGS4 (
line_kept_clean = NULL;
return_nothing = 0;
- /* okay... addr looks like http://hagbard.ncsa.uiuc.edu/blah/etc.html
+ /* okay... addr looks like http://hagbard.ncsa.uiuc.edu/blah/etc.html
lets crop it at the 3rd '/' */
- for(p = arg,i=0;*p && i!=3;p++)
+ for(p = arg,i=0;*p && i!=3;p++)
if(*p=='/') i++;
- if(i==3)
+ if(i==3)
i = p-arg; /* i = length not counting last '/' */
- else
+ else
i = 0;
if((lsocket != -1) && i && addr && !strncmp(addr,arg,i)){
/* keepalive is active and addresses match -- try the old socket */
s = lsocket;
- keepingalive = 1; /* flag in case of network error due to server timeout*/
+ keepingalive = 1; /* flag in case of network error due to server timeout*/
lsocket = -1; /* prevent looping on failure */
#ifndef DISABLE_TRACE
if (www2Trace)
@@ -229,18 +229,18 @@ PUBLIC int HTLoadHTTP ARGS4 (
}
if (status < 0) {
#ifndef DISABLE_TRACE
- if (www2Trace)
- fprintf(stderr,
+ if (www2Trace)
+ fprintf(stderr,
"HTTP: Unable to connect to remote host for `%s' (errno = %d).\n", arg, errno);
#endif
HTProgress ("Unable to connect to remote host.");
status = HT_NO_DATA;
goto done;
- }
+ }
}
/* Ask that node for the document,
** omitting the host name & anchor
- */
+ */
{
char * p1 = HTParse(arg, "", PARSE_PATH|PARSE_PUNCTUATION);
command = malloc(5 + strlen(p1)+ 2 + 31);
@@ -267,15 +267,15 @@ PUBLIC int HTLoadHTTP ARGS4 (
strcat(command, p1);
free(p1);
}
- if (extensions)
+ if (extensions)
{
strcat(command, " ");
strcat(command, HTTP_VERSION);
}
-
+
strcat(command, crlf); /* CR LF, as in rfc 977 */
- if (extensions)
+ if (extensions)
{
#ifdef SAM_NOT_YET
/* SAM This produces an absolutely huge Accept: line. While
@@ -311,10 +311,10 @@ PUBLIC int HTLoadHTTP ARGS4 (
env_length+=strlen(line);
}
- for(i=0; irep_out == WWW_PRESENT)
+ if (pres->rep_out == WWW_PRESENT)
{
sprintf(line, " %s,",HTAtom_name(pres->rep));
env_length+=strlen(line);
@@ -353,7 +353,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
}
/*This is just used for "not" sending this header on a proxy request*/
- if (useKeepAlive) {
+ if (useKeepAlive) {
sprintf(line, "Connection: keep-alive%c%c", CR, LF);
StrAllocCat(command, line);
}
@@ -435,24 +435,24 @@ PUBLIC int HTLoadHTTP ARGS4 (
char *colon;
int portnumber;
char *auth;
-
+
docname = HTParse(arg, "", PARSE_PATH);
hostname = HTParse(arg, "", PARSE_HOST);
if (hostname &&
- NULL != (colon = strchr(hostname, ':')))
+ NULL != (colon = strchr(hostname, ':')))
{
*(colon++) = '\0'; /* Chop off port number */
portnumber = atoi(colon);
}
else portnumber = 80;
-
- if (NULL!=(auth=HTAA_composeAuth(hostname, portnumber, docname)))
+
+ if (NULL!=(auth=HTAA_composeAuth(hostname, portnumber, docname)))
{
sprintf(line, "%s%c%c", auth, CR, LF);
StrAllocCat(command, line);
}
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
{
if (auth)
fprintf(stderr, "HTTP: Sending authorization: %s\n", auth);
@@ -485,9 +485,9 @@ PUBLIC int HTLoadHTTP ARGS4 (
content_length, CR, LF);
StrAllocCat(command, line);
}
-
+
StrAllocCat(command, crlf); /* Blank line means "end" */
-
+
if (post_data)
StrAllocCat(command, post_data);
else
@@ -551,7 +551,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
#endif
free (command);
- if (status <= 0)
+ if (status <= 0)
{
if (status == 0)
{
@@ -561,7 +561,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
#endif
/* Do nothing. */
}
- else if
+ else if
((errno == ENOTCONN || errno == ECONNRESET || errno == EPIPE) &&
!already_retrying &&
/* Don't retry if we're posting. */ !do_post)
@@ -569,8 +569,8 @@ PUBLIC int HTLoadHTTP ARGS4 (
/* Arrrrgh, HTTP 0/1 compability problem, maybe. */
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf
- (stderr,
+ fprintf
+ (stderr,
"HTTP: BONZO ON WRITE Trying again with HTTP0 request.\n");
#endif
/*
@@ -601,7 +601,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
goto done;
}
}
-
+
#ifndef DISABLE_TRACE
if (www2Trace)
fprintf (stderr, "HTTP: WRITE delivered OK\n");
@@ -616,15 +616,15 @@ PUBLIC int HTLoadHTTP ARGS4 (
/* Get numeric status etc */
BOOL end_of_file = NO;
int buffer_length = INIT_LINE_SIZE;
-
+
line_buffer = (char *) malloc(buffer_length * sizeof(char));
-
+
do {
/* Loop to read in the first line */
/* Extend line buffer if necessary for those crazy WAIS URLs ;-) */
if (buffer_length - length < LINE_EXTEND_THRESH) {
buffer_length = buffer_length + buffer_length;
- line_buffer =
+ line_buffer =
(char *) realloc(line_buffer, buffer_length * sizeof(char));
}
#ifndef DISABLE_TRACE
@@ -639,7 +639,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
fprintf (stderr, "HTTP: Read %d\n", status);
#endif
if (status <= 0) {
- /* Retry if we get nothing back too;
+ /* Retry if we get nothing back too;
bomb out if we get nothing twice. */
if (status == HT_INTERRUPTED) {
#ifndef DISABLE_TRACE
@@ -650,8 +650,8 @@ PUBLIC int HTLoadHTTP ARGS4 (
status = HT_INTERRUPTED;
NETCLOSE (s);
goto clean_up;
- } else
- if
+ } else
+ if
(status < 0 &&
(errno == ENOTCONN || errno == ECONNRESET || errno == EPIPE)
&& !already_retrying && !do_post)
@@ -662,11 +662,11 @@ PUBLIC int HTLoadHTTP ARGS4 (
fprintf (stderr, "HTTP: BONZO Trying again with HTTP0 request.\n");
#endif
NETCLOSE(s);
- if (line_buffer)
+ if (line_buffer)
free(line_buffer);
- if (line_kept_clean)
+ if (line_kept_clean)
free(line_kept_clean);
-
+
extensions = NO;
already_retrying = 1;
HTProgress ("Retrying as HTTP0 request.");
@@ -684,9 +684,9 @@ PUBLIC int HTLoadHTTP ARGS4 (
if (www2Trace)
fprintf (stderr, "HTTP: Hit unexpected network read error; aborting connection; status %d.\n", status);
#endif
- HTProgress
+ HTProgress
("Unexpected network read error; connection aborted.");
-
+
NETCLOSE (s);
status = -1;
goto clean_up;
@@ -699,13 +699,13 @@ PUBLIC int HTLoadHTTP ARGS4 (
sprintf (line, "Read %d bytes of data.", bytes_already_read);
HTProgress (line);
}
-
+
if (status == 0) {
end_of_file = YES;
break;
}
line_buffer[length+status] = 0;
-
+
if (line_buffer) {
if (line_kept_clean)
free (line_kept_clean);
@@ -715,16 +715,16 @@ PUBLIC int HTLoadHTTP ARGS4 (
*/
memcpy (line_kept_clean, line_buffer, buffer_length);
}
-
+
eol = strchr(line_buffer + length, LF);
/* Do we *really* want to do this? */
- if (eol && eol != line_buffer && *(eol-1) == CR)
- *(eol-1) = ' ';
-
+ if (eol && eol != line_buffer && *(eol-1) == CR)
+ *(eol-1) = ' ';
+
length = length + status;
-
+
/* Do we really want to do *this*? */
- if (eol)
+ if (eol)
*eol = 0; /* Terminate the line */
/* All we need is the first line of the response. If it's a HTTP/1.0
response, then the first line will be absurdly short and therefore
@@ -733,8 +733,8 @@ PUBLIC int HTLoadHTTP ARGS4 (
/* Well, let's try 100. */
} while (!eol && !end_of_file && bytes_already_read < 100);
} /* Scope of loop variables */
-
-
+
+
/* We now have a terminated unfolded line. Parse it.
** -------------------------------------------------
*/
@@ -742,7 +742,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
if (www2Trace)
fprintf(stderr, "HTTP: Rx: %s\n", line_buffer);
#endif
-
+
{
int fields;
char server_version[VERSION_LENGTH+1];
@@ -752,11 +752,11 @@ PUBLIC int HTLoadHTTP ARGS4 (
statusError=0;
server_version[0] = 0;
-
+
fields = sscanf(line_buffer, "%20s %d",
server_version,
&server_status);
-
+
#ifndef DISABLE_TRACE
if (www2Trace)
fprintf (stderr, "HTTP: Scanned %d fields from line_buffer\n", fields);
@@ -765,13 +765,13 @@ PUBLIC int HTLoadHTTP ARGS4 (
if (www2Trace)
fprintf (stderr, "HTTP: line_buffer '%s'\n", line_buffer);
#endif
-
+
/* Rule out HTTP/1.0 reply as best we can. */
if (fields < 2 || !server_version[0] || server_version[0] != 'H' ||
server_version[1] != 'T' || server_version[2] != 'T' ||
server_version[3] != 'P' || server_version[4] != '/' ||
- server_version[6] != '.')
- {
+ server_version[6] != '.')
+ {
/* HTTP0 reply */
HTAtom * encoding;
@@ -779,11 +779,11 @@ PUBLIC int HTLoadHTTP ARGS4 (
if (www2Trace)
fprintf (stderr, "--- Talking HTTP0.\n");
#endif
-
+
format_in = HTFileFormat(arg, &encoding, WWW_HTML, &compressed);
start_of_data = line_kept_clean;
- }
- else
+ }
+ else
{
/* Decode full HTTP response */
format_in = HTAtom_for("www/mime");
@@ -793,21 +793,21 @@ PUBLIC int HTLoadHTTP ARGS4 (
length or anything else in this situation. */
start_of_data = eol ? eol + 1 : "";
length = eol ? length - (start_of_data - line_buffer) : 0;
-
+
#ifndef DISABLE_TRACE
if (www2Trace)
fprintf (stderr, "--- Talking HTTP1.\n");
#endif
- switch (server_status / 100)
+ switch (server_status / 100)
{
case 3: /* Various forms of redirection */
/* We now support this in the parser, at least. */
doing_redirect = 1;
break;
-
+
case 4: /* "I think I goofed" */
- switch (server_status)
+ switch (server_status)
{
case 403:
statusError=1;
@@ -816,27 +816,27 @@ PUBLIC int HTLoadHTTP ARGS4 (
case 401:
/* length -= start_of_data - text_buffer; */
- if (HTAA_shouldRetryWithAuth(start_of_data, length, s))
+ if (HTAA_shouldRetryWithAuth(start_of_data, length, s))
{
(void)NETCLOSE(s);
lsocket = -1;
- if (line_buffer)
+ if (line_buffer)
free(line_buffer);
- if (line_kept_clean)
+ if (line_kept_clean)
free(line_kept_clean);
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "%s %d %s\n",
"HTTP: close socket", s,
"to retry with Access Authorization");
#endif
-
+
HTProgress ("Retrying with access authorization information.");
goto try_again;
break;
}
- else
+ else
{
statusError=1;
/* Fall through. */
@@ -851,7 +851,7 @@ PUBLIC int HTLoadHTTP ARGS4 (
case 5: /* I think you goofed */
statusError=1;
break;
-
+
case 2: /* Good: Got MIME object */
switch (server_status)
{
@@ -877,13 +877,13 @@ PUBLIC int HTLoadHTTP ARGS4 (
break;
}
break;
-
+
default: /* bad number */
statusError=1;
HTAlert("Unknown status reply from server!");
break;
} /* Switch on server_status/100 */
-
+
} /* Full HTTP reply */
} /* scope of fields */
@@ -892,8 +892,8 @@ PUBLIC int HTLoadHTTP ARGS4 (
format_out,
compressed,
sink, anAnchor);
-
- if (!target)
+
+ if (!target)
{
char buffer[1024]; /* @@@@@@@@ */
sprintf(buffer, "Sorry, no known way of converting %s to %s.",
@@ -943,9 +943,9 @@ PUBLIC int HTLoadHTTP ARGS4 (
#endif
/* Recycle the first chunk of data, in all cases. */
(*target->isa->put_block)(target, start_of_data, length);
-
+
/* Go pull the bulk of the data down. */
- /* if we dont use length, header length is wrong due to the
+ /* if we dont use length, header length is wrong due to the
discarded first line - bjs*/
rv = HTCopy(s, target, length /*bytes_already_read*/);
if (rv == -1)
@@ -966,11 +966,11 @@ PUBLIC int HTLoadHTTP ARGS4 (
/* May as well consider it an interrupt -- right? */
(*target->isa->handle_interrupt) (target);
NETCLOSE(s);
- if (line_buffer)
+ if (line_buffer)
free(line_buffer);
- if (line_kept_clean)
+ if (line_kept_clean)
free(line_kept_clean);
-
+
extensions = NO;
already_retrying = 1;
HTProgress ("Retrying as HTTP0 request.");
@@ -1027,11 +1027,11 @@ PUBLIC int HTLoadHTTP ARGS4 (
/* Clean up
*/
-
- clean_up:
- if (line_buffer)
+
+ clean_up:
+ if (line_buffer)
free(line_buffer);
- if (line_kept_clean)
+ if (line_kept_clean)
free(line_kept_clean);
done:
diff --git a/libwww2/HTTelnet.c b/libwww2/HTTelnet.c
index 02f6a4b..dbb6dcc 100644
--- a/libwww2/HTTelnet.c
+++ b/libwww2/HTTelnet.c
@@ -163,14 +163,14 @@ PRIVATE int remote_session ARGS2(char *, access, char *, host)
if (!access || !host)
{
- application_user_feedback
+ application_user_feedback
("Cannot open remote session, because\nURL is malformed.\0");
return HT_NO_DATA;
}
login_protocol =
strcmp(access, "rlogin") == 0 ? rlogin :
- strcmp(access, "tn3270") == 0 ? tn3270 :
+ strcmp(access, "tn3270") == 0 ? tn3270 :
telnet;
/* Make sure we won't overrun the size of command with a huge host string */
@@ -178,21 +178,21 @@ PRIVATE int remote_session ARGS2(char *, access, char *, host)
{
host[200] = '\0';
}
-
+
user = host;
hostname = strchr(host, '@');
port = strchr(host, ':');
-
- if (hostname)
+
+ if (hostname)
{
*hostname++ = 0; /* Split */
- }
- else
+ }
+ else
{
hostname = host;
user = 0; /* No user specified */
}
- if (port)
+ if (port)
{
*port++ = 0; /* Split */
portnum = atoi(port);
@@ -204,9 +204,9 @@ PRIVATE int remote_session ARGS2(char *, access, char *, host)
*/
make_system_secure(user);
make_system_secure(hostname);
-
+
xterm_str = global_xterm_str;
-
+
if (login_protocol == rlogin)
{
/* For rlogin, we should use -l user. */
@@ -241,12 +241,12 @@ PRIVATE int remote_session ARGS2(char *, access, char *, host)
hostname);
}
}
-
+
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "HTaccess: Command is: %s\n", command);
#endif
run_a_command(command);
-
+
/* No need for application feedback if we're rlogging directly
in... */
if (user && login_protocol != rlogin)
@@ -258,7 +258,7 @@ PRIVATE int remote_session ARGS2(char *, access, char *, host)
sprintf (str, "When you are connected, log in as '%s'.", user);
application_user_feedback (str);
}
-
+
return HT_NO_DATA; /* Ok - it was done but no data */
}
@@ -286,21 +286,21 @@ ARGS4
)
{
char * access;
-
+
char * host;
int status;
-
- if (sink)
+
+ if (sink)
{
HTAlert("Can't output a live session -- it has to be interactive");
return HT_NO_ACCESS;
}
access = HTParse(addr, "file:", PARSE_ACCESS);
-
+
host = HTParse(addr, "", PARSE_HOST);
status = remote_session(access, host);
- free(host);
+ free(host);
free(access);
return status;
}
diff --git a/libwww2/HTTelnet.h b/libwww2/HTTelnet.h
index 8aa1924..7387a2b 100644
--- a/libwww2/HTTelnet.h
+++ b/libwww2/HTTelnet.h
@@ -1,6 +1,6 @@
/* /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/HTTelnet.html
TELNET AND SIMILAR ACCESS METHODS
-
+
*/
#ifndef HTTELNET_H
diff --git a/libwww2/HTUU.c b/libwww2/HTUU.c
index 7f26550..1a34639 100644
--- a/libwww2/HTUU.c
+++ b/libwww2/HTUU.c
@@ -109,7 +109,7 @@ PUBLIC int HTUU_encode ARGS3(unsigned char *, bufin,
*
* Decode an ASCII-encoded buffer back to its original binary form.
*
- * Entry bufcoded points to a uuencoded string. It is
+ * Entry bufcoded points to a uuencoded string. It is
* terminated by any character not in
* the printable character table six2pr, but
* leading whitespace is stripped.
@@ -184,7 +184,7 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded,
}
bufin = (unsigned char *) bufcoded;
-
+
while (nprbytes > 0) {
*(bufout++) = (unsigned char) (DEC(*bufin) << 2 | DEC(bufin[1]) >> 4);
*(bufout++) = (unsigned char) (DEC(bufin[1]) << 4 | DEC(bufin[2]) >> 2);
@@ -192,7 +192,7 @@ PUBLIC int HTUU_decode ARGS3(char *, bufcoded,
bufin += 4;
nprbytes -= 4;
}
-
+
if(nprbytes & 03) {
if(pr2six[bufin[-2]] > MAXVAL) {
nbytesdecoded -= 2;
diff --git a/libwww2/HTUU.h b/libwww2/HTUU.h
index de461fb..f06dd24 100644
--- a/libwww2/HTUU.h
+++ b/libwww2/HTUU.h
@@ -1,11 +1,11 @@
/* ENCODING TO PRINTABLE CHARACTERS
-
+
File module provides functions HTUU_encode() and HTUU_decode() which convert a buffer
of bytes to/from RFC 1113 printable encoding format. This technique is similar to the
familiar Unix uuencode format in that it maps 6 binary bits to one ASCII character (or
more aptly, 3 binary bytes to 4 ASCII characters). However, RFC 1113 does not use the
same mapping to printable characters as uuencode.
-
+
*/
#ifndef HTUU_H
diff --git a/libwww2/HTUtils.h b/libwww2/HTUtils.h
index 74f0e5f..a7b970c 100644
--- a/libwww2/HTUtils.h
+++ b/libwww2/HTUtils.h
@@ -1,16 +1,16 @@
/* Utitlity macros for the W3 code library
MACROS FOR GENERAL USE
-
+
Generates: HTUtils.h
-
+
See also: the system dependent file "tcp.h"
-
+
*/
#ifndef DEBUG
#define DEBUG /* Noone ever turns this off as trace is too important */
#endif /* Keeep option for really small memory applications tho */
-
+
#ifndef HTUTILS_H
#define HTUTILS_H
@@ -154,8 +154,8 @@ Macros for declarations
t a; u b; v c; w d; x e; y f; z g; s h; r i;
#define ARGS10(t,a,u,b,v,c,w,d,x,e,y,f,z,g,s,h,r,i,q,j) (a,b,c,d,e,f,g,h,i,j) \
t a; u b; v c; w d; x e; y f; z g; s h; r i; q j;
-
-
+
+
#endif /* __STDC__ (ANSI) */
#ifndef NULL
@@ -248,7 +248,7 @@ Upper- and Lowercase macros
The problem here is that toupper(x) is not defined officially unless isupper(x) is.
These macros are CERTAINLY needed on #if defined(pyr) || define(mips) or BDSI
platforms. For safefy, we make them mandatory.
-
+
*/
#include
diff --git a/libwww2/HTWAIS.c b/libwww2/HTWAIS.c
index 9ffdfc4..0549997 100644
--- a/libwww2/HTWAIS.c
+++ b/libwww2/HTWAIS.c
@@ -14,8 +14,8 @@
** History
** Sep 91 TBL adapted shell-ui.c (BK) with HTRetrieve.c from WWW.
** Feb 91 TBL Generated HTML cleaned up a bit (quotes, escaping)
-** Refers to lists of sources.
-** Mar 93 TBL Lib 2.0 compatible module made.
+** Refers to lists of sources.
+** Mar 93 TBL Lib 2.0 compatible module made.
**
** Bugs
** Uses C stream i/o to read and write sockets, which won't work
@@ -69,7 +69,7 @@
#include "HTML.h" /* The object we will generate */
#include "HTFile.h"
#include "HTAlert.h"
-
+
/* #include "ParseWSRC.h" */
#ifndef DISABLE_TRACE
@@ -143,7 +143,7 @@ PRIVATE BOOL acceptable_inited = NO;
PRIVATE void init_acceptable NOARGS
{
unsigned int i;
- char * good =
+ char * good =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./-_$";
for(i=0; i<256; i++) acceptable[i] = NO;
for(;*good; good++) acceptable[(unsigned int)*good] = YES;
@@ -196,11 +196,11 @@ PRIVATE char * WWW_from_WAIS ARGS1(any *, docid)
char * p = (docid->bytes);
int i, l;
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
{
char *p;
fprintf(stderr, "WAIS id (%d bytes) is ", (int)docid->size);
- for (p = docid->bytes; p < docid->bytes + docid->size; p++)
+ for (p = docid->bytes; p < docid->bytes + docid->size; p++)
{
if ((*p >= ' ') && (*p<= '~')) /* Assume ASCII! */
fprintf(stderr, "%c", *p);
@@ -208,12 +208,12 @@ PRIVATE char * WWW_from_WAIS ARGS1(any *, docid)
fprintf(stderr, "<%x>", (unsigned)*p);
}
fprintf(stderr, "\n");
- }
+ }
#endif
- for (p = docid->bytes;
- (p < docid->bytes+docid->size) &&
- (q < &buf[BIG]);)
+ for (p = docid->bytes;
+ (p < docid->bytes+docid->size) &&
+ (q < &buf[BIG]);)
{
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, " Record type %d, length %d\n",
@@ -235,10 +235,10 @@ PRIVATE char * WWW_from_WAIS ARGS1(any *, docid)
l = l + (int)((unsigned char)*p);
p++;
}
-
+
for (i = 0; i < l; i++, p++)
{
- if (!acceptable[(unsigned char)*p])
+ if (!acceptable[(unsigned char)*p])
{
*q++ = HEX_ESCAPE;
*q++ = hex[((unsigned char)*p) >> 4];
@@ -250,8 +250,8 @@ PRIVATE char * WWW_from_WAIS ARGS1(any *, docid)
}
*q++ = 0; /* Terminate string */
#ifndef DISABLE_TRACE
- if (www2Trace)
- fprintf(stderr, "WWW form of id: %s\n", buf);
+ if (www2Trace)
+ fprintf(stderr, "WWW form of id: %s\n", buf);
#endif
{
@@ -282,40 +282,40 @@ PRIVATE any * WAIS_from_WWW ARGS2 (any *, docid, char *, docname)
int n; /* size */
#ifndef DISABLE_TRACE
- if (www2Trace)
- fprintf(stderr, "WWW id (to become WAIS id): %s\n", docname);
+ if (www2Trace)
+ fprintf(stderr, "WWW id (to become WAIS id): %s\n", docname);
#endif
- for(n=0, p = docname; *p; p++)
+ for(n=0, p = docname; *p; p++)
{ /* Count sizes of strings */
n++;
if (*p == ';') n--; /* Not converted */
else if (*p == HEX_ESCAPE) n=n-2; /* Save two bytes */
docid->size = n;
}
-
+
docid->bytes = (char *) malloc(docid->size + 32); /* result record */
z = docid->bytes;
-
- for(p = docname; *p; )
+
+ for(p = docname; *p; )
{
q = strchr(p, '=');
- if (!q)
+ if (!q)
return 0;
*q = '\0';
*z++ = atoi(p);
*q = '=';
s = strchr(q, ';'); /* (Check only) */
- if (!s)
+ if (!s)
return 0; /* Bad! No ';'; */
sor = z; /* Remember where the size field was */
z++; /* Skip record size for now */
-
+
{
int len;
int tmp;
- for(p=q+1; *p!=';' ; )
+ for(p=q+1; *p!=';' ; )
{
- if (*p == HEX_ESCAPE)
+ if (*p == HEX_ESCAPE)
{
char c;
unsigned int b;
@@ -323,17 +323,17 @@ PRIVATE any * WAIS_from_WWW ARGS2 (any *, docid, char *, docname)
c = *p++;
b = from_hex(c);
c = *p++;
- if (!c)
+ if (!c)
break; /* Odd number of chars! */
*z++ = (b<<4) + from_hex(c);
- }
- else
+ }
+ else
{
*z++ = *p++; /* Record */
}
}
len = (z-sor-1);
-
+
z = sor;
if (len > 127)
{
@@ -349,10 +349,10 @@ PRIVATE any * WAIS_from_WWW ARGS2 (any *, docid, char *, docname)
}
z++;
}
-
- for(p=q+1; *p!=';' ; )
+
+ for(p=q+1; *p!=';' ; )
{
- if (*p == HEX_ESCAPE)
+ if (*p == HEX_ESCAPE)
{
char c;
unsigned int b;
@@ -360,20 +360,20 @@ PRIVATE any * WAIS_from_WWW ARGS2 (any *, docid, char *, docname)
c = *p++;
b = from_hex(c);
c = *p++;
- if (!c)
+ if (!c)
break; /* Odd number of chars! */
*z++ = (b<<4) + from_hex(c);
- }
- else
+ }
+ else
{
*z++ = *p++; /* Record */
}
}
p++; /* After semicolon: start of next record */
}
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
{
char *p;
fprintf(stderr, "WAIS id (%d bytes) is ", (int)docid->size);
@@ -384,10 +384,10 @@ PRIVATE any * WAIS_from_WWW ARGS2 (any *, docid, char *, docname)
fprintf(stderr, "<%x>", (unsigned)*p);
}
fprintf(stderr, "\n");
- }
+ }
#endif
return docid; /* Ok */
-
+
} /* WAIS_from_WWW */
@@ -406,7 +406,7 @@ PRIVATE void output_text_record ARGS3(
on unsigned char from the start. What was he thinking??? */
PUTBLOCK((unsigned char *)record->DocumentText->bytes,
record->DocumentText->size);
- }
+ }
} /* output text record */
@@ -435,9 +435,9 @@ display_search_response ARGS4(
}
archie = strstr(database, "archie")!=0; /* Specical handling */
-
+
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTWAIS: Displaying search response\n");
#endif
#ifndef DISABLE_TRACE
@@ -463,7 +463,7 @@ display_search_response ARGS4(
if ( response->DatabaseDiagnosticRecords != 0 ) {
info = (WAISSearchResponse *)response->DatabaseDiagnosticRecords;
- i =0;
+ i =0;
if (info->Diagnostics != NULL)
showDiags((HTStream*)target, info->Diagnostics);
@@ -479,8 +479,8 @@ display_search_response ARGS4(
/* Make a printable string out of the document id.
*/
#ifndef DISABLE_TRACE
- if (www2Trace) fprintf(stderr,
- "HTWAIS: %2ld: Score: %4ld, lines:%4ld '%s'\n",
+ if (www2Trace) fprintf(stderr,
+ "HTWAIS: %2ld: Score: %4ld, lines:%4ld '%s'\n",
i,
(long int)(info->DocHeaders[k]->Score),
(long int)(info->DocHeaders[k]->Lines),
@@ -539,7 +539,7 @@ display_search_response ARGS4(
{
strcat (types_array, "TEXT");
}
-
+
sprintf(line, "%s/%s/%d/%s",
dbname,
types_array,
@@ -547,7 +547,7 @@ display_search_response ARGS4(
docname);
PUTS ("Types && head->Types[0] &&
+ if (head->Types && head->Types[0] &&
strcmp (head->Types[0], "URL") == 0)
{
/* The real URL, maybe? */
@@ -574,7 +574,7 @@ display_search_response ARGS4(
}
} /* next document header */
} /* if there were any document headers */
-
+
if ( info->ShortHeaders != 0 ) {
k =0;
while (info->ShortHeaders[k] != 0 ) {
@@ -653,9 +653,9 @@ static int mosaic_connect_to_server(char *host_name, long port, FILE **fp)
FILE* file;
long fd;
int rv;
-
+
rv = fd_mosaic_connect_to_server (host_name, port, &fd);
- if(rv == 0)
+ if(rv == 0)
{
HTProgress ("Could not connect to WAIS server.");
return 0;
@@ -666,7 +666,7 @@ static int mosaic_connect_to_server(char *host_name, long port, FILE **fp)
return -1;
}
- if ((file = fdopen(fd,"r+")) == NULL)
+ if ((file = fdopen(fd,"r+")) == NULL)
{
HTProgress ("Could not open WAIS connection for reading.");
return 0;
@@ -679,7 +679,7 @@ static int mosaic_connect_to_server(char *host_name, long port, FILE **fp)
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
-
+
/* Pulled in from gui.c; corresponds to Rdata.max_wais_responses. */
extern int max_wais_responses;
@@ -706,7 +706,7 @@ PUBLIC int HTLoadWAIS ARGS4(
long request_buffer_length; /* how of the request is left */
SearchResponseAPDU *retrieval_response = 0;
char keywords[MAX_KEYWORDS_LENGTH + 1];
- char *server_name;
+ char *server_name;
char *wais_database = NULL; /* name of current database */
char *www_database; /* Same name escaped */
char *service;
@@ -719,57 +719,57 @@ PUBLIC int HTLoadWAIS ARGS4(
BOOL ok = NO;
WAISSearchResponse *response;
diagnosticRecord **diag;
-
- if (!acceptable_inited)
+
+ if (!acceptable_inited)
init_acceptable();
-
+
/* Decipher and check syntax of WWW address:
** ----------------------------------------
**
** First we remove the "wais:" if it was spcified. 920110
- */
+ */
names = HTParse(arg, "", PARSE_HOST | PARSE_PATH | PARSE_PUNCTUATION);
key = strchr(names, '?');
-
- if (key)
+
+ if (key)
{
char * p;
*key++ = 0; /* Split off keywords */
for (p=key; *p; p++) if (*p == '+') *p = ' ';
HTUnEscape(key);
}
- if (names[0]== '/')
+ if (names[0]== '/')
{
server_name = names+1;
if (*server_name == '/')
server_name++; /* Accept one or two */
www_database = strchr(server_name,'/');
- if (www_database)
+ if (www_database)
{
*www_database++ = 0; /* Separate database name */
doctype = strchr(www_database, '/');
- if (key)
+ if (key)
ok = YES; /* Don't need doc details */
- else if (doctype)
+ else if (doctype)
{ /* If not search parse doc details */
*doctype++ = 0; /* Separate rest of doc address */
doclength = strchr(doctype, '/');
- if(doclength)
+ if(doclength)
{
*doclength++ = 0;
-
+
/* OK, now doclength should be the rest of the URL,
right??? */
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf (stderr,
+ fprintf (stderr,
"WAIS: doctype '%s', doclength\n~~~~\n%s\n~~~~\n",
doctype, doclength);
#endif
/* Multitype! */
if (strchr (doctype, ','))
{
- HTStructured *target =
+ HTStructured *target =
HTML_new(anAnchor, format_out, sink);
char *t, *oldt, *newt, *revised;
int first;
@@ -787,7 +787,7 @@ PUBLIC int HTLoadWAIS ARGS4(
START(HTML_TITLE);
PUTS("Multiple Format Opportunity");
END(HTML_TITLE);
-
+
START(HTML_H1);
PUTS("Multiple Format Opportunity");
END(HTML_H1);
@@ -801,7 +801,7 @@ PUBLIC int HTLoadWAIS ARGS4(
with leading period. */
oldt = (char *)malloc (strlen (t) + 16);
sprintf (oldt, ".%s", t);
-
+
first = 1;
while (t && *t)
@@ -816,7 +816,7 @@ PUBLIC int HTLoadWAIS ARGS4(
PUTS("/");
PUTS(doclength);
PUTS("\">");
-
+
/* Unescape t in place; we don't need it anymore
after this anyway. */
HTUnEscape (t);
@@ -826,37 +826,37 @@ PUBLIC int HTLoadWAIS ARGS4(
}
free (oldt);
-
+
PUTS("");
-
+
END_TARGET;
FREE_TARGET;
-
+
/* Hey, WE'RE DONE! */
free (names);
return HT_LOADED;
}
-
+
document_length = atol(doclength);
- if (document_length)
+ if (document_length)
{
docname=strchr(doclength, '/');
- if (docname)
+ if (docname)
{
*docname++ = 0;
ok = YES; /* To avoid a goto! */
} /* if docname */
} /* if document_length valid */
} /* if doclength */
- }
- else
+ }
+ else
{ /* no doctype? Assume index required */
if (!key) key = "";
ok = YES;
} /* if doctype */
} /* if database */
}
-
+
if (!ok)
{
free (names);
@@ -864,16 +864,16 @@ PUBLIC int HTLoadWAIS ARGS4(
}
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTWAIS: Parsed OK; type is '%s'\n", doctype);
#endif
service = strchr(names, ':');
- if (service)
+ if (service)
*service++ = 0;
- else
+ else
service = "210";
-
+
if (server_name[0] == 0)
connection = NULL;
else if (!(key && !*key))
@@ -907,94 +907,94 @@ PUBLIC int HTLoadWAIS ARGS4(
StrAllocCopy(wais_database,www_database);
HTUnEscape(wais_database);
-
+
/* This below fixed size stuff is terrible */
request_message = (char*)s_malloc((size_t)MAX_MESSAGE_LEN * sizeof(char));
response_message = (char*)s_malloc((size_t)MAX_MESSAGE_LEN * sizeof(char));
-
+
/* If keyword search is performed but there are no keywords,
** the user has followed a link to the index itself. It would be
** appropriate at this point to send him the .SRC file - how?
*/
- if (key && !*key)
+ if (key && !*key)
{ /* I N D E X */
HTStructured * target = HTML_new(anAnchor, format_out, sink);
-
+
START(HTML_TITLE);
PUTS(wais_database);
PUTS(" index");
END(HTML_TITLE);
-
+
START(HTML_H1);
PUTS(wais_database);
END(HTML_H1);
START(HTML_ISINDEX);
-
+
START(HTML_P);
-
+
END_TARGET;
- if (connection)
+ if (connection)
FW_close_connection(connection);
FREE_TARGET;
- }
- else if (key)
+ }
+ else if (key)
{ /* S E A R C H */
char *p;
HTStructured * target;
-
+
strncpy(keywords, key, MAX_KEYWORDS_LENGTH);
- while(p=strchr(keywords, '+'))
+ while(p=strchr(keywords, '+'))
*p = ' ';
-
+
/* Send advance title to get something fast to the other end */
-
+
target = HTML_new(anAnchor, format_out, sink);
-
+
START(HTML_TITLE);
PUTS(keywords);
PUTS(" (in ");
PUTS(wais_database);
PUTS(")");
END(HTML_TITLE);
-
+
START(HTML_H1);
PUTS(keywords);
END(HTML_H1);
-
+
START(HTML_ISINDEX);
-
+
request_buffer_length = MAX_MESSAGE_LEN; /* Amount left */
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "HTWAIS: Search for `%s' in `%s'\n",
keywords, wais_database);
#endif
-
- if(NULL == generate_search_apdu(request_message + HEADER_LENGTH,
- &request_buffer_length,
+
+ if(NULL == generate_search_apdu(request_message + HEADER_LENGTH,
+ &request_buffer_length,
keywords, wais_database, NULL, MAXDOCS))
{
HTProgress ("WAIS request too large; something went wrong.");
}
-
- if(!interpret_message(request_message,
- MAX_MESSAGE_LEN - request_buffer_length,
+
+ if(!interpret_message(request_message,
+ MAX_MESSAGE_LEN - request_buffer_length,
response_message,
MAX_MESSAGE_LEN,
connection,
false /* true verbose */
- ))
+ ))
{
HTProgress ("WAIS returned message too large; something went wrong.");
- }
- else
+ }
+ else
{ /* returned message ok */
SearchResponseAPDU *query_response = 0;
readSearchResponseAPDU(&query_response,
response_message + HEADER_LENGTH);
/* We do want this to be called if !query_response, to
get our cute error message. */
- display_search_response(target,
+ display_search_response(target,
query_response, wais_database, keywords);
if (query_response)
{
@@ -1003,13 +1003,13 @@ PUBLIC int HTLoadWAIS ARGS4(
freeSearchResponseAPDU( query_response);
}
} /* returned message not too large */
-
+
END_TARGET;
- if (connection)
+ if (connection)
FW_close_connection(connection);
FREE_TARGET;
- }
- else
+ }
+ else
{ /* D O C U M E N T F E T C H */
HTFormat format_in;
HTStream * target;
@@ -1025,7 +1025,7 @@ PUBLIC int HTLoadWAIS ARGS4(
fprintf(stderr,
"===WAIS=== Retrieve document id `%s' type `%s' length %ld\n",
docname, doctype, document_length);
-#endif
+#endif
{
char *tmp_doctype = strdup (doctype);
char *tmp;
@@ -1044,59 +1044,59 @@ PUBLIC int HTLoadWAIS ARGS4(
char dummy[256];
HTAtom *pencoding;
int compressed;
-
+
sprintf (dummy, "foo.%s", doctype);
format_in = HTFileFormat (dummy, &pencoding,
WWW_PLAINTEXT, &compressed);
/* Assume it will always be at *least* WWW_PLAINTEXT. */
}
-
+
target = HTStreamStack(format_in, format_out, 0, sink, anAnchor);
- if (!target)
+ if (!target)
{
free (names);
- if (connection)
+ if (connection)
FW_close_connection(connection);
return HT_NOT_LOADED;
}
/* Decode hex or literal format for document ID
- */
+ */
WAIS_from_WWW(docid, docname);
-
+
/* Loop over slices of the document
- */
+ */
{
int bytes = 0, intr;
char line[256];
-
+
HTClearActiveIcon ();
-
+
count = 0;
while (1)
{
char *type = s_strdup(doctype); /* Gets freed I guess */
request_buffer_length = MAX_MESSAGE_LEN; /* Amount left */
#ifndef DISABLE_TRACE
- if (www2Trace)
+ if (www2Trace)
fprintf(stderr, "HTWAIS: Slice number %ld\n", count);
#endif
-
+
intr = HTCheckActiveIcon (1);
if (intr)
{
HTProgress ("Data transfer interrupted.");
(*target->isa->handle_interrupt)(target);
free (names);
- if (connection)
+ if (connection)
FW_close_connection(connection);
return HT_INTERRUPTED;
}
-
+
if(generate_retrieval_apdu
(request_message + HEADER_LENGTH,
- &request_buffer_length,
- docid,
+ &request_buffer_length,
+ docid,
CT_byte,
count * CHARS_PER_PAGE,
(count + 1) * CHARS_PER_PAGE,
@@ -1104,33 +1104,33 @@ PUBLIC int HTLoadWAIS ARGS4(
wais_database
) == 0)
{
- HTProgress
+ HTProgress
("WAIS error condition; retrieval may be unsuccessful.");
}
free (type);
-
- /* Actually do the transaction given by request_message */
+
+ /* Actually do the transaction given by request_message */
if(0 ==
interpret_message
- (request_message,
- MAX_MESSAGE_LEN - request_buffer_length,
+ (request_message,
+ MAX_MESSAGE_LEN - request_buffer_length,
response_message,
MAX_MESSAGE_LEN,
connection,
- false /* true verbose */
+ false /* true verbose */
))
{
HTProgress ("WAIS error condition; retrieval may be unsuccessful.");
goto no_more_data;
}
-
+
/* Parse the result which came back into memory.
*/
- readSearchResponseAPDU(&retrieval_response,
+ readSearchResponseAPDU(&retrieval_response,
response_message + HEADER_LENGTH);
-
- response =
+
+ response =
(WAISSearchResponse *)retrieval_response->DatabaseDiagnosticRecords;
diag = response->Diagnostics;
@@ -1141,11 +1141,11 @@ PUBLIC int HTLoadWAIS ARGS4(
fprintf (stderr, "WAIS: no more data (NULL response->Text)\n");
#endif
if (retrieval_response->DatabaseDiagnosticRecords)
- freeWAISSearchResponse
+ freeWAISSearchResponse
(retrieval_response->DatabaseDiagnosticRecords);
freeSearchResponseAPDU (retrieval_response);
goto no_more_data;
- }
+ }
else if
(((WAISSearchResponse *)
retrieval_response->DatabaseDiagnosticRecords)->Text[0]->DocumentText->size)
@@ -1163,7 +1163,7 @@ PUBLIC int HTLoadWAIS ARGS4(
fprintf (stderr, "WAIS: no more data (fell through)\n");
#endif
if (retrieval_response->DatabaseDiagnosticRecords)
- freeWAISSearchResponse
+ freeWAISSearchResponse
(retrieval_response->DatabaseDiagnosticRecords);
freeSearchResponseAPDU (retrieval_response);
goto no_more_data;
@@ -1184,39 +1184,39 @@ PUBLIC int HTLoadWAIS ARGS4(
fprintf (stderr, "WAIS: no more data (diag)\n");
#endif
if (retrieval_response->DatabaseDiagnosticRecords)
- freeWAISSearchResponse
+ freeWAISSearchResponse
(retrieval_response->DatabaseDiagnosticRecords);
freeSearchResponseAPDU (retrieval_response);
goto no_more_data;
}
if (retrieval_response->DatabaseDiagnosticRecords)
- freeWAISSearchResponse
+ freeWAISSearchResponse
(retrieval_response->DatabaseDiagnosticRecords);
freeSearchResponseAPDU (retrieval_response);
count++;
} /* Loop over slices */
-
+
} /* local variables */
no_more_data:
-
+
END_TARGET;
/* Close the connection BEFORE calling system(), which can
happen in the free method. */
- if (connection)
+ if (connection)
FW_close_connection(connection);
FREE_TARGET;
-
+
free (docid->bytes);
} /* If document rather than search */
-
- if (wais_database)
+
+ if (wais_database)
free (wais_database);
s_free (request_message);
s_free(response_message);
-
+
free(names);
return HT_LOADED;
}
diff --git a/libwww2/HTWAIS.h b/libwww2/HTWAIS.h
index 84382dc..a96afec 100644
--- a/libwww2/HTWAIS.h
+++ b/libwww2/HTWAIS.h
@@ -1,26 +1,26 @@
/* WAIS protocol module for the W3 library
WAIS PROTOCOL INTERFACE
-
+
This module does not actually perform the WAIS protocol directly, but it does using one
or more library of the freeWAIS distribution. The ui.a library came with the old free
WAIS from TMC, the client.a and wais.a libraries are needed from the freeWAIS from
CNIDR.
-
+
If you include this module in the library, you must also
-
+
Register the HTWAIS protocol at initialisation (e.g. HTInit or HTSInit) by compiling
it with -DDIRECT_WAIS
-
+
Link with the libraries
-
+
The wais source files are parsed by a separate and independent module, HTWSRC. You
can include HTWSRC without including direct wais using this module, and your WWW code
will be able to read source files, and access WAIS indexes through a gateway.
-
+
A WAIS-WWW gateway is just a normal W3 server with a libwww compiled with this module.
-
+
Anyways, this interface won't change much:
-
+
*/
#ifndef HTWAIS_H
#define HTWAIS_H
diff --git a/libwww2/HTWSRC.c b/libwww2/HTWSRC.c
index c162ca1..a638bb3 100644
--- a/libwww2/HTWSRC.c
+++ b/libwww2/HTWSRC.c
@@ -38,25 +38,25 @@ struct _HTStructured {
/* Here are the parameters which can be specified in a source file
*/
PRIVATE WWW_CONST char* par_name[] = {
- "version",
+ "version",
"ip-address",
#define PAR_IP_NAME 2
- "ip-name",
+ "ip-name",
#define PAR_TCP_PORT 3
- "tcp-port",
+ "tcp-port",
#define PAR_DATABASE_NAME 4
"database-name",
#define PAR_COST 5
- "cost",
+ "cost",
#define PAR_COST_UNIT 6
- "cost-unit",
+ "cost-unit",
#define PAR_FREE 7
- "free",
+ "free",
#define PAR_MAINTAINER 8
- "maintainer",
+ "maintainer",
#define PAR_DESCRIPTION 9
"description",
- "keyword-list",
+ "keyword-list",
"source",
#define PAR_UNKNOWN 12
"unknown",
@@ -127,7 +127,7 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c)
case beginning:
if (c=='(') me->state = before_tag;
break;
-
+
case before_tag:
if (c==')') {
me->state = done;
@@ -161,7 +161,7 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c)
if (me->param_count < PARAM_MAX) me->param[me->param_count++] = c;
}
break;
-
+
case before_value:
if (c==')') {
me->state = done;
@@ -173,7 +173,7 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c)
me->state = quoted_value;
break;
}
- me->state = (c=='"') ? quoted_value :
+ me->state = (c=='"') ? quoted_value :
(c=='(') ? bracketed_value : value;
me->param[me->param_count++] = c; /* Don't miss first character */
break;
@@ -197,7 +197,7 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c)
}
if (me->param_count < PARAM_MAX) me->param[me->param_count++] = c;
break;
-
+
case quoted_value:
if (c=='"') {
me->param[me->param_count] = 0;
@@ -205,7 +205,7 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c)
me->state = before_tag;
break;
}
-
+
if (c=='\\') { /* Ignore escape but switch state */
me->state = escape_in_quoted;
break;
@@ -217,7 +217,7 @@ PRIVATE void WSRCParser_put_character ARGS2(HTStream*, me, char, c)
if (me->param_count < PARAM_MAX) me->param[me->param_count++] = c;
me->state = quoted_value;
break;
-
+
case done: /* Ignore anything after EOF */
return;
@@ -257,27 +257,27 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file)
if ( l > 4 && !strcasecomp(shortname + l -4, ".src")) {
shortname[l-4] = 0; /* Chop of .src -- boring! */
}
-
+
START(HTML_TITLE);
PUTS(shortname);
PUTS(source_file ? " WAIS source file" : " index");
END(HTML_TITLE);
-
+
START(HTML_H1);
PUTS(shortname);
PUTS(source_file ? " description" : " index");
END(HTML_H1);
}
-
+
START(HTML_DL); /* Definition list of details */
-
+
if (source_file) {
START(HTML_DT);
PUTS("Access links");
START(HTML_DD);
if (me->par_value[PAR_IP_NAME] &&
me->par_value[PAR_DATABASE_NAME]) {
-
+
char WSRC_address[256];
char * www_database;
www_database = HTEscape(me->par_value[PAR_DATABASE_NAME]);
@@ -286,15 +286,15 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file)
me->par_value[PAR_TCP_PORT] ? me->par_value[PAR_TCP_PORT]
: "210",
www_database);
-
+
PUTS ("");
PUTS("Direct access");
PUTS("");
-
+
PUTS(" or ");
-
+
sprintf(WSRC_address, "http://www.ncsa.uiuc.edu:8001/%s:%s/%s",
me->par_value[PAR_IP_NAME],
me->par_value[PAR_TCP_PORT] ? me->par_value[PAR_TCP_PORT]
@@ -305,16 +305,16 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file)
PUTS ("\">");
PUTS("through NCSA gateway");
PUTS("
");
-
+
free(www_database);
-
+
} else {
give_parameter(me, PAR_IP_NAME);
give_parameter(me, PAR_IP_NAME);
}
-
+
} /* end if source_file */
-
+
if (me->par_value[PAR_MAINTAINER]) {
START(HTML_DT);
PUTS("Maintainer");
@@ -333,10 +333,10 @@ PRIVATE void WSRC_gen_html ARGS2(HTStream *, me, BOOL, source_file)
PUTS(me->par_value[PAR_DESCRIPTION]);
END(HTML_PRE);
}
-
+
(*me->target->isa->end_document)(me->target);
(*me->target->isa->free)(me->target);
-
+
return;
} /* generate html */
@@ -407,7 +407,7 @@ HTStreamClass WSRCParserClass = {
*/
PUBLIC HTStream* HTWSRCConvert ARGS5(
HTPresentation *, pres,
- HTParentAnchor *, anchor,
+ HTParentAnchor *, anchor,
HTStream *, sink,
HTFormat, format_in,
int, compressed)
diff --git a/libwww2/HTWSRC.h b/libwww2/HTWSRC.h
index b78c07b..10a16ac 100644
--- a/libwww2/HTWSRC.h
+++ b/libwww2/HTWSRC.h
@@ -1,12 +1,12 @@
/* A parser for WAIS source files
WAIS SOURCE FILE PARSER
-
+
This converter returns a stream object into which a WAIS source file can be written.
The result is put via a structured stream into whatever format was required for the
output stream.
-
+
See also: HTWAIS protocol interface module
-
+
*/
#ifndef HTWSRC_H
#define HTWSRC_H
@@ -27,10 +27,10 @@ Escaping Strings
HTDeSlash takes out the invlaid characters in a URL path ELEMENT by converting them
into hex-escaped characters. HTEnSlash does the reverse.
-
+
Each returns a pointer to a newly allocated string which must eventually be freed by
the caller.
-
+
*/
extern char * HTDeSlash PARAMS((WWW_CONST char * str));
@@ -41,5 +41,5 @@ extern char * HTEnSlash PARAMS((WWW_CONST char * str));
/*
Tim BL
-
+
*/
diff --git a/libwww2/HTWriter.c b/libwww2/HTWriter.c
index 29f1025..e3f23f8 100644
--- a/libwww2/HTWriter.c
+++ b/libwww2/HTWriter.c
@@ -102,7 +102,7 @@ PRIVATE void HTWriter_put_string ARGS2(HTStream *, me, WWW_CONST char*, s)
*/
PRIVATE void HTWriter_write ARGS3(HTStream *, me, WWW_CONST char*, s, int, l)
{
-
+
WWW_CONST char *read_pointer = s;
WWW_CONST char *write_pointer = s+l;
@@ -165,14 +165,14 @@ PRIVATE void HTWriter_handle_interrupt ARGS1(HTStream *, me)
** -----------------------
*/
PRIVATE WWW_CONST HTStreamClass HTWriter = /* As opposed to print etc */
-{
+{
"SocketWriter",
HTWriter_free,
HTWriter_end_document,
HTWriter_put_character, HTWriter_put_string,
HTWriter_write,
HTWriter_handle_interrupt
-};
+};
/* Subclass-specific Methods
@@ -183,8 +183,8 @@ PUBLIC HTStream* HTWriter_new ARGS1(int, soc)
{
HTStream* me = (HTStream*)malloc(sizeof(*me));
if (me == NULL) outofmem(__FILE__, "HTWriter_new");
- me->isa = &HTWriter;
-
+ me->isa = &HTWriter;
+
me->soc = soc;
me->write_pointer = me->buffer;
return me;
@@ -198,7 +198,7 @@ PUBLIC HTStream* HTASCIIWriter ARGS1(int, soc)
{
HTStream* me = (HTStream*)malloc(sizeof(*me));
if (me == NULL) outofmem(__FILE__, "HTASCIIWriter");
- me->isa = &HTWriter;
+ me->isa = &HTWriter;
me->soc = soc;
me->write_pointer = me->buffer;
diff --git a/libwww2/HText.h b/libwww2/HText.h
index f8f3f85..a0857a8 100644
--- a/libwww2/HText.h
+++ b/libwww2/HText.h
@@ -1,12 +1,12 @@
/* Rich Hypertext object for libWWW
RICH HYPERTEXT OBJECT
-
+
*/
/*
This is the C interface to the Objective-C (or whatever) HyperText class.
-
+
*/
#ifndef HTEXT_H
#define HTEXT_H
diff --git a/libwww2/Makefile.in b/libwww2/Makefile.in
index ad75db6..50e913f 100644
--- a/libwww2/Makefile.in
+++ b/libwww2/Makefile.in
@@ -1,7 +1,7 @@
# @configure_output@
# This file is used by Autoconf to make the real Makefile.
# DO NOT EDIT THIS FILE!
-# If you want to change something do it to the Makefile autoconf
+# If you want to change something do it to the Makefile autoconf
# creates. You should never have to edit this file.
CC= @CC@
@@ -60,7 +60,7 @@ HTMailto.c
# HTACL.c \
# HTAAProt.c \
# HTAAServ.c \
-# HTAAFile.c
+# HTAAFile.c
OBJS = $(CFILES:.c=.o)
diff --git a/libwww2/SGML.c b/libwww2/SGML.c
index f58a717..0a82b34 100644
--- a/libwww2/SGML.c
+++ b/libwww2/SGML.c
@@ -5,7 +5,7 @@
** SGML file, create this object which is a parser. The object
** is (currently) created by being passed a DTD structure,
** and a target HTStructured oject at which to throw the parsed stuff.
-**
+**
** 6 Feb 93 Binary seraches used. Intreface modified.
*/
#include "../config.h"
@@ -31,7 +31,7 @@ extern int www2Trace;
#define MAX_ATTRIBUTES 20 /* Max number of attributes per element */
-
+
/* Element Stack
** -------------
** This allows us to return down the stack reselcting styles.
@@ -50,7 +50,7 @@ struct _HTElement {
struct _HTStream {
WWW_CONST HTStreamClass * isa; /* inherited from HTStream */
-
+
WWW_CONST SGML_dtd *dtd;
HTStructuredClass *actions; /* target class */
HTStructured *target; /* target object */
@@ -59,11 +59,11 @@ struct _HTStream {
int current_attribute_number;
HTChunk *string;
HTElement *element_stack;
- enum sgml_state { S_text, S_litteral, S_tag, S_tag_gap,
+ enum sgml_state { S_text, S_litteral, S_tag, S_tag_gap,
S_attr, S_attr_gap, S_equals, S_value,
S_ero, S_cro,
S_squoted, S_dquoted, S_end, S_entity, S_junk_tag} state;
-#ifdef CALLERDATA
+#ifdef CALLERDATA
void * callerData;
#endif
BOOL present[MAX_ATTRIBUTES]; /* Flags: attribute is present? */
@@ -107,9 +107,9 @@ PRIVATE void handle_attribute_name(context, s)
}
return;
} /* if */
-
+
} /* for */
-
+
#ifndef DISABLE_TRACE
if (www2Trace)
fprintf(stderr, "SGML: Unknown attribute %s for tag %s\n",
@@ -161,7 +161,7 @@ PRIVATE void handle_entity(context, term)
WWW_CONST char ** entities = context->dtd->entity_names;
WWW_CONST char *s = context->string->data;
-
+
int high, low, i, diff;
for(low=0, high = context->dtd->number_of_entities;
high > low ;
@@ -176,7 +176,7 @@ PRIVATE void handle_entity(context, term)
/* If entity string not found, display as text */
#ifndef DISABLE_TRACE
if (www2Trace)
- fprintf(stderr, "SGML: Unknown entity %s\n", s);
+ fprintf(stderr, "SGML: Unknown entity %s\n", s);
#endif
PUTC('&');
{
@@ -213,7 +213,7 @@ PRIVATE void end_element(context, old_tag)
while (context->element_stack) {/* Loop is error path only */
HTElement * N = context->element_stack;
HTTag * t = N->tag;
-
+
if (old_tag != t) { /* Mismatch: syntax error */
if (context->element_stack->next) { /* This is not the last level */
#ifndef DISABLE_TRACE
@@ -230,15 +230,15 @@ PRIVATE void end_element(context, old_tag)
return; /* Ignore */
}
}
-
+
context->element_stack = N->next; /* Remove from stack */
free(N);
(*context->actions->end_element)(context->target,
t - context->dtd->tags);
if (old_tag == t) return; /* Correct sequence */
-
+
/* Syntax error path only */
-
+
}
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr,
@@ -257,7 +257,7 @@ PRIVATE void start_element(context)
#endif
{
HTTag * new_tag = context->current_tag;
-
+
#ifndef DISABLE_TRACE
if (www2Trace) fprintf(stderr, "SGML: Start <%s>\n", new_tag->name);
#endif
@@ -332,7 +332,7 @@ PUBLIC void SGML_free ARGS1(HTStream *, context)
** particular SGML context.
*/
-#ifdef CALLERDATA
+#ifdef CALLERDATA
PUBLIC void* SGML_callerData ARGS1(HTStream *, context)
{
return context->callerData;
@@ -360,7 +360,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
))) {
string->size = 0;
context->state = S_ero;
-
+
} else if (c=='<') {
string->size = 0;
context->state = (context->element_stack &&
@@ -378,7 +378,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
if ( TOUPPER(c) != ((string->size ==1) ? '/'
: context->element_stack->tag->name[string->size-2])) {
int i;
-
+
/* If complete match, end litteral */
if ((c=='>') && (!context->element_stack->tag->name[string->size-2])) {
end_element(context, context->element_stack->tag);
@@ -391,20 +391,20 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
for (i=0; isize; i++) /* recover */
PUTC(
string->data[i]);
- context->state = S_text;
+ context->state = S_text;
}
-
+
break;
/* Character reference or Entity
*/
case S_ero:
if (c=='#') {
- context->state = S_cro; /* is Char Ref Open */
+ context->state = S_cro; /* is Char Ref Open */
break;
}
context->state = S_entity; /* Fall through! */
-
+
/* Handle Entities
*/
case S_entity:
@@ -432,7 +432,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
break;
/* Tag
-*/
+*/
case S_tag: /* new tag */
if (isalnum(c))
HTChunkPutc(string, c);
@@ -458,10 +458,10 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
break;
}
context->current_tag = t;
-
+
/* Clear out attributes
*/
-
+
{
int i;
for (i=0; i< context->current_tag->number_of_attributes; i++)
@@ -469,7 +469,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
}
string->size = 0;
context->current_attribute_number = INVALID;
-
+
if (c=='>') {
if (context->current_tag->name) start_element(context);
context->state = S_text;
@@ -479,7 +479,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
}
break;
-
+
case S_tag_gap: /* Expecting attribute or > */
if (WHITE(c)) break; /* Gap between attributes */
if (c=='>') { /* End of tag */
@@ -490,7 +490,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
HTChunkPutc(string, c);
context->state = S_attr; /* Get attribute */
break;
-
+
/* accumulating value */
case S_attr:
if (WHITE(c) || (c=='>') || (c=='=')) { /* End of word */
@@ -507,7 +507,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
HTChunkPutc(string, c);
}
break;
-
+
case S_attr_gap: /* Expecting attribute or = or > */
if (WHITE(c)) break; /* Gap after attribute */
if (c=='>') { /* End of tag */
@@ -521,8 +521,8 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
HTChunkPutc(string, c);
context->state = S_attr; /* Get next attribute */
break;
-
- case S_equals: /* After attr = */
+
+ case S_equals: /* After attr = */
if (WHITE(c)) break; /* Before attribute value */
if (c=='>') { /* End of tag */
#ifndef DISABLE_TRACE
@@ -531,7 +531,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
if (context->current_tag->name) start_element(context);
context->state = S_text;
break;
-
+
} else if (c=='\'') {
context->state = S_squoted;
break;
@@ -543,7 +543,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
HTChunkPutc(string, c);
context->state = S_value;
break;
-
+
case S_value:
if (WHITE(c) || (c=='>')) { /* End of word */
HTChunkTerminate(string) ;
@@ -559,7 +559,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
HTChunkPutc(string, c);
}
break;
-
+
case S_squoted: /* Quoted attribute value */
if (c=='\'') { /* End of attribute value */
HTChunkTerminate(string) ;
@@ -570,7 +570,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
HTChunkPutc(string, c);
}
break;
-
+
case S_dquoted: /* Quoted attribute value */
if (c=='"') { /* End of attribute value */
HTChunkTerminate(string) ;
@@ -581,7 +581,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
HTChunkPutc(string, c);
}
break;
-
+
case S_end: /* */
if (isalnum(c))
HTChunkPutc(string, c);
@@ -596,7 +596,7 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
if (!t) {
#ifndef DISABLE_TRACE
if(www2Trace) fprintf(stderr,
- "Unknown end tag %s>\n", string->data);
+ "Unknown end tag %s>\n", string->data);
#endif
} else {
context->current_tag = t;
@@ -618,12 +618,12 @@ PUBLIC void SGML_character ARGS2(HTStream *, context, char,c)
}
break;
-
+
case S_junk_tag:
if (c=='>') {
context->state = S_text;
}
-
+
} /* switch on context->state */
} /* SGML_character */
@@ -655,14 +655,14 @@ PRIVATE void SGML_handle_interrupt ARGS1(HTStream *, context)
/* Structured Object Class
** -----------------------
*/
-PUBLIC WWW_CONST HTStreamClass SGMLParser =
-{
+PUBLIC WWW_CONST HTStreamClass SGMLParser =
+{
"SGMLParser",
SGML_free,
SGML_end,
SGML_character, SGML_string, SGML_write,
SGML_handle_interrupt
-};
+};
/* Create SGML Engine
** ------------------
@@ -689,9 +689,9 @@ PUBLIC HTStream* SGML_new ARGS2(
/* Ugh: no OO */
context->state = S_text;
context->element_stack = 0; /* empty */
-#ifdef CALLERDATA
+#ifdef CALLERDATA
context->callerData = (void*) callerData;
-#endif
+#endif
for(i=0; ivalue[i] = 0;
return context;
diff --git a/libwww2/SGML.h b/libwww2/SGML.h
index 624a3c5..8d0d4b2 100644
--- a/libwww2/SGML.h
+++ b/libwww2/SGML.h
@@ -1,6 +1,6 @@
/* /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/SGML.html
SGML AND STRUCTURED STREAMS
-
+
The SGML parser is a state machine. It is called for every
character of the input stream. The DTD data structure contains
pointers to functions which are called to implement the actual
@@ -9,12 +9,12 @@
function is passed a pointer to the curent tag structure, and an
"element stack" which represents the state of nesting within SGML
elements.
-
+
The following aspects are from Dan Connolly's suggestions: Binary
search, Strcutured object scheme basically, SGML content enum type.
-
+
(c) Copyright CERN 1991 - See Copyright.html
-
+
*/
#ifndef SGML_H
#define SGML_H
@@ -124,29 +124,29 @@ typedef struct _HTStructuredClass{
void (*end_document) PARAMS((
HTStructured* me));
-
+
void (*handle_interrupt) PARAMS((
HTStructured* me));
-
+
void (*put_character) PARAMS((
HTStructured* me,
char ch));
-
+
void (*put_string) PARAMS((
HTStructured* me,
WWW_CONST char * str));
-
+
void (*write) PARAMS((
HTStructured* me,
WWW_CONST char * str,
int len));
-
+
void (*start_element) PARAMS((
HTStructured* me,
int element_number,
WWW_CONST BOOL* attribute_present,
WWW_CONST char** attribute_value));
-
+
void (*end_element) PARAMS((
HTStructured* me,
int element_number));
@@ -154,7 +154,7 @@ typedef struct _HTStructuredClass{
void (*put_entity) PARAMS((
HTStructured* me,
int entity_number));
-
+
}HTStructuredClass;
diff --git a/libwww2/tcp.h b/libwww2/tcp.h
index 2870118..63b2068 100644
--- a/libwww2/tcp.h
+++ b/libwww2/tcp.h
@@ -1,18 +1,18 @@
/* System dependencies in the W3 library
SYSTEM DEPENDENCIES
-
+
System-system differences for TCP include files and macros. This
file includes for each system the files necessary for network and
file I/O.
-
+
AUTHORS
-
+
TBL Tim Berners-Lee, W3 project, CERN,
EvA Eelco van Asperen
MA Marc Andreessen NCSA
AT Aleksandar Totic
SCW Susan C. Weber
-
+
HISTORY:
22 Feb 91 Written (TBL) as part of the WWW library.
16 Jan 92 PC code from EvA
@@ -37,7 +37,7 @@ Default values
These values may be reset and altered by system-specific sections
later on. there are also a bunch of defaults at the end .
-
+
*/
/* Default values of those: */
#define NETCLOSE close /* Routine to close a TCP-IP socket */
@@ -102,19 +102,19 @@ VAX/VMS
Under VMS, there are many versions of TCP-IP. Define one if you do
not use Digital's UCX product:
-
+
UCX DEC's "Ultrix connection" (default)
WIN_TCP From Wollongong, now GEC software.
MULTINET From SRI, now from TGV Inv.
DECNET Cern's TCP socket emulation over DECnet
-
+
The last three do not interfere with the
unix i/o library, and so they need special calls to read, write and
close sockets. In these cases the socket number is a VMS channel
number, so we make the @@@ HORRIBLE @@@ assumption that a channel
number will be greater than 10 but a unix file descriptor less than
10. It works.
-
+
*/
#ifdef vms
#ifdef WIN_TCP
@@ -221,7 +221,7 @@ extern int errno;
Regular BSD unix versions
These are a default unix where not already defined specifically.
-
+
*/
#ifndef INCLUDES_DONE
#include
@@ -257,7 +257,7 @@ Regular BSD unix versions
Defaults
INCLUDE FILES FOR TCP
-
+
*/
#ifndef TCP_INCLUDES_DONE
#include /* EJB */
@@ -273,7 +273,7 @@ Defaults
/*
MACROS FOR MANIPULATING MASKS FOR SELECT()
-
+
*/
#ifdef SELECT
#ifndef FD_SET
diff --git a/makefiles/Makefile.linux b/makefiles/Makefile.linux
index 905093b..743e7c4 100755
--- a/makefiles/Makefile.linux
+++ b/makefiles/Makefile.linux
@@ -17,9 +17,9 @@ RANLIB = ranlib
#CC = cc
#### On Sun's, this should be gcc (ANSI required).
-CC = gcc
+CC = clang
-#### Linker Flags
+#### Linker Flags
ldflags =
#### For a few files in the source, some compilers may need to be kicked
@@ -35,7 +35,7 @@ knrflag =
#### For NeXT, do -DNEXT
#### For HP/UX, do -Aa -D_HPUX_SOURCE
#### For Dell SVR4, do -DSVR4
-#### For Solaris, do -DSVR4
+#### For Solaris, do -DSVR4
#### For Esix 4.0.4 and Solaris x86 2.1, do -DSVR4
#### For Convex whatever, do -DCONVEX
#### For SCO ODT 3.0, do -DSCO -DSVR4 -DMOTIF1_2
@@ -156,10 +156,10 @@ jpegflags = -DHAVE_JPEG
#### KERBEROS SUPPORT
####
-#### If you want Mosaic to support Kerberos authentication, set the
+#### If you want Mosaic to support Kerberos authentication, set the
#### following flags appropriately. You can support Kerberos V4 and/or V5,
#### although it's most likely that your realm supports one or the other.
-#### To enable DES-encryption of HTTP messages via Kerberos key exchange,
+#### To enable DES-encryption of HTTP messages via Kerberos key exchange,
#### define the KRB-ENCRYPT flag.
##krb4dir = /usr/athena
@@ -174,7 +174,7 @@ jpegflags = -DHAVE_JPEG
#Do not comment out.
krbflags = $(krb4flags) $(krb5flags)
-krblibs = $(krb4libs) $(krb5libs)
+krblibs = $(krb4libs) $(krb5libs)
#### DIRECT WAIS SUPPORT
@@ -184,7 +184,7 @@ krblibs = $(krb4libs) $(krb5libs)
#### recommend linking with CNIDR's freeWAIS 0.5 distribution; other
#### WAIS distributions may work but we have not tested them with
#### Mosaic. freeWAIS 0.5 can currently (Sept.1995) be found at
-#### ftp://sunsite.unc.edu/pub/wais/servers/freeWAIS
+#### ftp://sunsite.unc.edu/pub/wais/servers/freeWAIS
#### If you do not wish to link to the WAIS libraries, then comment
#### the following lines out. Mosaic will then communicate with WAIS
@@ -206,7 +206,7 @@ krblibs = $(krb4libs) $(krb5libs)
#### . If you want to define the default Mosaic documentation directory
#### (should be a URL), set -DDOCS_DIRECTORY_DEFAULT=\\\"url\\\"
#### . Other things you can define are spelled out in src/mosaic.h.
-customflags =
+customflags = -O3 -DHOME_PAGE_DEFAULT=\\\"about:blank\\\"
diff --git a/mosaic-user-defs b/mosaic-user-defs
index f4ac550..4f9f25f 100644
--- a/mosaic-user-defs
+++ b/mosaic-user-defs
@@ -1,7 +1,7 @@
# This file is part of Mosaic and is only useful if it is in
#
-# $HOME/.mosaic-user-defs
-#
+# $HOME/.mosaic-user-defs
+#
# If you want to use the functionality herein described move this file
# to that location. -- TPR
#
@@ -13,14 +13,14 @@
#
# Button Title
# action spec
-#
+#
# There are (currently) three ways to specify an action:
#
# Webster
# GET:http://a.site.with.webster/cgi-bin/websterquery?q=__string__
#
# Search Engine
-# POST:http://a.site.with.webster/cgi-bin/websterquery q=__string__#
+# POST:http://a.site.with.webster/cgi-bin/websterquery q=__string__#
#
# Fetch Selection
# FETCH:__string__
@@ -28,7 +28,7 @@
# What GET does:
# This is for a search form that is of the GET method, clicking on the
# Webster button (in User pull_right menu) will send the selected text
-# to this cgi query and Mosaic will pull up the results.
+# to this cgi query and Mosaic will pull up the results.
#
# What POST does:
# This is for a search form that is of the POST method, clicking on the
@@ -38,11 +38,11 @@
# What FETCH does:
# This just treats the selection like a url and fetches it.
#
-# Here is a working example (for uiuc domain only, uncomment this if you
+# Here is a working example (for uiuc domain only, uncomment this if you
# are in the domain and ever feel like looking up words you find surfing)
#
# Webster
-# GET:http://www.uiuc.edu/cgi-bin/oed?__string__
+# GET:http://www.uiuc.edu/cgi-bin/oed?__string__
#
# How you use it:
#
@@ -55,16 +55,16 @@
# We thank you for your support.
#
# One thing that might be useful to know if you have problems with this
-# feature is that it you need to add quotes to a selection of more than
+# feature is that it you need to add quotes to a selection of more than
# one word but you can't have quotes in a url so add %22's around __string__
-# in the spec line if the button is meant to accept selections of more than
+# in the spec line if the button is meant to accept selections of more than
# one word (see provided functions).
#
# Note: With Mosaic 2.8b1 you will be able to do construct these
-# user defined actions within Mosaic via a preferences dialog.
+# user defined actions within Mosaic via a preferences dialog.
# This will mean you don't have to rerun Mosaic if you add a new action.
-# This file is a temporary thing and will be obsolete with 2.8b1
-# (all though if you have this file 2.8b1 will read it and
+# This file is a temporary thing and will be obsolete with 2.8b1
+# (all though if you have this file 2.8b1 will read it and
# put it in preferences and then erase it).
#
diff --git a/platform-configs/config.linux b/platform-configs/config.linux
index 4316880..8523d3c 100755
--- a/platform-configs/config.linux
+++ b/platform-configs/config.linux
@@ -4,7 +4,7 @@
#
# In all cases configure will check the dir you supply for all libs and
# header files as well the lib and include subdirectories of that directory.
-# So if you do things right and install everything in a place like
+# So if you do things right and install everything in a place like
# /usr/local/include and /usr/local/lib
# you can just enter /usr/local (the default) for every field.
#
diff --git a/src/Makefile b/src/Makefile
index 04ab35b..8ac28be 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -66,14 +66,14 @@ tags:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-main.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
-main.o: main.h gui.h pan.h child.h globalhist.h cciBindings2.h
+main.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+main.o: main.h gui.h pan.h child.h globalhist.h cciBindings2.h
main.o: cci.h port.h cciServer.h kcms.h
gui.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h port.h
gui.o: gui-documents.h main.h mo-www.h gui-menubar.h proxy.h pan.h pixmaps.h
gui.o: ../libwww2/HTAAUtil.h ../libhtmlw/HTML.h xresources.h cci.h
-gui.o: pixmaps/*.xpm
+gui.o: pixmaps/*.xpm
gui.o: bitmaps/*.xbm
gui-dialogs.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
@@ -87,8 +87,8 @@ gui-menubar.o: cciBindings.h cciBindings2.h cciServer.h history.h pan.h
gui-menubar.o: annotate.h mo-www.h globalhist.h proxy.h
gui-menubar.o: ../libwww2/HTAAUtil.h
-gui-documents.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
-gui-documents.o: gui.h gui-documents.h gui-extras.h mo-www.h annotate.h
+gui-documents.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+gui-documents.o: gui.h gui-documents.h gui-extras.h mo-www.h annotate.h
gui-documents.o: history.h ../libhtmlw/HTML.h cci.h port.h cciBindings.h
gui-news.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
@@ -104,7 +104,7 @@ newsrc.o: prefs.h prefs_defs.h
gui-extras.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
gui-extras.o: gui-extras.h mo-www.h ../libhtmlw/HTML.h ../libnut/system.h
-mo-www.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+mo-www.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
mo-www.o: mo-www.h ../libwww2/HTAAUtil.h ../libwww2/HTUtils.h
mo-www.o: ../libwww2/HTString.h ../libwww2/tcp.h ../libwww2/HTTCP.h
mo-www.o: ../libwww2/HTParse.h ../libwww2/HTAccess.h ../libwww2/HTAnchor.h
@@ -119,7 +119,7 @@ hotlist.o: mosaic.h ../libXmx/Xmx.h toolbar.h
hotlist.o: prefs.h prefs_defs.h hotlist.h hotfile.h gui.h
hotlist.o: mo-www.h bitmaps/hotlist.xbm ../libnut/system.h
-history.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+history.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
history.o: gui.h mo-www.h gui-popup.h ../libhtmlw/HTML.h
history.o: hotlist.h ../libwww2/HTAAUtil.h
@@ -149,7 +149,7 @@ img.o: bitmaps/gopher_sound.xbm bitmaps/gopher_index.xbm
img.o: bitmaps/gopher_telnet.xbm bitmaps/gopher_binary.xbm
img.o: bitmaps/gopher_unknown.xbm
-picread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+picread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
picread.o: picread.h gifread.h xpmread.h readJPEG.h readPNG.h
xpmhash.o: xpm.h
@@ -158,7 +158,7 @@ xpmread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h xpmread.h
gifread.o: gifread.h
-pixmaps.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+pixmaps.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
pixmaps.o: pixmaps.h xpmread.h xpm.h
pixmaps.o: pixmaps/*.xpm
@@ -170,7 +170,7 @@ hotfile.o: prefs.h prefs_defs.h hotlist.h mo-www.h ../libhtmlw/HTML.h
child.o: child.h list.h
-mailto.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
+mailto.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
mailto.o: ../libnut/url-utils.h ../libnut/system.h
readJPEG.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h readJPEG.h
@@ -200,8 +200,8 @@ support.o: cci.h port.h
bla.o: cciServer.h cci.h port.h list.h
bla.o: memStuffForPipSqueeks.h ../libwww2/HTPlain.h ../libwww2/HTStream.h
bla.o: ../libwww2/HTUtils.h ../libwww2/HTString.h
-bla.o: ../libwww2/HTAnchor.h ../libwww2/HTList.h ../libwww2/HTAtom.h
-bla.o: ../libwww2/HTFormat.h ../libwww2/HText.h ../libwww2/HTFile.h
+bla.o: ../libwww2/HTAnchor.h ../libwww2/HTList.h ../libwww2/HTAtom.h
+bla.o: ../libwww2/HTFormat.h ../libwww2/HText.h ../libwww2/HTFile.h
bla.o: ../libwww2/HTAccess.h ../libwww2/tcp.h ../libwww2/HTML.h
bla.o: ../libwww2/HTMLDTD.h ../libwww2/SGML.h ../libwww2/HTCompressed.h
diff --git a/src/Makefile.in b/src/Makefile.in
index 9975148..93b92db 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
# @configure_output@
# This file is used by Autoconf to make the real Makefile.
# DO NOT EDIT THIS FILE!
-# If you want to change something do it to the Makefile autoconf
+# If you want to change something do it to the Makefile autoconf
# creates. You should never have to edit this file.
CC= @CC@
@@ -74,14 +74,14 @@ tags:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-main.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
-main.o: main.h gui.h pan.h child.h globalhist.h cciBindings2.h
+main.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+main.o: main.h gui.h pan.h child.h globalhist.h cciBindings2.h
main.o: cci.h port.h cciServer.h kcms.h
gui.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h port.h
gui.o: gui-documents.h main.h mo-www.h gui-menubar.h proxy.h pan.h pixmaps.h
gui.o: ../libwww2/HTAAUtil.h ../libhtmlw/HTML.h xresources.h cci.h
-gui.o: pixmaps/*.xpm
+gui.o: pixmaps/*.xpm
gui.o: bitmaps/*.xbm
gui-dialogs.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
@@ -95,8 +95,8 @@ gui-menubar.o: cciBindings.h cciBindings2.h cciServer.h history.h pan.h
gui-menubar.o: annotate.h mo-www.h globalhist.h proxy.h
gui-menubar.o: ../libwww2/HTAAUtil.h
-gui-documents.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
-gui-documents.o: gui.h gui-documents.h gui-extras.h mo-www.h annotate.h
+gui-documents.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+gui-documents.o: gui.h gui-documents.h gui-extras.h mo-www.h annotate.h
gui-documents.o: history.h ../libhtmlw/HTML.h cci.h port.h cciBindings.h
gui-news.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
@@ -112,7 +112,7 @@ newsrc.o: prefs.h prefs_defs.h
gui-extras.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
gui-extras.o: gui-extras.h mo-www.h ../libhtmlw/HTML.h ../libnut/system.h
-mo-www.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+mo-www.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
mo-www.o: mo-www.h ../libwww2/HTAAUtil.h ../libwww2/HTUtils.h
mo-www.o: ../libwww2/HTString.h ../libwww2/tcp.h ../libwww2/HTTCP.h
mo-www.o: ../libwww2/HTParse.h ../libwww2/HTAccess.h ../libwww2/HTAnchor.h
@@ -127,7 +127,7 @@ hotlist.o: mosaic.h ../libXmx/Xmx.h toolbar.h
hotlist.o: prefs.h prefs_defs.h hotlist.h hotfile.h gui.h
hotlist.o: mo-www.h bitmaps/hotlist.xbm ../libnut/system.h
-history.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+history.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
history.o: gui.h mo-www.h gui-popup.h ../libhtmlw/HTML.h
history.o: hotlist.h ../libwww2/HTAAUtil.h
@@ -157,7 +157,7 @@ img.o: bitmaps/gopher_sound.xbm bitmaps/gopher_index.xbm
img.o: bitmaps/gopher_telnet.xbm bitmaps/gopher_binary.xbm
img.o: bitmaps/gopher_unknown.xbm
-picread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+picread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
picread.o: picread.h gifread.h xpmread.h readJPEG.h readPNG.h
xpmhash.o: xpm.h
@@ -166,7 +166,7 @@ xpmread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h xpmread.h
gifread.o: gifread.h
-pixmaps.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+pixmaps.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
pixmaps.o: pixmaps.h xpmread.h xpm.h
pixmaps.o: pixmaps/*.xpm
@@ -178,7 +178,7 @@ hotfile.o: prefs.h prefs_defs.h hotlist.h mo-www.h ../libhtmlw/HTML.h
child.o: child.h list.h
-mailto.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
+mailto.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
mailto.o: ../libnut/url-utils.h ../libnut/system.h
readJPEG.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h readJPEG.h
@@ -208,8 +208,8 @@ support.o: cci.h port.h
bla.o: cciServer.h cci.h port.h list.h
bla.o: memStuffForPipSqueeks.h ../libwww2/HTPlain.h ../libwww2/HTStream.h
bla.o: ../libwww2/HTUtils.h ../libwww2/HTString.h /usr/include/stdarg.h
-bla.o: ../libwww2/HTAnchor.h ../libwww2/HTList.h ../libwww2/HTAtom.h
-bla.o: ../libwww2/HTFormat.h ../libwww2/HText.h ../libwww2/HTFile.h
+bla.o: ../libwww2/HTAnchor.h ../libwww2/HTList.h ../libwww2/HTAtom.h
+bla.o: ../libwww2/HTFormat.h ../libwww2/HText.h ../libwww2/HTFile.h
bla.o: ../libwww2/HTAccess.h ../libwww2/tcp.h ../libwww2/HTML.h
bla.o: ../libwww2/HTMLDTD.h ../libwww2/SGML.h ../libwww2/HTCompressed.h
diff --git a/src/Makefile.orig b/src/Makefile.orig
index f87ffd2..d21e746 100644
--- a/src/Makefile.orig
+++ b/src/Makefile.orig
@@ -66,14 +66,14 @@ tags:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-main.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
-main.o: main.h gui.h pan.h child.h globalhist.h cciBindings2.h
+main.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+main.o: main.h gui.h pan.h child.h globalhist.h cciBindings2.h
main.o: cci.h port.h cciServer.h kcms.h
gui.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h port.h
gui.o: gui-documents.h main.h mo-www.h gui-menubar.h proxy.h pan.h pixmaps.h
gui.o: ../libwww2/HTAAUtil.h ../libhtmlw/HTML.h xresources.h cci.h
-gui.o: pixmaps/*.xpm
+gui.o: pixmaps/*.xpm
gui.o: bitmaps/*.xbm
gui-dialogs.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
@@ -87,8 +87,8 @@ gui-menubar.o: cciBindings.h cciBindings2.h cciServer.h history.h pan.h
gui-menubar.o: annotate.h mo-www.h globalhist.h proxy.h
gui-menubar.o: ../libwww2/HTAAUtil.h
-gui-documents.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
-gui-documents.o: gui.h gui-documents.h gui-extras.h mo-www.h annotate.h
+gui-documents.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+gui-documents.o: gui.h gui-documents.h gui-extras.h mo-www.h annotate.h
gui-documents.o: history.h ../libhtmlw/HTML.h cci.h port.h cciBindings.h
gui-news.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
@@ -104,7 +104,7 @@ newsrc.o: prefs.h prefs_defs.h
gui-extras.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
gui-extras.o: gui-extras.h mo-www.h ../libhtmlw/HTML.h ../libnut/system.h
-mo-www.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+mo-www.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
mo-www.o: mo-www.h ../libwww2/HTAAUtil.h ../libwww2/HTUtils.h
mo-www.o: ../libwww2/HTString.h ../libwww2/tcp.h ../libwww2/HTTCP.h
mo-www.o: ../libwww2/HTParse.h ../libwww2/HTAccess.h ../libwww2/HTAnchor.h
@@ -119,7 +119,7 @@ hotlist.o: mosaic.h ../libXmx/Xmx.h toolbar.h
hotlist.o: prefs.h prefs_defs.h hotlist.h hotfile.h gui.h
hotlist.o: mo-www.h bitmaps/hotlist.xbm ../libnut/system.h
-history.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+history.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
history.o: gui.h mo-www.h gui-popup.h ../libhtmlw/HTML.h
history.o: hotlist.h ../libwww2/HTAAUtil.h
@@ -149,7 +149,7 @@ img.o: bitmaps/gopher_sound.xbm bitmaps/gopher_index.xbm
img.o: bitmaps/gopher_telnet.xbm bitmaps/gopher_binary.xbm
img.o: bitmaps/gopher_unknown.xbm
-picread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+picread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
picread.o: picread.h gifread.h xpmread.h readJPEG.h readPNG.h
xpmhash.o: xpm.h
@@ -158,7 +158,7 @@ xpmread.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h xpmread.h
gifread.o: gifread.h
-pixmaps.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
+pixmaps.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h
pixmaps.o: pixmaps.h xpmread.h xpm.h
pixmaps.o: pixmaps/*.xpm
@@ -170,7 +170,7 @@ hotfile.o: prefs.h prefs_defs.h hotlist.h mo-www.h ../libhtmlw/HTML.h
child.o: child.h list.h
-mailto.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
+mailto.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h gui.h
mailto.o: ../libnut/url-utils.h ../libnut/system.h
readJPEG.o: mosaic.h ../libXmx/Xmx.h toolbar.h prefs.h prefs_defs.h readJPEG.h
@@ -200,8 +200,8 @@ support.o: cci.h port.h
bla.o: cciServer.h cci.h port.h list.h
bla.o: memStuffForPipSqueeks.h ../libwww2/HTPlain.h ../libwww2/HTStream.h
bla.o: ../libwww2/HTUtils.h ../libwww2/HTString.h /usr/include/stdarg.h
-bla.o: ../libwww2/HTAnchor.h ../libwww2/HTList.h ../libwww2/HTAtom.h
-bla.o: ../libwww2/HTFormat.h ../libwww2/HText.h ../libwww2/HTFile.h
+bla.o: ../libwww2/HTAnchor.h ../libwww2/HTList.h ../libwww2/HTAtom.h
+bla.o: ../libwww2/HTFormat.h ../libwww2/HText.h ../libwww2/HTFile.h
bla.o: ../libwww2/HTAccess.h ../libwww2/tcp.h ../libwww2/HTML.h
bla.o: ../libwww2/HTMLDTD.h ../libwww2/SGML.h ../libwww2/HTCompressed.h
diff --git a/src/accept.c b/src/accept.c
index 033ff86..a6323d6 100644
--- a/src/accept.c
+++ b/src/accept.c
@@ -113,7 +113,7 @@ struct protoent *protocolEntry;
else {
socketFD = socket(AF_INET, SOCK_STREAM,0);
}
-
+
if (socketFD < 0) {
#ifndef DISABLE_TRACE
@@ -131,7 +131,7 @@ struct protoent *protocolEntry;
serverAddress.sin_addr.s_addr = htonl(INADDR_ANY);
serverAddress.sin_port = htons(portNumber);
- if (bind(socketFD, (struct sockaddr *) &serverAddress,
+ if (bind(socketFD, (struct sockaddr *) &serverAddress,
sizeof(serverAddress))<0){
#ifndef DISABLE_TRACE
if (srcTrace) {
@@ -146,7 +146,7 @@ struct protoent *protocolEntry;
/* set socket to non-blocking for linux */
fcntl(socketFD,FNDELAY,0);
#endif
-
+
if (listen(socketFD,5) == -1) {
#ifndef DISABLE_TRACE
if (srcTrace) {
@@ -160,7 +160,7 @@ struct protoent *protocolEntry;
/* set socket to non-blocking */
ioctl(socketFD,FIONBIO,0);
#endif
-
+
return(socketFD);
}
@@ -259,7 +259,7 @@ fd_set readfds;
else {
return(0);
}
-
+
}
int NetIsThereAConnection(socketFD)
diff --git a/src/annotate.c b/src/annotate.c
index 014a9a8..f231a1b 100644
--- a/src/annotate.c
+++ b/src/annotate.c
@@ -173,8 +173,8 @@ static void set_annotation_mode (mo_window *win, int mode)
{
win->annotation_mode = mode;
- XmxSetSensitive
- (win->delete_button,
+ XmxSetSensitive
+ (win->delete_button,
mode == mo_edit_annotation ? XmxSensitive : XmxNotSensitive);
return;
}
@@ -230,12 +230,12 @@ static XmxCallback (annotate_win_cb)
for (i = 0; i < strlen (author); i++)
if (author[i] == '\"')
author[i] = '\'';
-
+
/*
* Add the new annotation to the server -- with its real URL
* if inside an HDF file, else the canonical form.
*/
- mo_new_grpan(mo_url_to_unique_document
+ mo_new_grpan(mo_url_to_unique_document
(win->current_node->url), title, author, txt);
mo_set_win_current_node (win, win->current_node);
@@ -263,8 +263,8 @@ static XmxCallback (annotate_win_cb)
/*
* Change the annotation on the server
*/
- mo_modify_grpan(mo_url_to_unique_document
- (win->current_node->url),
+ mo_modify_grpan(mo_url_to_unique_document
+ (win->current_node->url),
title, author, txt);
mo_reload_window_text (win, 0);
@@ -282,10 +282,10 @@ static XmxCallback (annotate_win_cb)
{
if (win->annotation_mode == mo_new_annotation)
{
- mo_new_pan
- (mo_url_to_unique_document (win->current_node->url),
- XmxTextGetString (win->annotate_title),
- XmxTextGetString (win->annotate_author),
+ mo_new_pan
+ (mo_url_to_unique_document (win->current_node->url),
+ XmxTextGetString (win->annotate_title),
+ XmxTextGetString (win->annotate_author),
txt);
/* Inefficient, but safe. */
mo_write_pan_list ();
@@ -294,8 +294,8 @@ static XmxCallback (annotate_win_cb)
else /* edit annotation */
{
mo_modify_pan (win->editing_id,
- XmxTextGetString (win->annotate_title),
- XmxTextGetString (win->annotate_author),
+ XmxTextGetString (win->annotate_title),
+ XmxTextGetString (win->annotate_author),
txt);
/* Inefficient, but safe. */
mo_write_pan_list ();
@@ -325,7 +325,7 @@ static XmxCallback (passwd_toggle_cb)
{
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
int on = XmToggleButtonGetState (win->passwd_toggle);
-
+
if (on)
{
XmxSetSensitive (win->passwd_label, XmxSensitive);
@@ -353,7 +353,7 @@ static void do_slate (mo_window *win)
sprintf (namestr, "%s (%s)",
get_pref_string(eDEFAULT_AUTHOR_EMAIL),
get_pref_string(eDEFAULT_AUTHOR_NAME));
-
+
XmxTextSetString (win->annotate_author, namestr);
sprintf (namestr, "%s %s","Annotation by",
@@ -382,7 +382,7 @@ static XmxCallback (include_fsb_cb)
XtUnmanageChild (win->include_fsb);
fname = (char *)malloc (128 * sizeof (char));
-
+
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET,
&fname);
@@ -406,8 +406,8 @@ static XmxCallback (include_fsb_cb)
sprintf(final,"\nUnable to Open File:\n %s\n\nOpen Error:\n %s\n",(!efname || !*efname?" ":efname),buf);
- XmxMakeErrorDialog (win->annotate_win,
- final,
+ XmxMakeErrorDialog (win->annotate_win,
+ final,
"Annotation Open Error");
XtManageChild (Xmx_w);
@@ -417,14 +417,14 @@ static XmxCallback (include_fsb_cb)
}
return;
}
-
+
while (1)
{
long pos;
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
goto done;
-
+
XmTextInsert (win->annotate_text,
pos = XmTextGetInsertionPosition (win->annotate_text),
line);
@@ -452,7 +452,7 @@ static XmxCallback (include_button_cb)
{
XmFileSelectionDoSearch (win->include_fsb, NULL);
}
-
+
XmxManageRemanage (win->include_fsb);
return;
@@ -478,19 +478,19 @@ mo_status mo_delete_annotation (mo_window *win, int id)
return mo_fail;
mo_delete_pan (id);
-
+
/* Now that we've deleted the annotation, take care of
business. Damn, but this shouldn't have to happen here. */
if (win->current_node->previous)
{
mo_node *prev = win->current_node->previous;
-
+
mo_kill_node (win, win->current_node);
prev->next = NULL;
win->current_node = prev;
/* Set the text. */
mo_reload_window_text (win, 0);
- }
+ }
else
{
/* No previous node; this only happens if someone's dumb enough
@@ -502,7 +502,7 @@ mo_status mo_delete_annotation (mo_window *win, int id)
mo_load_window_text (win, home_document, NULL);
}
-
+
return mo_succeed;
}
@@ -522,13 +522,13 @@ mo_status mo_delete_group_annotation (mo_window *win, char *url)
if (win->current_node->previous)
{
mo_node *prev = win->current_node->previous;
-
+
mo_kill_node (win, win->current_node);
prev->next = NULL;
win->current_node = prev;
/* Set the text. */
mo_reload_window_text (win, 0);
- }
+ }
else
{
/* No previous node; this only happens if someone's dumb enough
@@ -540,7 +540,7 @@ mo_status mo_delete_group_annotation (mo_window *win, char *url)
mo_load_window_text (win, home_document, NULL);
}
-
+
return mo_succeed;
}
@@ -561,7 +561,7 @@ static XmxCallback (delete_button_cb)
{
mo_delete_group_annotation (win, win->current_node->url);
}
-
+
return;
}
@@ -605,7 +605,7 @@ static void do_privacy (mo_window *win)
static XmxCallback (pubpri_opts_cb)
{
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
-
+
win->pubpri = XmxExtractToken ((int)client_data);
#ifdef GRPAN_PASSWD
@@ -627,7 +627,7 @@ static XmxCallback (pubpri_opts_cb)
If mo_post_annotate_win is told it's supposed to edit,
then it installs title, author, text, etc. as it sees fit.
- If, while in edit mode, 'Clear Slate' gets hit,
+ If, while in edit mode, 'Clear Slate' gets hit,
mode flips to mo_edit_annotation regardless -- everything's wiped out.
*/
@@ -643,25 +643,25 @@ static void make_annotate_win (mo_window *win)
#ifdef GRPAN_PASSWD
Widget passwd_frame, passwd_f;
#endif
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
XmxSetArg (XmNresizePolicy, XmRESIZE_GROW);
- win->annotate_win = XmxMakeFormDialog
+ win->annotate_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Annotate Window" );
dialog_frame = XmxMakeFrame (win->annotate_win, XmxShadowOut);
-
+
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
annotate_form = XmxMakeForm (dialog_frame);
-
+
author_label = XmxMakeLabel (annotate_form, "Annotation Author:" );
win->annotate_author = XmxMakeTextField (annotate_form);
-
+
title_label = XmxMakeLabel (annotate_form, "Annotation Title:" );
win->annotate_title = XmxMakeTextField (annotate_form);
@@ -671,11 +671,11 @@ static void make_annotate_win (mo_window *win)
(annotate_form, "", pubpri_opts_cb, pubpri_opts);
XmxRSetSensitive (win->pubpri_menu, mo_annotation_public, XmxNotSensitive);
if (!get_pref_string(eANNOTATION_SERVER))
- XmxRSetSensitive (win->pubpri_menu, mo_annotation_workgroup,
+ XmxRSetSensitive (win->pubpri_menu, mo_annotation_workgroup,
XmxNotSensitive);
win->pubpri = mo_annotation_private;
-#ifdef GRPAN_PASSWD
+#ifdef GRPAN_PASSWD
/* --- Frame for the password fields. --- */
XmxSetArg (XmNmarginWidth, 4);
XmxSetArg (XmNmarginHeight, 4);
@@ -683,17 +683,17 @@ static void make_annotate_win (mo_window *win)
passwd_frame = XmxMakeFrame (annotate_form, XmxShadowEtchedOut);
passwd_f = XmxMakeForm (passwd_frame);
{
- win->passwd_toggle = XmxMakeToggleButton
+ win->passwd_toggle = XmxMakeToggleButton
(passwd_f, "Password Protection" , passwd_toggle_cb, 0);
XmxSetToggleButton (win->passwd_toggle, XmxSet);
-
+
win->passwd_label = XmxMakeLabel (passwd_f, "Password:" );
XmxSetArg (XmNcolumns, 20);
win->annotate_passwd = XmxMakeTextField (passwd_f);
XmxSetOffsets (win->passwd_toggle, 1, 0, 2, 10);
- XmxSetConstraints
- (win->passwd_toggle, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (win->passwd_toggle, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_NONE, NULL, NULL, NULL, NULL);
XmxSetOffsets (win->passwd_label, 1, 0, 15, 10);
XmxSetConstraints
@@ -705,14 +705,14 @@ static void make_annotate_win (mo_window *win)
XmATTACH_WIDGET, XmATTACH_FORM, NULL, NULL, win->passwd_label, NULL);
}
#endif
-
+
logo = XmxMakeNamedLabel (annotate_form, NULL, "logo");
XmxApplyBitmapToLabelWidget
(logo, annotate_bits, annotate_width, annotate_height);
-
+
sep = XmxMakeHorizontalSeparator (annotate_form);
-
- text_label = XmxMakeLabel
+
+ text_label = XmxMakeLabel
(annotate_form, "Enter the annotation text:");
clear_button = XmxMakePushButton
@@ -721,7 +721,7 @@ static void make_annotate_win (mo_window *win)
(annotate_form, "Include File..." , include_button_cb, 0);
win->delete_button = XmxMakePushButton
(annotate_form, "Delete" , delete_button_cb, 0);
-
+
XmxSetArg (XmNscrolledWindowMarginWidth, 10);
XmxSetArg (XmNscrolledWindowMarginHeight, 8);
XmxSetArg (XmNcursorPositionVisible, True);
@@ -730,14 +730,14 @@ static void make_annotate_win (mo_window *win)
XmxSetArg (XmNrows, 15);
XmxSetArg (XmNcolumns, 80);
win->annotate_text = XmxMakeScrolledText (annotate_form);
-
+
dialog_sep = XmxMakeHorizontalSeparator (annotate_form);
-
+
buttons_form = XmxMakeFormAndThreeButtonsSqueezed
(annotate_form, annotate_win_cb, "Save" ,
- "Dismiss" , "Help..." ,
+ "Dismiss" , "Help..." ,
0, 1, 2);
-
+
/* Constraints for annotate_form. */
/* author_label: top form, bottom nothing,
left form, right nothing. */
@@ -757,7 +757,7 @@ static void make_annotate_win (mo_window *win)
XmxSetOffsets (title_label, 14, 10, 10, 10);
XmxSetConstraints
(title_label, XmATTACH_WIDGET, XmATTACH_NONE,
- XmATTACH_FORM, XmATTACH_NONE,
+ XmATTACH_FORM, XmATTACH_NONE,
win->annotate_author, NULL, NULL, NULL);
/* annotate_title: top annotate_author, bottom nothing,
left title_label, right logo. */
@@ -773,7 +773,7 @@ static void make_annotate_win (mo_window *win)
#endif
XmxSetConstraints
(win->pubpri_menu->base, XmATTACH_WIDGET, XmATTACH_NONE,
- XmATTACH_FORM, XmATTACH_NONE,
+ XmATTACH_FORM, XmATTACH_NONE,
win->annotate_title, NULL, NULL, NULL);
#ifdef GRPAN_PASSWD
/* passwd_frame: top annotate_title, bottom nothing,
@@ -793,7 +793,7 @@ static void make_annotate_win (mo_window *win)
(sep, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_FORM, win->pubpri_menu->base, NULL, NULL, NULL);
#endif /* not GRPAN_PASSWD */
-
+
/* text_label: top sep, bottom nothing,
left form, right nothing */
XmxSetOffsets (text_label, 12, 0, 10, 10);
@@ -801,7 +801,7 @@ static void make_annotate_win (mo_window *win)
(text_label, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_FORM, XmATTACH_NONE,
sep, NULL, NULL, NULL);
-
+
/* Buttons */
XmxSetOffsets (clear_button, 8, 0, 0, 3);
XmxSetConstraints
@@ -818,27 +818,27 @@ static void make_annotate_win (mo_window *win)
(win->delete_button, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_NONE, XmATTACH_FORM,
sep, NULL, NULL, NULL);
-
+
/* logo: top form, bottom nothing,
left nothing, right form. */
XmxSetOffsets (logo, 5, 10, 10, 5);
XmxSetConstraints
(logo, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_NONE, XmATTACH_FORM,
NULL, NULL, NULL, NULL);
-
+
XmxSetOffsets (XtParent (win->annotate_text), 0, 2, 0, 0);
XmxSetConstraints
- (XtParent (win->annotate_text), XmATTACH_WIDGET, XmATTACH_WIDGET,
+ (XtParent (win->annotate_text), XmATTACH_WIDGET, XmATTACH_WIDGET,
XmATTACH_FORM, XmATTACH_FORM,
text_label, dialog_sep, NULL, NULL);
-
+
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
NULL, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
@@ -848,7 +848,7 @@ static void make_annotate_win (mo_window *win)
do_privacy (win);
#endif
win->include_fsb = 0;
-
+
return;
}
@@ -865,8 +865,8 @@ static void make_annotate_win (mo_window *win)
* window title should change (to Edit Annotation)
* 'Annotate' should change to 'Commit'.
Right now this doesn't happen. */
-mo_status mo_post_annotate_win
- (mo_window *win, int edit_flag, int id, char *title, char *author,
+mo_status mo_post_annotate_win
+ (mo_window *win, int edit_flag, int id, char *title, char *author,
char *text, char *fname)
{
if (!win->current_node)
@@ -875,7 +875,7 @@ mo_status mo_post_annotate_win
/* First thing we do is create the window if it doesn't exist yet. */
if (!win->annotate_win)
make_annotate_win (win);
-
+
/* If we're in edit mode, then do the right thing. */
if (edit_flag)
{
@@ -891,7 +891,7 @@ mo_status mo_post_annotate_win
else if (win->current_node->annotation_type == mo_annotation_workgroup)
win->pubpri = mo_annotation_workgroup;
XmxRSetOptionMenuHistory(win->pubpri_menu, win->pubpri);
-
+
XmxTextSetString (win->annotate_author, author);
XmxTextSetString (win->annotate_title, title);
#ifdef GRPAN_PASSWD
@@ -907,7 +907,7 @@ mo_status mo_post_annotate_win
/* Finally, we manage. */
XmxManageRemanage (win->annotate_win);
-
+
return mo_succeed;
}
diff --git a/src/annotate.h b/src/annotate.h
index a8d1444..9eca498 100644
--- a/src/annotate.h
+++ b/src/annotate.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/audan.c b/src/audan.c
index 389f375..6e57835 100644
--- a/src/audan.c
+++ b/src/audan.c
@@ -75,7 +75,7 @@ mo_status mo_audio_capable (void)
struct stat buf;
int r;
- r = stat (filename, &buf);
+ r = stat (filename, &buf);
if (r != -1 && buf.st_mode & S_IXOTH)
return mo_succeed;
else
@@ -96,8 +96,8 @@ static XmxCallback (start_cb)
if ((win->record_pid = fork ()) < 0)
{
/* Uh oh, no process. */
- XmxMakeErrorDialog (win->audio_annotate_win,
- "Unable to start audio recording process." ,
+ XmxMakeErrorDialog (win->audio_annotate_win,
+ "Unable to start audio recording process." ,
"Audio Annotation Error" );
XtManageChild (Xmx_w);
}
@@ -123,7 +123,7 @@ static XmxCallback (stop_cb)
/* Stop the record process. This works for both SGI recordaiff
and Sun record, apparently. */
kill (win->record_pid, SIGINT);
-
+
/* Wait until the process is dead. */
waitpid (win->record_pid, NULL, 0);
@@ -151,7 +151,7 @@ static XmxCallback (buttons_cb)
{
/* Stop the record process. */
kill (win->record_pid, SIGINT);
-
+
/* Wait until the process is dead. */
waitpid (win->record_pid, NULL, 0);
}
@@ -164,7 +164,7 @@ static XmxCallback (buttons_cb)
FILE *fp;
int len;
extern char *machine;
-
+
sprintf (namestr, "%s <%s>",
get_pref_string(eDEFAULT_AUTHOR_NAME),
get_pref_string(eDEFAULT_AUTHOR_EMAIL));
@@ -172,7 +172,7 @@ static XmxCallback (buttons_cb)
sprintf (titlestr, "%s %s",
"Audio Annotation by" ,
get_pref_string(eDEFAULT_AUTHOR_NAME));
-
+
len = 0;
fp = fopen(win->record_fnam, "r");
if (fp != NULL)
@@ -195,41 +195,41 @@ static XmxCallback (buttons_cb)
}
fclose(fp);
}
-
+
if (len <= 0)
{
- XmxMakeErrorDialog
- (win->base, "Unable to complete audio annotation." ,
+ XmxMakeErrorDialog
+ (win->base, "Unable to complete audio annotation." ,
"Audio Annotation Error" );
XtManageChild (Xmx_w);
}
-
+
mo_audio_grpan(win->current_node->url, titlestr, namestr,
(char *)data, len);
if (data)
free((char *)data);
-
+
mo_set_win_current_node (win, win->current_node);
}
else
{
/* Do the right thing. */
int pan_id = mo_next_pan_id ();
- char *default_directory =
+ char *default_directory =
get_pref_string(ePRIVATE_ANNOTATION_DIRECTORY);
char filename[500], *cmd, namestr[200], textstr[500], titlestr[200];
extern char *machine;
-
+
#ifdef __sgi
- sprintf (filename, "%s/%s/%s%d.aiff", getenv ("HOME"),
+ sprintf (filename, "%s/%s/%s%d.aiff", getenv ("HOME"),
default_directory,
"PAN-", pan_id);
#else /* sun or hp */
- sprintf (filename, "%s/%s/%s%d.au", getenv ("HOME"),
+ sprintf (filename, "%s/%s/%s%d.au", getenv ("HOME"),
default_directory,
"PAN-", pan_id);
#endif
-
+
/*SWP -- New "mv" fucntion to take care of these /bin/mv things*/
{
char retBuf[BUFSIZ];
@@ -248,19 +248,19 @@ static XmxCallback (buttons_cb)
sprintf (namestr, "%s <%s>",
get_pref_string(eDEFAULT_AUTHOR_NAME),
get_pref_string(eDEFAULT_AUTHOR_EMAIL));
- sprintf (textstr,
+ sprintf (textstr,
"This is an audio annotation. \n\nTo hear the annotation, click here.
\n" , filename);
mo_new_pan (win->current_node->url, titlestr, namestr,
textstr);
-
+
/* Inefficient, but safe. */
mo_write_pan_list ();
-
+
mo_set_win_current_node (win, win->current_node);
}
}
-
+
win->record_pid = 0;
win->record_fnam = 0;
@@ -271,10 +271,10 @@ static XmxCallback (buttons_cb)
{
/* Stop the record process. */
kill (win->record_pid, SIGINT);
-
+
/* Wait until the process is dead. */
waitpid (win->record_pid, NULL, 0);
-
+
win->record_pid = 0;
win->record_fnam = 0;
}
@@ -287,7 +287,7 @@ static XmxCallback (buttons_cb)
NULL, NULL);
break;
}
-
+
return;
}
@@ -298,7 +298,7 @@ extern XmxOptionMenuStruct *pubpri_opts;
static XmxCallback (pubpri_opts_cb)
{
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
-
+
win->audio_pubpri = XmxExtractToken ((int)client_data);
return;
@@ -318,22 +318,22 @@ mo_status mo_post_audio_annotate_win (mo_window *win)
/* Create it for the first time. */
XmxSetUniqid (win->id);
XmxSetArg (XmNresizePolicy, XmRESIZE_GROW);
- win->audio_annotate_win = XmxMakeFormDialog
+ win->audio_annotate_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Audio Annotate Window" );
dialog_frame = XmxMakeFrame (win->audio_annotate_win, XmxShadowOut);
-
+
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
XmxSetArg (XmNfractionBase, 2);
audio_annotate_form = XmxMakeForm (dialog_frame);
-
- yap_label = XmxMakeLabel
+
+ yap_label = XmxMakeLabel
(audio_annotate_form, "Press Start to start recording; Stop to stop recording.\nRepeat until you're satisfied with the annotation.\nThen either Save or Dismiss the annotation." );
-
+
win->audio_start_button = XmxMakePushButton (audio_annotate_form,
"Start" ,
start_cb,
@@ -345,34 +345,34 @@ mo_status mo_post_audio_annotate_win (mo_window *win)
win->audio_pubpri_menu = XmxRMakeOptionMenu
(audio_annotate_form, "", pubpri_opts_cb, pubpri_opts);
- XmxRSetSensitive (win->audio_pubpri_menu, mo_annotation_public,
+ XmxRSetSensitive (win->audio_pubpri_menu, mo_annotation_public,
XmxNotSensitive);
if (! get_pref_string(eANNOTATION_SERVER))
- XmxRSetSensitive (win->audio_pubpri_menu, mo_annotation_workgroup,
+ XmxRSetSensitive (win->audio_pubpri_menu, mo_annotation_workgroup,
XmxNotSensitive);
win->audio_pubpri = mo_annotation_private;
dialog_sep = XmxMakeHorizontalSeparator (audio_annotate_form);
-
+
buttons_form = XmxMakeFormAndThreeButtons
(audio_annotate_form, buttons_cb, "Save" ,
- "Dismiss" , "Help..." ,
+ "Dismiss" , "Help..." ,
0, 1, 2);
-
+
/* Constraints for audio_annotate_form. */
XmxSetOffsets (yap_label, 10, 10, 10, 10);
XmxSetConstraints
(yap_label, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
NULL, NULL, NULL, NULL);
XmxSetOffsets (win->audio_start_button, 10, 10, 10, 10);
- XmxSetConstraints
+ XmxSetConstraints
(win->audio_start_button, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_FORM, XmATTACH_NONE,
yap_label, NULL, NULL, NULL);
XmxSetOffsets (win->audio_stop_button, 10, 10, 10, 10);
- XmxSetConstraints
+ XmxSetConstraints
(win->audio_stop_button, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_WIDGET, XmATTACH_NONE,
yap_label, NULL, win->audio_start_button, NULL);
@@ -381,14 +381,14 @@ mo_status mo_post_audio_annotate_win (mo_window *win)
(win->audio_pubpri_menu->base, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_WIDGET, XmATTACH_FORM,
yap_label, NULL, win->audio_stop_button, NULL);
-
+
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_FORM,
win->audio_pubpri_menu->base, NULL, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_FORM,
dialog_sep, NULL, NULL, NULL);
}
@@ -396,7 +396,7 @@ mo_status mo_post_audio_annotate_win (mo_window *win)
XmxManageRemanage (win->audio_annotate_win);
XmxSetSensitive (win->audio_stop_button, XmxNotSensitive);
XmxSetSensitive (win->audio_start_button, XmxSensitive);
-
+
return mo_succeed;
}
diff --git a/src/audan.h b/src/audan.h
index 78341d5..3a409f7 100644
--- a/src/audan.h
+++ b/src/audan.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/bla.c b/src/bla.c
index d27a4a3..0549135 100644
--- a/src/bla.c
+++ b/src/bla.c
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/* CCI redirect object
+/* CCI redirect object
** =================
*/
@@ -84,8 +84,8 @@ struct _HTStream {
HTAtom *dataType;
char fileName[L_tmpnam]; /* name of temp file... kept for unlink()ing*/
- FILE *fp;
-
+ FILE *fp;
+
int compressed;
};
@@ -143,8 +143,8 @@ PRIVATE void CCI_free ARGS1(HTStream *, me)
{
#ifndef DISABLE_TRACE
if (cciTrace)
- fprintf
- (stderr,
+ fprintf
+ (stderr,
"[CCI_free] OK, we're going to decompress HText\n");
#endif
HTCompressedHText (me->text, me->compressed, 1);
@@ -163,7 +163,7 @@ PRIVATE void CCI_end_document ARGS1(HTStream *, me)
fclose(me->fp);
/* ship it */
if ( me->compressed != COMPRESSED_NOT)
- HTCompressedFileToFile (me->fileName, me->compressed);
+ HTCompressedFileToFile (me->fileName, me->compressed);
MoCCISendOutputToClient(HTAtom_name(me->dataType),me->fileName);
/*
unlink(me->fileName);
@@ -182,13 +182,13 @@ PRIVATE void CCI_handle_interrupt ARGS1(HTStream *, me)
** -----------------------
*/
PUBLIC WWW_CONST HTStreamClass CCIout =
-{
+{
"CCIout",
CCI_free,
CCI_end_document,
CCI_put_character, CCI_put_string, CCI_write,
CCI_handle_interrupt
-};
+};
/* New object
@@ -196,14 +196,14 @@ PUBLIC WWW_CONST HTStreamClass CCIout =
*/
PUBLIC HTStream* CCIPresent ARGS5(
HTPresentation *, pres,
- HTParentAnchor *, anchor,
+ HTParentAnchor *, anchor,
HTStream *, sink,
HTFormat, format_in,
int, compressed)
{
HTStream* me = (HTStream*)malloc(sizeof(HTStream));
- me->isa = &CCIout;
+ me->isa = &CCIout;
(void) tmpnam(me->fileName);
if (!(me->fp = fopen(me->fileName,"w"))) {
diff --git a/src/bla.h b/src/bla.h
index 2012295..3eaf8ed 100644
--- a/src/bla.h
+++ b/src/bla.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/cci.h b/src/cci.h
index d874443..c4a0b22 100644
--- a/src/cci.h
+++ b/src/cci.h
@@ -91,7 +91,7 @@
#define MCCI_S_QUIT "QUIT"
#define MCCI_S_SEND "SEND"
#define MCCI_S_OUTPUT "OUTPUT"
-#define MCCI_S_ANCHOR "ANCHOR"
+#define MCCI_S_ANCHOR "ANCHOR"
#define MCCI_S_BEFORE "BEFORE"
#define MCCI_S_AFTER "AFTER"
#define MCCI_S_HANDLER "HANDLER" /* ADC ZZZ */
@@ -147,7 +147,7 @@
#define MCCI_PLAINTEXT "PLAINTEXT"
#define MCCI_FORMATTEDTEXT "FORMATTEDTEXT"
#define MCCI_POSTSCRIPT "POSTSCRIPT"
-#define MCCI_HTML "HTML"
+#define MCCI_HTML "HTML"
#define MCCI_BACK "BACK"
#define MCCI_FORWARD "FORWARD"
@@ -211,19 +211,19 @@
#define MCCIR_SEND_ANCH_BEF_HIST_OK 286 /* from history */
#define MCCIR_SEND_ANCH_BEF_HOTL_OK 287 /* from hotlist */
#define MCCIR_SEND_ANCH_BEF_MCCI_OK 288 /* from CCI */
-#define MCCIR_SEND_ANCH_BEF_OTHR_OK 289 /* from other source */
+#define MCCIR_SEND_ANCH_BEF_OTHR_OK 289 /* from other source */
/* sendAnchor After return codes */
-#define MCCIR_SEND_ANCH_AFT_LINK_OK 290 /* clicked link */
-#define MCCIR_SEND_ANCH_AFT_OPEN_OK 291 /* used open dialog */
-#define MCCIR_SEND_ANCH_AFT_EDIT_OK 292 /* edited URL field */
-#define MCCIR_SEND_ANCH_AFT_FORW_OK 293 /* clicked forward */
-#define MCCIR_SEND_ANCH_AFT_BACK_OK 294 /* clicked back */
-#define MCCIR_SEND_ANCH_AFT_RELO_OK 295 /* clicked reload */
-#define MCCIR_SEND_ANCH_AFT_HIST_OK 296 /* from history */
-#define MCCIR_SEND_ANCH_AFT_HOTL_OK 297 /* from hotlist */
-#define MCCIR_SEND_ANCH_AFT_MCCI_OK 298 /* from CCI */
-#define MCCIR_SEND_ANCH_AFT_OTHR_OK 299 /* from other source */
+#define MCCIR_SEND_ANCH_AFT_LINK_OK 290 /* clicked link */
+#define MCCIR_SEND_ANCH_AFT_OPEN_OK 291 /* used open dialog */
+#define MCCIR_SEND_ANCH_AFT_EDIT_OK 292 /* edited URL field */
+#define MCCIR_SEND_ANCH_AFT_FORW_OK 293 /* clicked forward */
+#define MCCIR_SEND_ANCH_AFT_BACK_OK 294 /* clicked back */
+#define MCCIR_SEND_ANCH_AFT_RELO_OK 295 /* clicked reload */
+#define MCCIR_SEND_ANCH_AFT_HIST_OK 296 /* from history */
+#define MCCIR_SEND_ANCH_AFT_HOTL_OK 297 /* from hotlist */
+#define MCCIR_SEND_ANCH_AFT_MCCI_OK 298 /* from CCI */
+#define MCCIR_SEND_ANCH_AFT_OTHR_OK 299 /* from other source */
/* ADC ZZZ */
#define MCCIR_SEND_ANCH_HAN_OTHR_OK 270 /* ADC ZZZ */
@@ -255,21 +255,21 @@
typedef enum{
/* selected from menu */
- MOSAIC_NEW, MOSAIC_CLONE, MOSAIC_OPEN_URL, FILE_OPEN_LOCAL,
+ MOSAIC_NEW, MOSAIC_CLONE, MOSAIC_OPEN_URL, FILE_OPEN_LOCAL,
MOSAIC_RELOAD_CURRENT,
/*5*/ FILE_RELOAD_IMAGES, FILE_REFRESH_CURRENT, FILE_FIND_IN_CURRENT,
/*8*/ FILE_VIEW_SOURCE, FILE_EDIT_SOURCE, FILE_SOURCE_DATE, MOSAIC_SAVE_AS,
/*12*/ FILE_PRINT, FILE_MAIL_TO, FILE_CCI, MOSAIC_CLOSE, FILE_EXIT_PROGRAM,
/*17*/
- OPTIONS_FANCY_SELECTIONS_ON, OPTIONS_FANCY_SELECTIONS_OFF,
+ OPTIONS_FANCY_SELECTIONS_ON, OPTIONS_FANCY_SELECTIONS_OFF,
OPTIONS_LOAD_TO_LOCAL_DISK_ON, OPTIONS_LOAD_TO_LOCAL_DISK_OFF,
OPTIONS_DELAY_IMAGE_LOADING_ON, OPTIONS_DELAY_IMAGE_LOADING_OFF,
- OPTIONS_LOAD_IMAGES_IN_CURRENT, OPTIONS_RELOAD_CONFIG_FILES,
- OPTIONS_FLUSH_IMAGE_CACHE, OPTIONS_CLEAR_GLOBAL_HISTORY,
+ OPTIONS_LOAD_IMAGES_IN_CURRENT, OPTIONS_RELOAD_CONFIG_FILES,
+ OPTIONS_FLUSH_IMAGE_CACHE, OPTIONS_CLEAR_GLOBAL_HISTORY,
/*27*/
OPTIONS_FONTS_TR, OPTIONS_FONTS_TS, OPTIONS_FONTS_TL,
- OPTIONS_FONTS_HR, OPTIONS_FONTS_HS, OPTIONS_FONTS_HL,
+ OPTIONS_FONTS_HR, OPTIONS_FONTS_HS, OPTIONS_FONTS_HL,
OPTIONS_FONTS_NCR, OPTIONS_FONTS_NCS, OPTIONS_FONTS_NCL,
OPTIONS_FONTS_LBR, OPTIONS_FONTS_LBS, OPTIONS_FONTS_LBL,
/*39*/
@@ -277,12 +277,12 @@ typedef enum{
OPTIONS_ANCHOR_UNDERLINES_MU, OPTIONS_ANCHOR_UNDERLINES_HU,
OPTIONS_ANCHOR_UNDERLINES_NU,
/*44*/
- MOSAIC_BACK, MOSAIC_FORWARD, MOSAIC_HOME_DOCUMENT,
- NAVIGATE_WINDOW_HISTORY, NAVIGATE_HOTLIST,
- NAVIGATE_ADD_CURRENT_TO_HOTLIST, NAVIGATE_INTERNET_STARTING_POINTS,
+ MOSAIC_BACK, MOSAIC_FORWARD, MOSAIC_HOME_DOCUMENT,
+ NAVIGATE_WINDOW_HISTORY, NAVIGATE_HOTLIST,
+ NAVIGATE_ADD_CURRENT_TO_HOTLIST, NAVIGATE_INTERNET_STARTING_POINTS,
NAVIGATE_INTERNET_RESOURCES_META_INDEX,
/*52*/
- ANNOTATE_ANNOTATE, ANNOTATE_AUDIO_ANNOTATE, ANNOTATE_EDIT_THIS_ANNOTATION,
+ ANNOTATE_ANNOTATE, ANNOTATE_AUDIO_ANNOTATE, ANNOTATE_EDIT_THIS_ANNOTATION,
ANNOTATE_DELETE_THIS_ANNOTATION,
/*56*/
NEWS_NEXT, NEWS_PREV, NEWS_NEXT_THREAD, NEWS_PREV_THREAD, NEWS_INDEX,
@@ -316,7 +316,7 @@ typedef enum{
/* Events for FTP transfer/commands. */
FTP_PUT, FTP_REMOVE, FTP_MKDIR ,
- OPTIONS_FLUSH_PASSWD_CACHE
+ OPTIONS_FLUSH_PASSWD_CACHE
}CCI_events;
diff --git a/src/cciBindings.c b/src/cciBindings.c
index 2924c95..fad38bf 100644
--- a/src/cciBindings.c
+++ b/src/cciBindings.c
@@ -168,7 +168,7 @@ char *s, *end, *tmp_end, *w_id;
if (!strcmp(command, MCCI_BACK))
mo_back_node(win);
else if (!strcmp(command, MCCI_FORWARD))
- mo_forward_node(win);
+ mo_forward_node(win);
else if (!strcmp(command, MCCI_HOME))
mo_access_document (win, home_document);
else if (!strcmp(command, MCCI_RELOAD))
@@ -229,7 +229,7 @@ char *s, *end, *tmp_end, *w_id;
status = mo_save_window(win, filename, 0);
else if (!strcmp(format, MCCI_FORMATTEDTEXT))
status = mo_save_window(win, filename, 1);
- else if (!strcmp(format, MCCI_HTML))
+ else if (!strcmp(format, MCCI_HTML))
status = mo_save_window(win, filename, 2);
else if (!strcmp(format, MCCI_POSTSCRIPT))
status = mo_save_window(win, filename, 4);
@@ -254,7 +254,7 @@ char *s, *end, *tmp_end, *w_id;
else if (!strcmp(command, MCCI_FINDINCURRENT)){
/* need to get search_string and CASE|NOCASE */
- char *s_string, *c;
+ char *s_string, *c;
mo_status found;
/* s is pointed pass the window id part */
@@ -270,7 +270,7 @@ char *s, *end, *tmp_end, *w_id;
if (tmp_end) *tmp_end = '\0';
GetWordFromString(s,&c,&end); /* Get command */
- if ((!c) || (c == end) ){
+ if ((!c) || (c == end) ){
*retCode = MCCIR_DOCOMMAND_FAILED;
strcpy(retText, "You Need to Specify CASE");
if (s_string) free(s_string);
@@ -334,7 +334,7 @@ char *s, *end, *tmp_end, *w_id;
status = mo_print_window(win, 0, printCommand);
else if (!strcmp(format, MCCI_FORMATTEDTEXT))
status = mo_print_window(win, 1, printCommand);
- else if (!strcmp(format, MCCI_HTML))
+ else if (!strcmp(format, MCCI_HTML))
status = mo_print_window(win, 2, printCommand);
else if (!strcmp(format, MCCI_POSTSCRIPT))
status = mo_print_window(win, 4, printCommand);
@@ -443,7 +443,7 @@ char *s, *end, *tmp_end, *w_id;
XmxSetArg (WbNdelayImageLoads, True);
XmxSetValues (win->scrolled_win);
*/
- XmxRSetSensitive (win->menubar, mo_expand_images_current,
+ XmxRSetSensitive (win->menubar, mo_expand_images_current,
win->delay_image_loads?XmxSensitive:XmxNotSensitive);
}
else if (!strcmp(on_off, MCCI_OFF)){
@@ -454,9 +454,9 @@ char *s, *end, *tmp_end, *w_id;
XmxSetArg (WbNdelayImageLoads, False);
XmxSetValues (win->scrolled_win);
*/
- XmxRSetSensitive (win->menubar, mo_expand_images_current,
+ XmxRSetSensitive (win->menubar, mo_expand_images_current,
win->delay_image_loads?XmxSensitive:XmxNotSensitive);
- }
+ }
else{
*retCode = MCCIR_DOCOMMAND_FAILED;
strcpy(retText, "You Need to Specify ON|OFF");
@@ -592,7 +592,7 @@ mo_status moStatus;
switch (output) {
case MCCI_OUTPUT_CURRENT:
/* turn flag on so mosaic will know to do a get*/
- cci_get = 1;
+ cci_get = 1;
moStatus = mo_load_window_text (current_win, url, NULL);
if (moStatus == mo_succeed) {
@@ -608,7 +608,7 @@ mo_status moStatus;
cci_get = 0; /* done with get, turn flag off */
case MCCI_OUTPUT_NEW:
/* turn flag on so mosaic will know to do a get*/
- cci_get = 1;
+ cci_get = 1;
if (!mo_open_another_window(current_win,url,NULL,NULL)) {
*retCode = MCCIR_GET_FAILED;
@@ -804,7 +804,7 @@ int length;
case MCCI_OUTPUT_NONE:
/* do not display output of post, but send the
output back through the cci to the client */
- response = mo_post_pull_er_over(url,
+ response = mo_post_pull_er_over(url,
contentType, postData, &textHead);
/* send response back through cci */
@@ -825,7 +825,7 @@ int length;
*retCode = MCCI_FAIL;
}
}
-
+
break;
case MCCI_OUTPUT_NEW:
/* open a new window and display posting... */
@@ -835,12 +835,12 @@ int length;
case MCCI_OUTPUT_CURRENT:
default:
/* display in current window */
- response = mo_post_pull_er_over(url,
+ response = mo_post_pull_er_over(url,
contentType, postData, &textHead);
/*mo_decode_internal_reference(url,response,url);*/
mo_do_window_text(current_win,url,
response,response,1,url,0,0);
-
+
break;
}
@@ -898,10 +898,10 @@ char *new_url;
ref = strdup(url);
new_url = strdup(url);
if (strcmp(contentType, "text/html") == 0)
- mo_do_window_text(current_win, new_url,
+ mo_do_window_text(current_win, new_url,
displayData, displayData, 1, ref, current_win->current_node->last_modified, current_win->current_node->expires);
else
- strcpy(retText, "Display text/html only");
+ strcpy(retText, "Display text/html only");
break;
}
@@ -927,8 +927,8 @@ char *url;
int type;
{
*retDataLength = 0;
-
- if ((type == MCCI_PRIVATE_ANNOTATION) ||
+
+ if ((type == MCCI_PRIVATE_ANNOTATION) ||
(type == MCCI_ALL_ANNOTATION)) {
if ((*retData) = mo_fetch_personal_annotations(url)) {
*retCode = MCCIR_PRIVATE_ANNOTATION;
@@ -945,7 +945,7 @@ int type;
*retCode = MCCIR_NO_ANNOTATION;
strcpy(retText,"Only Private annotations currently supported");
}
-
+
return;
}
@@ -977,7 +977,7 @@ char *url;
}
else {
strcpy(retText,"No URL for given file name");
- *retCode = MCCIR_NO_URL_FOR_FILE;
+ *retCode = MCCIR_NO_URL_FOR_FILE;
}
}
diff --git a/src/cciBindings.h b/src/cciBindings.h
index 2012295..3eaf8ed 100644
--- a/src/cciBindings.h
+++ b/src/cciBindings.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/cciBindings2.c b/src/cciBindings2.c
index 66648aa..1140114 100644
--- a/src/cciBindings2.c
+++ b/src/cciBindings2.c
@@ -66,7 +66,7 @@
#include "HTFormat.h"
-static Boolean cciAccepting = 0;
+static Boolean cciAccepting = 0;
static int listenPortNumber=0;
static XtInputId connectInputID;
static List listOfConnections;
@@ -80,7 +80,7 @@ static List listOfForm; /* list of form submitted by application */
/* ADC ugly hack below ZZZZZ */
extern int CCIprotocol_handler_found;
extern int MCCIanchorcached;
-
+
extern XtAppContext app_context;
/***/ extern HTStream* CCIPresent();
extern char *machine_with_domain; /* host name */
@@ -110,7 +110,7 @@ struct FormSubmit{
MCCIPort client;
char *actionID;
int valid;
-};
+};
cciStat *cciStatListFindEntry(MCCIPort findMe)
{
@@ -128,12 +128,12 @@ cciStat *cciStatListFindEntry(MCCIPort findMe)
}
return current;
}
-
+
cciStat *cciStatListDeleteEntry(MCCIPort deleteMe)
{
cciStat *current;
-
+
if (current = cciStatListFindEntry(deleteMe))
{
ListDeleteEntry(listOfSendAnchorTo,current);
@@ -146,18 +146,18 @@ cciStat *cciStatListDeleteEntry(MCCIPort deleteMe)
void cciStatPreventSendAnchor(MCCIPort client, char *url)
{
/* this sets the flag that is checked for in cciSafeToSend, but
- * only if sendAnchor is on for this client.
+ * only if sendAnchor is on for this client.
*/
-
+
cciStat *current;
if ((current = cciStatListFindEntry(client)) && (url != NULL))
current->url = strdup(url);
}
-
+
int cciSafeToSend(cciStat *current, char *url)
{
-/* ensures that Mosaic does not send an ANCHOR in response to a GET
+/* ensures that Mosaic does not send an ANCHOR in response to a GET
* if SEND ANCHOR is turned on.
*
* INPUTS:
@@ -167,7 +167,7 @@ int cciSafeToSend(cciStat *current, char *url)
* 1 if flag is not set for (client,url) pair
* (safe to send)
*/
-
+
int rc = 1;
if (current->url != NULL)
@@ -177,7 +177,7 @@ int cciSafeToSend(cciStat *current, char *url)
current->url = NULL;
}
return rc;
-}
+}
void cciStatFree(cciStat *i)
{
@@ -197,7 +197,7 @@ cciStat *cciStatNew(MCCIPort client, int status)
}
return new;
}
-
+
void MoCCISendAnchor(client,sendIt)
/* set the state of sending anchors */
MCCIPort client;
@@ -255,9 +255,9 @@ int beforeAfter;
***************************************************************/
{
cciStat *client;
-
+
client = (cciStat *) ListHead(listOfSendAnchorTo);
- while(client)
+ while(client)
{
if (cciSafeToSend(client, url)) /* test flag */
switch (beforeAfter)
@@ -382,7 +382,7 @@ int registered = 0;
sendForm = (struct FormSubmit *)
ListCurrent(listOfForm);
#if 0
- sendForm->valid = 0;
+ sendForm->valid = 0;
#endif
}
else{
@@ -457,19 +457,19 @@ int retVal;
/* Write port number to .mosaiccciport */
char *home = getenv ("HOME"), *fnam;
FILE *fp;
-
+
if (!home)
home = "/tmp";
-
+
fnam = (char *)malloc (strlen (home) + 32);
sprintf (fnam, "%s/.mosaic/cciport", home); // SAM
-
+
fp = fopen (fnam, "w");
if (fp) {
fprintf(fp,"%s:%d\n",machine_with_domain,portNumber);
fclose (fp);
}
-
+
free (fnam);
}
return(retVal);
@@ -496,7 +496,7 @@ struct SendWhatToWhom *sendOutput;
ListDeleteEntry(listOfSendOutput,sendOutput);
FREE(sendOutput->contentType);
FREE(sendOutput);
-
+
sendOutput = (struct SendWhatToWhom *)
ListCurrent(listOfSendOutput);
}
@@ -534,7 +534,7 @@ struct SendWhatToWhom *sendOutput;
sendOutput = (struct SendWhatToWhom *)
ListNext(listOfSendOutput);
}
-
+
ListDeleteEntry(listOfConnections,con);
con = (struct Connection *)
ListCurrent(listOfConnections);
@@ -555,9 +555,9 @@ int source;
}
void MoCCINewConnection(app_context,source,inputID)
-XtAppContext app_context;
+XtAppContext app_context;
int *source;
-XtInputId *inputID;
+XtInputId *inputID;
{
MCCIPort client;
struct Connection *con;
@@ -580,8 +580,8 @@ struct Connection *con;
}
#endif
-/*
- this determines wether there is one or many cci clients connecting
+/*
+ this determines wether there is one or many cci clients connecting
XtRemoveInput(*inputID);
*/
@@ -616,9 +616,9 @@ char buff[256];
if (cciAccepting != XmToggleButtonGetState
(win->cci_accept_toggle)) {
/* reset toggle state */
- XmxSetToggleButton(win->cci_accept_toggle,
+ XmxSetToggleButton(win->cci_accept_toggle,
cciAccepting);
- XmxSetToggleButton(win->cci_off_toggle,
+ XmxSetToggleButton(win->cci_off_toggle,
!cciAccepting);
}
XtUnmanageChild(win->cci_win);
@@ -646,9 +646,9 @@ char buff[256];
XtManageChild (Xmx_w);
cciAccepting = False;
listenPortNumber = 0;
- XmxSetToggleButton(win->cci_accept_toggle,
+ XmxSetToggleButton(win->cci_accept_toggle,
cciAccepting);
- XmxSetToggleButton(win->cci_off_toggle,
+ XmxSetToggleButton(win->cci_off_toggle,
!cciAccepting);
return;
}
@@ -667,9 +667,9 @@ char buff[256];
else {
cciAccepting = False;
listenPortNumber = 0;
- XmxSetToggleButton(win->cci_accept_toggle,
+ XmxSetToggleButton(win->cci_accept_toggle,
cciAccepting);
- XmxSetToggleButton(win->cci_off_toggle,
+ XmxSetToggleButton(win->cci_off_toggle,
!cciAccepting);
/* Can't accept on this port...*/
XmxMakeErrorDialog (win->cci_win,
@@ -704,7 +704,7 @@ Widget buttonBox;
if (!win->cci_win) {
XmxSetUniqid (win->id);
- win->cci_win = XmxMakeFormDialog(win->base,
+ win->cci_win = XmxMakeFormDialog(win->base,
"NCSA Mosaic: Common Client Interface" );
dialogFrame = XmxMakeFrame(win->cci_win, XmxShadowOut);
XmxSetConstraints
@@ -716,7 +716,7 @@ Widget buttonBox;
label = XmxMakeLabel(cciForm, "CCI Port Address: " );
XmxSetArg(XmNcolumns, 25);
win->cci_win_text= XmxMakeText (cciForm);
- XmxAddCallbackToText (win->cci_win_text,
+ XmxAddCallbackToText (win->cci_win_text,
MoCCIWindowCallBack, 0);
toggleBox = XmxMakeRadioBox(cciForm);
@@ -738,25 +738,25 @@ Widget buttonBox;
XmxSetOffsets (label, 13, 0, 10, 0);
XmxSetConstraints
- (label, XmATTACH_FORM, XmATTACH_NONE,
+ (label, XmATTACH_FORM, XmATTACH_NONE,
XmATTACH_FORM, XmATTACH_NONE, NULL, NULL, NULL, NULL);
XmxSetOffsets (win->cci_win_text, 10, 0, 5, 8);
XmxSetConstraints
- (win->cci_win_text, XmATTACH_FORM, XmATTACH_NONE,
+ (win->cci_win_text, XmATTACH_FORM, XmATTACH_NONE,
XmATTACH_WIDGET,
XmATTACH_FORM, NULL, NULL, label, NULL);
- XmxSetConstraints (toggleBox, XmATTACH_WIDGET,
+ XmxSetConstraints (toggleBox, XmATTACH_WIDGET,
XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_NONE,
win->cci_win_text, NULL, label, NULL);
XmxSetOffsets (toggleBox, 8, 0, 2, 0);
- XmxSetConstraints (dialogSeparator, XmATTACH_WIDGET,
+ XmxSetConstraints (dialogSeparator, XmATTACH_WIDGET,
XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
toggleBox, NULL, NULL, NULL);
- XmxSetConstraints (buttonBox, XmATTACH_WIDGET,
+ XmxSetConstraints (buttonBox, XmATTACH_WIDGET,
XmATTACH_FORM, XmATTACH_FORM, XmATTACH_FORM,
dialogSeparator, NULL, NULL, NULL);
}
@@ -803,7 +803,7 @@ struct SendWhatToWhom *sendOutput;
}
sendOutput=(struct SendWhatToWhom *)ListNext(listOfSendOutput);
}
-
+
return;
}
@@ -832,13 +832,13 @@ int found = 0;
if (send){
send = 0;
sendForm=(struct FormSubmit *) ListHead(listOfForm);
- while(sendForm)
+ while(sendForm)
{
if ( !strcmp(actionID, sendForm->actionID))
/* found correct client */
{
if (sendForm->valid)
- MCCIFormQueryToClient(sendForm->client,
+ MCCIFormQueryToClient(sendForm->client,
actionID, query, contentType, post_data);
found = 1;
}
@@ -854,7 +854,7 @@ void MoCCISendOutput(MCCIPort client,Boolean sendIt,char *contentType)
struct SendWhatToWhom *sendOutput;
if (sendIt) {
- if (!(sendOutput = (struct SendWhatToWhom *)
+ if (!(sendOutput = (struct SendWhatToWhom *)
MALLOC(sizeof(struct SendWhatToWhom)))) {
return /*mem error*/;
}
@@ -891,7 +891,7 @@ struct SendWhatToWhom *sendOutput;
ListNext(listOfSendOutput);
}
}
-
+
}
}
@@ -907,7 +907,7 @@ int port;
(XtPointer) XtInputReadMask,
(XtInputCallbackProc) MoCCINewConnection,
app_context);
- cciAccepting = True;
+ cciAccepting = True;
listenPortNumber = port;
/*
XmxMakeInfoDialog(w,"Mosaic CCI port is listening",
@@ -1014,7 +1014,7 @@ char *data;
if (stat(filename,&fileInfo)) { /* get the length of the file */
return(MCCI_FAIL);
}
-
+
if (!(fp = fopen(filename,"r"))) {
return(MCCI_FAIL);
@@ -1058,7 +1058,7 @@ char *fileName;
char *url;
{
struct FileURL *fileURL;
-
+
#ifndef DISABLE_TRACE
if (cciTrace) {
fprintf(stderr,"MoCCIAddFileURLToList():fileName=\"%s\", url=\"%s\"\n",(fileName?fileName:"NULL"),(url?url:"NULL"));
@@ -1087,7 +1087,7 @@ char *fileName;
struct FileURL *fileURL;
fileURL = (struct FileURL *) ListHead(listOfFileToURLs);
- while (fileURL){
+ while (fileURL){
if (!strncmp(fileURL->fileName,fileName,
strlen(fileURL->fileName))) {
return(fileURL->url);
@@ -1097,7 +1097,7 @@ struct FileURL *fileURL;
return(NULL);
}
/* this rplaces a vanilla url name with the name it was actually called with,
- which is what is needed by external apps. It is indeed a huge hack, and
+ which is what is needed by external apps. It is indeed a huge hack, and
should be fixed
*/
void MoCCIAddAnchorToURL(url, urlAndAnchor)
@@ -1112,4 +1112,4 @@ char *urlAndAnchor;
}
}
-
+
diff --git a/src/cciBindings2.h b/src/cciBindings2.h
index ea56d5a..80fe237 100644
--- a/src/cciBindings2.h
+++ b/src/cciBindings2.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
@@ -89,13 +89,13 @@ void MoCCINewConnection(XtAppContext app_context,int *source,XtInputId *inputID)
static XmxCallback (MoCCIWindowCallBack);
mo_status MoDisplayCCIWindow(mo_window *win);
void MoCCISendOutputToClient(char *contentType,char *fileName);
-int MoCCIFormToClient(char *actionID, char *query, char *contentType,
+int MoCCIFormToClient(char *actionID, char *query, char *contentType,
char *post_data, int status);
void MoCCISendOutput(MCCIPort client,Boolean sendIt,char *contentType);
void MoCCIStartListening(Widget w,int port);
void MoCCISendEventOutput(CCI_events event_type);
void MoCCISendMouseAnchorOutput(char *anchor);
-void MoCCISendBrowserViewOutput(char *url, char *contentType,
+void MoCCISendBrowserViewOutput(char *url, char *contentType,
char *data, int dataLength);
int MoCCISendBrowserViewFile(char *url, char *contentType, char *filename);
int MoCCIMaxNumberOfConnectionsAllowed();
diff --git a/src/cciServer.c b/src/cciServer.c
index d64f3e7..94e9e4c 100644
--- a/src/cciServer.c
+++ b/src/cciServer.c
@@ -194,8 +194,8 @@ MCCIPort client;
}
int MCCIReadContent(client,content)
-/* read from client. Next line should contain Content-Length: value
- and then the content body. Returns the number of chars read.
+/* read from client. Next line should contain Content-Length: value
+ and then the content body. Returns the number of chars read.
0 on error. space is allocated and placed into 'content'*/
MCCIPort client;
char **content;
@@ -262,14 +262,14 @@ int MCCIHandleSend(client,line,retText)
{
int retCode;
char *s,*end,*start;
-
+
if (!(s = strchr(line,' ')))
{ /* skip over SEND */
strcpy(retText,"Error in protocol");
return(MCCIR_ERROR);
}
-
-
+
+
GetWordFromString(s,&start,&end);
if (!my_strncasecmp(start,MCCI_S_ANCHOR,strlen(MCCI_S_ANCHOR)))
{
@@ -279,9 +279,9 @@ int MCCIHandleSend(client,line,retText)
/* ejb 9 March 1995 added BEFORE and AFTER cases */
if (start && (start != end))
/* SEND ANCHOR STOP => turn off SEND ANCHOR */
- if (!my_strncasecmp(start,MCCI_S_STOP,strlen(MCCI_S_STOP)))
+ if (!my_strncasecmp(start,MCCI_S_STOP,strlen(MCCI_S_STOP)))
MCCIRequestSendAnchor(&retCode,retText,client,0);
- else
+ else
/* SEND ANCHOR BEFORE => Mosaic sends anchor, BEFORE done getting */
if (!my_strncasecmp(start,MCCI_S_BEFORE,strlen(MCCI_S_BEFORE)))
MCCIRequestSendAnchor(&retCode,retText,client,MCCI_SEND_BEFORE);
@@ -334,7 +334,7 @@ int MCCIHandleSend(client,line,retText)
MCCIRequestSendOutput(&retCode,retText,
client,1,start);
}
-
+
}
else {
/* "SEND OUTPUT" so send it all */
@@ -342,7 +342,7 @@ int MCCIHandleSend(client,line,retText)
client,1,(char *)0);
}
}
-
+
else if (!my_strncasecmp(start,MCCI_S_BROWSERVIEW,strlen(MCCI_S_BROWSERVIEW))){
/* SEND BROWSERVIEW */
s = end;
@@ -366,7 +366,7 @@ int MCCIHandleSend(client,line,retText)
client,1);
}
}
-
+
else if (!my_strncasecmp(start,MCCI_S_EVENT,strlen(MCCI_S_EVENT))){
/* SEND EVENT */
s = end;
@@ -491,7 +491,7 @@ char *next;
}
}
else {
- output = MCCI_DEFAULT;
+ output = MCCI_DEFAULT;
}
#ifndef DISABLE_TRACE
@@ -513,12 +513,12 @@ char *next;
}
#endif
- MCCIRequestPost(client,&retCode, retText, url, mimeType,
+ MCCIRequestPost(client,&retCode, retText, url, mimeType,
postData, postDataLength, output);
free(url);
free(mimeType);
-
+
return(retCode);
}
@@ -615,7 +615,7 @@ char *next;
}
}
else {
- output = MCCI_DEFAULT;
+ output = MCCI_DEFAULT;
}
#ifndef DISABLE_TRACE
@@ -638,12 +638,12 @@ char *next;
}
#endif
- MCCIRequestDisplay(client, &retCode, retText, url, mimeType,
+ MCCIRequestDisplay(client, &retCode, retText, url, mimeType,
displayData, displayDataLength, output);
free(url);
free(mimeType);
-
+
return(retCode);
}
@@ -666,7 +666,7 @@ int retCode;
/* absRel = MCCI_DEFAULT;*/
headerExt = (char *) 0;
headerExtLength=0;
-
+
if (!(s = strchr(line,' '))){ /* skip over GET */
strcpy(retText,"Error in protocol");
return(MCCIR_ERROR);
@@ -737,7 +737,7 @@ int retCode;
}
#endif
/* set flag to be caught in MoCCISendAnchorToCCI */
- cciStatPreventSendAnchor(client, url);
+ cciStatPreventSendAnchor(client, url);
MCCIRequestGetURL(&retCode,retText,url,output,headerExt);
if ((headerExtLength > 0) && (headerExt)) {
FREE(headerExt);
@@ -863,10 +863,10 @@ int status;
/* set flag to be caught in MoCCISendAnchorToCCI */
/*
- cciStatPreventSendAnchor(client, url);
+ cciStatPreventSendAnchor(client, url);
*/
MCCIRequestForm(client, &retCode,retText,actionID,status);
-
+
/* free(actionID);
*/
return(retCode);
@@ -951,7 +951,7 @@ int retCode;
else
MCCIGetAnnotationDummyLine(&retCode,retText,retData,retDataLength,annoCodes[index]);
- if (retDataLength !=
+ if (retDataLength !=
NetServerWrite(client,retData,retDataLength)) {
return(MCCI_FAIL);
}
@@ -1119,7 +1119,7 @@ char *line;
&retDataLength);
*/
MCCISendResponseLine(client,retCode,retText);
- if (retDataLength !=
+ if (retDataLength !=
NetServerWrite(client,*retData,retDataLength)) {
return(MCCI_FAIL);
}
@@ -1176,13 +1176,13 @@ char *line;
MCCISendResponseLine(client,retCode,retText);
}
else {
- /*
+ /*
MCCIRRequestUnrecognized();
*/
MCCISendResponseLine(client,MCCIR_UNRECOGNIZED,
"Command not recognized");
}
-
+
return(1);
}
@@ -1201,7 +1201,7 @@ char buff[1024];
return(MCCISendResponseLine(client, MCCIR_ANCHOR_INFO,buff));
}
-int MCCIFormQueryToClient(client, actionID, query, contentType, post_data)
+int MCCIFormQueryToClient(client, actionID, query, contentType, post_data)
MCCIPort client;
char *actionID;
char *query;
@@ -1211,7 +1211,7 @@ char *post_data;
char buff[1024];
int length, dataLength;
-
+
sprintf(buff, "%s %s ", actionID, query);
if(MCCISendResponseLine(client, MCCIR_FORM_RESPONSE,buff)){
return(MCCI_FAIL);
@@ -1223,7 +1223,7 @@ int length, dataLength;
return(MCCI_FAIL);
}
- dataLength = strlen(post_data);
+ dataLength = strlen(post_data);
sprintf(buff,"Content-Length: %d \r\n",dataLength);
length = strlen(buff);
if (length != NetServerWrite(client,buff,length)) {
@@ -1233,7 +1233,7 @@ int length, dataLength;
if (dataLength!= NetServerWrite(client,post_data,dataLength)) {
return(MCCI_FAIL);
}
-
+
return(MCCI_OK);
}
@@ -1285,7 +1285,7 @@ FILE *fp;
}
else {
- /* error reading here...but we promised to send
+ /* error reading here...but we promised to send
countDown number of bytes, so send nulls */
while (countDown > 0) {
if (1 != NetServerWrite(client,"\0",1)) {
@@ -1297,7 +1297,7 @@ FILE *fp;
}
fclose(fp);
return(MCCI_OK);
-
+
}
@@ -1332,7 +1332,7 @@ int length;
if (dataLength!= NetServerWrite(client,data,dataLength)) {
return(MCCI_FAIL);
}
-
+
return(MCCI_OK);
}
diff --git a/src/child.c b/src/child.c
index ae2992b..4d0a877 100644
--- a/src/child.c
+++ b/src/child.c
@@ -123,7 +123,7 @@ ProcessHandle *p;
}
-/* terminate the children...
+/* terminate the children...
you may want to remove SIGCHLD signal handler before calling this routine
*/
void KillAllChildren(void)
diff --git a/src/child.h b/src/child.h
index b2782f8..9f45132 100644
--- a/src/child.h
+++ b/src/child.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/gifread.c b/src/gifread.c
index 097a7f1..1c035a9 100644
--- a/src/gifread.c
+++ b/src/gifread.c
@@ -775,7 +775,7 @@ ReadImage(FILE *fd, int len, int height, XColor *colrs, int cmapSize,
unsigned char cmap[3][MAXCOLORMAPSIZE], int gray,
int interlace, int ignore)
{
- unsigned char *dp, c;
+ unsigned char *dp, c;
int v;
int xpos = 0, ypos = 0/*, pass = 0*/;
unsigned char *image;
diff --git a/src/gifread.h b/src/gifread.h
index 04626c0..db9bae7 100644
--- a/src/gifread.h
+++ b/src/gifread.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/globalhist.c b/src/globalhist.c
index dfa3c48..01e2411 100644
--- a/src/globalhist.c
+++ b/src/globalhist.c
@@ -246,7 +246,7 @@ static void add_url_to_bucket (int buck, char *url, char *lastdate)
l->cached_data = NULL;
l->next = NULL;
-
+
if (bkt->head == NULL)
bkt->head = l;
else
@@ -283,7 +283,7 @@ static int been_here_before (char *url)
return 1;
}
}
-
+
return 0;
}
@@ -295,12 +295,12 @@ static int been_here_before (char *url)
/****************************************************************************
* name: mo_been_here_before_huh_dad
* purpose: Predicate to determine if we've visited this URL before.
- * inputs:
+ * inputs:
* - char *url: The URL.
- * returns:
+ * returns:
* mo_succeed if we've been here before; mo_fail otherwise
- * remarks:
- * We canonicalize the URL (stripping out the target anchor,
+ * remarks:
+ * We canonicalize the URL (stripping out the target anchor,
* if one exists).
****************************************************************************/
mo_status mo_been_here_before_huh_dad (char *url)
@@ -321,12 +321,12 @@ mo_status mo_been_here_before_huh_dad (char *url)
/****************************************************************************
* name: mo_here_we_are_son
* purpose: Add a URL to the global history, if it's not already there.
- * inputs:
+ * inputs:
* - char *url: URL to add.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
- * We canonicalize the URL (stripping out the target anchor,
+ * remarks:
+ * We canonicalize the URL (stripping out the target anchor,
* if one exists).
****************************************************************************/
mo_status mo_here_we_are_son (char *url)
@@ -345,7 +345,7 @@ mo_status mo_here_we_are_son (char *url)
if (!been_here_before (curl))
add_url_to_bucket (hash_url (curl), curl, ts);
-
+
free (curl);
return mo_succeed;
@@ -355,12 +355,12 @@ mo_status mo_here_we_are_son (char *url)
* name: mo_read_global_history (PRIVATE)
* purpose: Given a filename, read the file's contents into the
* global history hash table.
- * inputs:
+ * inputs:
* - char *filename: The file to read.
- * returns:
+ * returns:
* nothing
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
static void mo_read_global_history (char *filename)
{
@@ -387,7 +387,7 @@ static void mo_read_global_history (char *filename)
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
goto screwed_with_file;
-
+
/* See if it's our format. */
if (strncmp (line, NCSA_HISTORY_FORMAT_COOKIE_ONE,
strlen (NCSA_HISTORY_FORMAT_COOKIE_ONE))) {
@@ -407,17 +407,17 @@ static void mo_read_global_history (char *filename)
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
goto screwed_with_file;
-
+
/* Start grabbing url's. */
while (1)
{
char *url;
char *lastdate;
-
+
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
goto done;
-
+
url = strtok (line, " ");
if (!url)
goto screwed_with_file;
@@ -432,7 +432,7 @@ static void mo_read_global_history (char *filename)
add_url_to_bucket (hash_url (url), url, lastdate);
}
}
-
+
screwed_with_file:
done:
fclose (fp);
@@ -447,12 +447,12 @@ static void mo_read_global_history (char *filename)
/****************************************************************************
* name: mo_init_global_history
* purpose: Initialize the global history hash table.
- * inputs:
+ * inputs:
* none
- * returns:
+ * returns:
* mo_succeed
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_status mo_init_global_history (void)
{
@@ -472,11 +472,11 @@ mo_status mo_init_global_history (void)
/****************************************************************************
* name: mo_wipe_global_history
* purpose: Wipe out the current global history.
- * inputs:
+ * inputs:
* none
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
* Huge memory hole here. However, we now call
* mo_flush_image_cache to at least clear out the image structures.
****************************************************************************/
@@ -496,12 +496,12 @@ mo_status mo_wipe_global_history (mo_window *win)
* purpose: Called on program startup to do the global history
* initialization stuff, including figuring out where the
* global history file is and reading it.
- * inputs:
+ * inputs:
* none
- * returns:
+ * returns:
* mo_succeed
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
static char *cached_global_hist_fname = NULL;
mo_status mo_setup_global_history (void)
@@ -516,8 +516,8 @@ mo_status mo_setup_global_history (void)
/* This shouldn't happen. */
if (!home)
home = "/tmp";
-
- filename = (char *)malloc
+
+ filename = (char *)malloc
((strlen (home) +
strlen (get_pref_string(eHISTORY_FILE)) +
8) * sizeof (char));
@@ -545,7 +545,7 @@ mo_status mo_setup_global_history (void)
mo_read_global_history (filename);
free(filename);
- filename = (char *)malloc
+ filename = (char *)malloc
((strlen (home) +
strlen (get_pref_string(eHISTORY_FILE)) +
8) * sizeof (char));
@@ -560,11 +560,11 @@ mo_status mo_setup_global_history (void)
/****************************************************************************
* name: mo_write_global_history
* purpose: Write the global history file out to disk.
- * inputs:
+ * inputs:
* none
- * returns:
+ * returns:
* mo_succeed (usually)
- * remarks:
+ * remarks:
* This assigns last-read times to all the entries in the history,
* which is a bad thing.
* ---Not anymore --- SWP
@@ -584,7 +584,7 @@ mo_status mo_write_global_history (void)
return mo_fail;
fprintf (fp, "%s\n%s\n", NCSA_HISTORY_FORMAT_COOKIE_TWO, "Global");
-
+
for (i = 0; i < HASH_TABLE_SIZE; i++)
{
for (l = hash_table[i].head; l != NULL; l = l->next)
@@ -592,9 +592,9 @@ mo_status mo_write_global_history (void)
fprintf (fp, "%s %s\n", l->url, (isdigit(*(l->lastdate))?l->lastdate:ts));
}
}
-
+
fclose (fp);
-
+
return mo_succeed;
}
@@ -602,11 +602,11 @@ mo_status mo_write_global_history (void)
/****************************************************************************
* name: mo_fetch_cached_image_data
* purpose: Retrieve a piece of cached data associated with a URL.
- * inputs:
+ * inputs:
* - char *url: The URL.
- * returns:
+ * returns:
* The piece of cached data (void *).
- * remarks:
+ * remarks:
* We do *not* do anything to the URL. If there is a target
* anchor in it, fine with us. This means the target anchor
* should have been stripped out someplace else if it needed to be.
@@ -642,7 +642,7 @@ void *mo_fetch_cached_image_data (char *url)
}
}
}
-
+
return NULL;
}
@@ -650,11 +650,11 @@ void *mo_fetch_cached_image_data (char *url)
/****************************************************************************
* name: mo_fetch_cached_local_name
* purpose: Retrieve a piece of cached data associated with a URL.
- * inputs:
+ * inputs:
* - char *url: The URL.
- * returns:
+ * returns:
* The piece of cached data (void *).
- * remarks:
+ * remarks:
* We do *not* do anything to the URL. If there is a target
* anchor in it, fine with us. This means the target anchor
* should have been stripped out someplace else if it needed to be.
@@ -675,7 +675,7 @@ void *mo_fetch_cached_local_name (char *url)
return NULL;
}
}
-
+
return NULL;
}
@@ -683,7 +683,7 @@ void *mo_fetch_cached_local_name (char *url)
/****************************************************************************
* name: mo_cache_data
* purpose: Cache a piece of data associated with a given URL.
- * inputs:
+ * inputs:
* - char *url: The URL.
* - void *info: The piece of data to cache (currently either
* an ImageInfo struct for an image named as SRC
@@ -691,9 +691,9 @@ void *mo_fetch_cached_local_name (char *url)
* local copy of a remote HDF file).
* - int type: The type of data to cache (currently either
* 0 for an ImageInfo struct or 1 for a local name).
- * returns:
+ * returns:
* mo_succeed, unless something goes badly wrong
- * remarks:
+ * remarks:
* We do *not* do anything to the URL. If there is a target
* anchor in it, fine with us. This means the target anchor
* should have been stripped out someplace else if it needed to be.
@@ -720,7 +720,7 @@ mo_status mo_cache_data (char *url, void *info, int type)
if (!strcmp (l->url, url))
goto found;
}
-
+
return mo_fail;
found:
@@ -782,12 +782,12 @@ mo_status mo_zap_cached_images_here (mo_window *win)
/****************************************************************************
* name: mo_flush_image_cache
- * purpose:
- * inputs:
+ * purpose:
+ * inputs:
* - mo_window *win: The current window.
- * returns:
+ * returns:
* nuthin
- * remarks:
+ * remarks:
****************************************************************************/
mo_status mo_flush_image_cache (mo_window *win)
{
@@ -846,7 +846,7 @@ static mo_status mo_dump_cached_cd_array (void)
if (cached_cd_array[i])
if (cacheTrace) {
fprintf (stderr, " %02d data 0x%08x last_access %d\n", i,
- cached_cd_array[i]->image_data,
+ cached_cd_array[i]->image_data,
cached_cd_array[i]->last_access);
}
else
@@ -868,8 +868,8 @@ static mo_status mo_dump_cached_cd_array (void)
static mo_status mo_init_cached_cd_array (void)
{
/* int i;*/
-
- cached_cd_array = (cached_data **)malloc (sizeof (cached_data *) *
+
+ cached_cd_array = (cached_data **)malloc (sizeof (cached_data *) *
CHUNK_OF_IMAGES);
size_of_cached_cd_array += CHUNK_OF_IMAGES;
@@ -880,7 +880,7 @@ static mo_status mo_init_cached_cd_array (void)
size_of_cached_cd_array);
#endif
-/* bzero ((char *)cached_cd_array,
+/* bzero ((char *)cached_cd_array,
CHUNK_OF_IMAGES * sizeof (cached_cd_array[0]));*/
memset((char *)cached_cd_array, 0,
CHUNK_OF_IMAGES * sizeof (cached_cd_array[0]));
@@ -891,18 +891,18 @@ static mo_status mo_init_cached_cd_array (void)
static mo_status mo_grow_cached_cd_array (void)
{
/* int i;*/
-
- cached_cd_array = (cached_data **)realloc
+
+ cached_cd_array = (cached_data **)realloc
(cached_cd_array,
sizeof (cached_data *) * (size_of_cached_cd_array + CHUNK_OF_IMAGES));
#ifndef DISABLE_TRACE
if (cacheTrace)
fprintf (stderr, "[grow] cached_cd_array 0x%08x, size_of_cached_cd_array 0x%08x, sum 0x%08x\n",
- cached_cd_array, size_of_cached_cd_array,
+ cached_cd_array, size_of_cached_cd_array,
cached_cd_array + size_of_cached_cd_array);
#endif
-/* bzero ((char *)(cached_cd_array + size_of_cached_cd_array),
+/* bzero ((char *)(cached_cd_array + size_of_cached_cd_array),
CHUNK_OF_IMAGES * sizeof (cached_cd_array[0]));*/
memset((char *)(cached_cd_array + size_of_cached_cd_array), 0,
CHUNK_OF_IMAGES * sizeof (cached_cd_array[0]));
@@ -964,22 +964,22 @@ static mo_status mo_sort_cached_cd_array (void)
}
#endif
- qsort
- ((void *)cached_cd_array, size_of_cached_cd_array,
+ qsort
+ ((void *)cached_cd_array, size_of_cached_cd_array,
sizeof (cached_cd_array[0]), mo_sort_cd_for_qsort);
#ifndef DISABLE_TRACE
if (cacheTrace)
mo_dump_cached_cd_array ();
#endif
-
+
return mo_succeed;
}
static mo_status mo_remove_cd_from_cached_cd_array (cached_data *cd)
{
int i/*, num = -1*/, freed_kbytes = 0;
-
+
if (!cached_cd_array)
return mo_fail;
@@ -989,12 +989,12 @@ static mo_status mo_remove_cd_from_cached_cd_array (cached_data *cd)
{
#ifndef DISABLE_TRACE
if (cacheTrace)
- fprintf
- (stderr,
- "[mo_remove_cd_from_cached_cd_array] Found data 0x%08x, location %d\n",
+ fprintf
+ (stderr,
+ "[mo_remove_cd_from_cached_cd_array] Found data 0x%08x, location %d\n",
cached_cd_array[i]->image_data, i);
#endif
- freed_kbytes = mo_kbytes_in_image_data
+ freed_kbytes = mo_kbytes_in_image_data
(cached_cd_array[i]->image_data);
mo_free_image_data (cached_cd_array[i]->image_data);
cached_cd_array[i] = NULL;
@@ -1008,7 +1008,7 @@ static mo_status mo_remove_cd_from_cached_cd_array (cached_data *cd)
#endif
return mo_fail;
-
+
done:
num_in_cached_cd_array--;
kbytes_cached -= freed_kbytes;
@@ -1019,7 +1019,7 @@ static mo_status mo_add_cd_to_cached_cd_array (cached_data *cd)
{
int i, num;
int kbytes_in_new_image = mo_kbytes_in_image_data (cd->image_data);
-
+
#ifndef DISABLE_TRACE
if (cacheTrace)
fprintf (stderr, "[mo_add_cd] New image is %d kbytes.\n",
@@ -1051,14 +1051,14 @@ static mo_status mo_add_cd_to_cached_cd_array (cached_data *cd)
int num_to_remove = 0;
#ifndef DISABLE_TRACE
if (cacheTrace)
- fprintf (stderr, "[mo_add_cd] Going to sort 0x%08x...\n",
+ fprintf (stderr, "[mo_add_cd] Going to sort 0x%08x...\n",
cached_cd_array);
#endif
mo_sort_cached_cd_array ();
#ifndef DISABLE_TRACE
if (cacheTrace)
{
- fprintf (stderr,
+ fprintf (stderr,
"[mo_add_to] Just sorted in preparation for purging...\n");
mo_dump_cached_cd_array ();
}
@@ -1069,7 +1069,7 @@ static mo_status mo_add_cd_to_cached_cd_array (cached_data *cd)
{
#ifndef DISABLE_TRACE
if (cacheTrace)
- fprintf
+ fprintf
(stderr, "[mo_add_cd] Trying to free another image (%d > %d).\n",
(kbytes_cached + kbytes_in_new_image),
get_pref_int(eIMAGE_CACHE_SIZE));
@@ -1118,7 +1118,7 @@ static mo_status mo_add_cd_to_cached_cd_array (cached_data *cd)
}
}
removed_em_all:
-
+
if (num_in_cached_cd_array == size_of_cached_cd_array)
{
#ifndef DISABLE_TRACE
@@ -1141,8 +1141,8 @@ static mo_status mo_add_cd_to_cached_cd_array (cached_data *cd)
}
#ifndef DISABLE_TRACE
if (cacheTrace)
- fprintf
- (stderr,
+ fprintf
+ (stderr,
"[mo_add_cd_to_cached_cd_array] UH OH couldn't find empty slot\n");
#endif
/* Try to grow array -- flow of control should never reach here,
@@ -1150,7 +1150,7 @@ static mo_status mo_add_cd_to_cached_cd_array (cached_data *cd)
num = size_of_cached_cd_array;
mo_grow_cached_cd_array ();
}
-
+
got_num:
cached_cd_array[num] = cd;
num_in_cached_cd_array++;
@@ -1160,11 +1160,11 @@ static mo_status mo_add_cd_to_cached_cd_array (cached_data *cd)
#ifndef DISABLE_TRACE
if (cacheTrace)
{
- fprintf
- (stderr,
+ fprintf
+ (stderr,
"[mo_add_cd_to_cached_cd_array] Added cd, data 0x%08x, num %d\n",
cd->image_data, num);
- fprintf
+ fprintf
(stderr,
"[mo_add_cd_to_cached_cd_array] Now cached %d kbytes.\n", kbytes_cached);
mo_dump_cached_cd_array ();
@@ -1193,7 +1193,7 @@ static int mo_kbytes_in_image_data (void *image_data)
if (kbytes == 0)
kbytes = 1;
-
+
return kbytes;
}
diff --git a/src/globalhist.h b/src/globalhist.h
index c08797f..d71f0b2 100644
--- a/src/globalhist.h
+++ b/src/globalhist.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/grpan-www.c b/src/grpan-www.c
index d65e567..cb3a6a5 100644
--- a/src/grpan-www.c
+++ b/src/grpan-www.c
@@ -75,15 +75,15 @@ static int HtLoadHTTPANN(char *arg, char *data, int len, char *com);
/****************************************************************************
* name: HtLoadHTTPANN (PRIVATE)
* purpose: Issue a command to a group annotation server.
- * inputs:
+ * inputs:
* - char *arg:
* - char *data:
* - int len:
* - char *com:
- * returns:
- *
- * remarks:
- *
+ * returns:
+ *
+ * remarks:
+ *
****************************************************************************/
static int
HtLoadHTTPANN(char *arg, char *data, int len, char *com)
diff --git a/src/grpan-www.h b/src/grpan-www.h
index e819c9c..f3d2d26 100644
--- a/src/grpan-www.h
+++ b/src/grpan-www.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/grpan.c b/src/grpan.c
index d53b895..b12e1da 100644
--- a/src/grpan.c
+++ b/src/grpan.c
@@ -83,7 +83,7 @@ static char *EscapeStuff(char *title);
Return an HTML-format hyperlink table to be appended to
the document text, or NULL if no annotations exist.
If a non-NULL result is returned, the caller must free it.
-
+
mo_status mo_new_grpan (char *url, char *title, char *author,
char *text)
Add a new annotation for document named by 'url' to the
@@ -152,13 +152,13 @@ static char *EscapeStuff(char *title)
/****************************************************************************
* name: mo_fetch_grpan_links
* purpose: Fetch the list of group annotations for this document.
- * inputs:
+ * inputs:
* - char *url: The URL for which to fetch.
- * returns:
+ * returns:
* An HTML block with the list of group annotations, or NULL.
- * remarks:
- * Right now the server constructs the list for us. Later we will want
- * to construct it ourselves to be able to support local kill lists,
+ * remarks:
+ * Right now the server constructs the list for us. Later we will want
+ * to construct it ourselves to be able to support local kill lists,
* and the like.
****************************************************************************/
char *mo_fetch_grpan_links (char *url)
@@ -175,30 +175,30 @@ char *mo_fetch_grpan_links (char *url)
{
/* Go get the anchor in the URL, if any. */
char *anch = mo_url_extract_anchor (url);
-
+
/* If there is one and it doesn't start with "hdfref",
then clip it off. WHAT ABOUT PERSONAL ANNOTATIONS??? */
if (anch && strncmp (anch, "hdfref", 6))
url = mo_url_canonicalize (url, "");
-
+
/* Sanity check. */
if (!url)
return NULL;
/* the old Bina grpan request */
-/*
+/*
request = (char *)malloc(strlen(url) + 256);
sprintf
(request, "grpan://%s/url=\"%s\";=", Rdata.annotation_server, url);
ttxt = grpan_doit("ANN_GET ", request, (char *)NULL, 0, &ttxthead);
free(request);
*/
-
+
/* amb */
post_data = (char *)malloc(strlen(url) + 1024);
sprintf(post_data, "cmd=an_get&format=html&url=%s", url);
ttxt = mo_post_pull_er_over (get_pref_string(eANNOTATION_SERVER),
- "application/x-www-form-urlencoded",
+ "application/x-www-form-urlencoded",
post_data, &ttxthead);
free(post_data);
@@ -225,12 +225,12 @@ char *mo_fetch_grpan_links (char *url)
/****************************************************************************
* name: mo_is_editable_grpan
* purpose: Discover if a block of HTML is an editable group annotation.
- * inputs:
+ * inputs:
* - char *text: Text block to check.
- * returns:
+ * returns:
* mo_succeed if it is, mo_fail if not.
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_status mo_is_editable_grpan (char *text)
{
@@ -248,14 +248,14 @@ mo_status mo_is_editable_grpan (char *text)
/****************************************************************************
* name: mo_new_grpan
* purpose: Send a new group annotation to the server.
- * inputs:
+ * inputs:
* - char *url: The URL of the document being annotated.
* - char *title: Title of the new annotation.
* - char *author: Author of the new annotation.
* - char *text: Text of the new annotation.
- * returns:
+ * returns:
* mo_succeed if the annotation was registered; mo_fail if not.
- * remarks:
+ * remarks:
* Send a new group annotation to the server. The data (text) can actually
* be binary, but then you need to compose what you send with something other
* than strcat, and you may need to call a function other than
@@ -276,15 +276,15 @@ mo_status mo_new_grpan (char *url, char *title, char *author, char *text)
char *ts = ctime (&foo);
char *Etitle, *Euser;
char *esc_text;
-
+
ts[strlen(ts)-1] = '\0';
-
+
Etitle = EscapeStuff(title);
Euser = EscapeStuff(author);
/* The old Bina thing */
/*
-
+
request = (char *)malloc(strlen(url) + strlen(Etitle) + strlen(Euser) +
strlen(ts) + strlen(text) + 256);
if (request == NULL)
@@ -300,7 +300,7 @@ mo_status mo_new_grpan (char *url, char *title, char *author, char *text)
*/
/* amb */
- post_data = (char *)malloc(strlen(url) + strlen(Etitle) + strlen(Euser)
+ post_data = (char *)malloc(strlen(url) + strlen(Etitle) + strlen(Euser)
+ strlen(ts) + strlen(text) + 256);
if (post_data == NULL)
return mo_fail;
@@ -308,7 +308,7 @@ mo_status mo_new_grpan (char *url, char *title, char *author, char *text)
sprintf(post_data, "cmd=an_post&url=%s&title=%s&author=%s&text=%s",
url, title, author, esc_text);
ttxt = mo_post_pull_er_over (get_pref_string(eANNOTATION_SERVER),
- "application/x-www-form-urlencoded",
+ "application/x-www-form-urlencoded",
post_data, &ttxthead);
free(post_data);
@@ -329,19 +329,19 @@ mo_status mo_new_grpan (char *url, char *title, char *author, char *text)
/****************************************************************************
* name: mo_audio_grpan
- * purpose: Send a new audio group annotation to the server.
- * inputs:
+ * purpose: Send a new audio group annotation to the server.
+ * inputs:
* - char *url: The URL of the document being annotated.
* - char *title: Title of the new annotation.
* - char *author: Author of the new annotation.
* - char *data: Binary data of the new annotation.
- * - int len:
- * returns:
+ * - int len:
+ * returns:
* mo_succeed if everything's OK, mo_fail else.
- * remarks:
+ * remarks:
* The data is sound, either .au, or .aiff format.
****************************************************************************/
-mo_status mo_audio_grpan (char *url, char *title, char *author,
+mo_status mo_audio_grpan (char *url, char *title, char *author,
char *data, int len)
{
if (! get_pref_string(eANNOTATION_SERVER)) /* No annotation server */
@@ -360,7 +360,7 @@ mo_status mo_audio_grpan (char *url, char *title, char *author,
Etitle = EscapeStuff(title);
Euser = EscapeStuff(author);
-
+
request = (char *)malloc(strlen(url) + strlen(Etitle) + strlen(Euser) +
strlen(ts) + 256);
if (request == NULL)
@@ -392,15 +392,15 @@ mo_status mo_audio_grpan (char *url, char *title, char *author,
/****************************************************************************
* name: mo_modify_grpan
* purpose: Alter the content of an existing group annotation.
- * inputs:
- * inputs:
+ * inputs:
+ * inputs:
* - char *url: The URL of the annotation being changed.
* - char *title: Title of the new (modified) annotation.
* - char *author: Author of the new (modified) annotation.
* - char *text: Text of the new (modified) annotation.
- * returns:
+ * returns:
* mo_succeed if the annotation changes were registered; mo_fail if not.
- * remarks:
+ * remarks:
*
****************************************************************************/
mo_status mo_modify_grpan (char *url, char *title, char *author, char *text)
@@ -416,12 +416,12 @@ mo_status mo_modify_grpan (char *url, char *title, char *author, char *text)
time_t foo = time (NULL);
char *ts = ctime (&foo);
char *Etitle, *Euser;
-
+
ts[strlen(ts)-1] = '\0';
-
+
Etitle = EscapeStuff(title);
Euser = EscapeStuff(author);
-
+
request = (char *)malloc(strlen(url) + strlen(Etitle) + strlen(Euser) +
strlen(ts) + strlen(text) + 256);
if (request == NULL)
@@ -449,12 +449,12 @@ mo_status mo_modify_grpan (char *url, char *title, char *author, char *text)
/****************************************************************************
* name: mo_delete_grpan
* purpose: Delete the annotation whose url is passed.
- * inputs:
+ * inputs:
* - char *url: URL of annotation to be deleted.
- * returns:
+ * returns:
* mo_succeed, if everything went OK.
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_status mo_delete_grpan (char *url)
{
@@ -466,10 +466,10 @@ mo_status mo_delete_grpan (char *url)
{
char *request;
char *ttxt, *ttxthead;
-
+
request = (char *)malloc(strlen(url) + 256);
sprintf
- (request, "grpan://%s/url=\"%s\";=",
+ (request, "grpan://%s/url=\"%s\";=",
get_pref_string(eANNOTATION_SERVER), url);
ttxt = grpan_doit("ANN_DELETE ", request, (char *)NULL, 0, &ttxthead);
free(request);
@@ -481,7 +481,7 @@ mo_status mo_delete_grpan (char *url)
/****************************************************************************
* name: mo_grok_grpan_pieces
* purpose: Read pieces of out an annotation.
- * inputs:
+ * inputs:
* - char *url: URL of the annotation.
* - char *t: Text of the annotation.
* - char **title: Return title of the annotation.
@@ -489,11 +489,11 @@ mo_status mo_delete_grpan (char *url)
* - char **text: Return text (body) of the annotation.
* - int *id: Return ID of the annotation.
* - char **fn: Unused.
- * returns:
+ * returns:
* mo_succeed if the return pointers were set to the right data;
* mo_fail if something went wrong.
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_status mo_grok_grpan_pieces (char *url, char *t,
char **title, char **author, char **text,
@@ -516,7 +516,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
{
return mo_fail;
}
-
+
/* Skip the magic cookie */
tptr = txt;
while (*tptr != '\n')
@@ -527,7 +527,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
}
-
+
/* Skip the title line */
tptr++;
while (*tptr != '\n')
@@ -538,7 +538,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
}
-
+
/* skip to the beginning of the title after the header tag */
while (*tptr != '>')
{
@@ -550,7 +550,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
head = tptr;
-
+
/* skip to the end of the title before the close header tag */
while (*tptr != '<')
{
@@ -563,7 +563,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
*tptr = '\0';
*title = strdup(head); /* snarf out the title */
*tptr = '<';
-
+
/* skip to the end of the header line. */
while (*tptr != '\n')
{
@@ -573,7 +573,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
}
-
+
/* skip to the beginning of the author after the address tag */
while (*tptr != '>')
{
@@ -585,7 +585,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
head = tptr;
-
+
/* skip to the end of the author before the close address tag */
while (*tptr != '<')
{
@@ -598,7 +598,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
*tptr = '\0';
*author = strdup(head); /* snarf the author name */
*tptr = '<';
-
+
/* skip to the end of the author line. */
while (*tptr != '\n')
{
@@ -608,7 +608,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
}
-
+
/* skip to the end of the date line. */
tptr++;
while (*tptr != '\n')
@@ -619,7 +619,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
}
-
+
/* skip to the end of the ___ line. */
tptr++;
while (*tptr != '\n')
@@ -630,7 +630,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
}
-
+
/* skip to the end of the pre line. */
tptr++;
while (*tptr != '\n')
@@ -643,7 +643,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
tptr++;
*text = strdup(tptr); /* snarf the remaining text */
-
+
/*
* Find the annotation file name at the end of the url, and strip
* the id number out of it.
@@ -652,7 +652,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
if (tptr == NULL)
{
int hash, val;
-
+
if (sscanf(url, "%d-%d.html", &hash, &val) != 2)
{
return mo_fail;
@@ -662,7 +662,7 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
else
{
int hash, val;
-
+
tptr++;
if (sscanf(tptr, "%d-%d.html", &hash, &val) != 2)
{
@@ -670,6 +670,6 @@ mo_status mo_grok_grpan_pieces (char *url, char *t,
}
*id = val;
}
-
+
return mo_succeed;
}
diff --git a/src/grpan.h b/src/grpan.h
index 221a6ba..699e84b 100644
--- a/src/grpan.h
+++ b/src/grpan.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
@@ -69,7 +69,7 @@
char *mo_fetch_grpan_links (char *url);
mo_status mo_is_editable_grpan (char *text);
mo_status mo_new_grpan (char *url, char *title, char *author, char *text);
-mo_status mo_audio_grpan (char *url, char *title, char *author,
+mo_status mo_audio_grpan (char *url, char *title, char *author,
char *data, int len);
mo_status mo_modify_grpan (char *url, char *title, char *author, char *text);
mo_status mo_delete_grpan (char *url);
diff --git a/src/gui-dialogs.c b/src/gui-dialogs.c
index 1c285de..0d0b015 100644
--- a/src/gui-dialogs.c
+++ b/src/gui-dialogs.c
@@ -2,7 +2,7 @@
* NCSA Mosaic for the X Window System *
* Software Development Group *
* National Center for Supercomputing Applications *
- * University of Illinois at Urbana-Champaign *
+ * University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* mosaic@ncsa.uiuc.edu *
* *
@@ -241,7 +241,7 @@ mo_window *win = mo_fetch_window_by_id(XmxExtractUniqid ((int)client_data));
/* ------------------------------------------------------------------------ */
-mo_status mo_save_window(mo_window *win, char *fname,
+mo_status mo_save_window(mo_window *win, char *fname,
mo_format_token save_format)
{
char *efname = (char *)malloc (sizeof (char) * (__MAX_HOME_LEN__ * 2));
@@ -292,7 +292,7 @@ mo_status mo_save_window(mo_window *win, char *fname,
XmToggleButtonGetState(win->print_header_toggle_save);
HTML_Print_Footers=
XmToggleButtonGetState(win->print_footer_toggle_save);
- HTML_Print_Paper_Size_A4=
+ HTML_Print_Paper_Size_A4=
XmToggleButtonGetState(win->print_a4_toggle_save);
}
else /* cci app telling mosaic to save a file */
@@ -333,7 +333,7 @@ mo_status mo_save_window(mo_window *win, char *fname,
}
else if (save_format == mo_postscript)
{
- char *text = HTMLGetText (win->scrolled_win, 2 + win->font_family,
+ char *text = HTMLGetText (win->scrolled_win, 2 + win->font_family,
win->current_node->url, win->current_node->last_modified);
if (text)
{
@@ -358,14 +358,14 @@ mo_status mo_save_window(mo_window *win, char *fname,
static XmxCallback (save_win_cb)
{
char *fname = (char *)malloc (sizeof (char) * 128), efname[128+1];
- mo_window *win = mo_fetch_window_by_id
+ mo_window *win = mo_fetch_window_by_id
(XmxExtractUniqid ((int)client_data));
char *ptr=NULL;
mo_busy ();
XtUnmanageChild (win->save_win);
-
+
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET,
&fname);
@@ -377,7 +377,7 @@ static XmxCallback (save_win_cb)
mo_not_busy ();
free (fname);
-
+
return;
}
@@ -385,7 +385,7 @@ void format_sensitive(mo_window *win, int format) {
Arg args[2];
int n;
-
+
if (format==mo_plaintext) { /*PLAIN*/
XmxSetToggleButton(win->print_header_toggle_save,XmxNotSet);
XmxSetToggleButton(win->print_footer_toggle_save,XmxNotSet);
@@ -460,7 +460,7 @@ int n;
static XmxCallback (format_optmenu_cb) {
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
-
+
win->save_format = XmxExtractToken ((int)client_data);
format_sensitive(win,win->save_format);
@@ -498,14 +498,14 @@ char fileBuf[2048],*fileBoxFileName;
win->print_footer_toggle_save=XmxMakeToggleButton(workarea,
"Include Footnotes",save_print_footer_cb,0);
XmxSetToggleButton(win->print_footer_toggle_save,get_pref_boolean(ePRINT_FOOTNOTES));
-
+
paper_size_toggle_box=XmxMakeRadioBox(workarea);
win->print_a4_toggle_save = XmxMakeToggleButton
(paper_size_toggle_box,"A4 Paper Size" ,save_print_a4_cb,0);
win->print_us_toggle_save = XmxMakeToggleButton
(paper_size_toggle_box,"US Letter Paper Size",save_print_us_cb,0);
XmxSetToggleButton(win->print_a4_toggle_save,!get_pref_boolean(ePRINT_PAPER_SIZE_US));
- XmxSetToggleButton(win->print_us_toggle_save,get_pref_boolean(ePRINT_PAPER_SIZE_US));
+ XmxSetToggleButton(win->print_us_toggle_save,get_pref_boolean(ePRINT_PAPER_SIZE_US));
format_label = XmxMakeLabel (workarea, "Format for document:" );
/* XmxSetArg (XmNwidth, 210); */
@@ -549,14 +549,14 @@ char fileBuf[2048],*fileBoxFileName;
}
win->format_optmenu = XmxRMakeOptionMenu (workarea, "",
- format_optmenu_cb,
+ format_optmenu_cb,
format_opts);
XmxSetArg(XmNtopOffset,7);
XmxSetConstraints
(format_label, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE, NULL, NULL, NULL, NULL);
XmxSetConstraints
- (win->format_optmenu->base, XmATTACH_FORM, XmATTACH_NONE,
+ (win->format_optmenu->base, XmATTACH_FORM, XmATTACH_NONE,
XmATTACH_WIDGET,
XmATTACH_FORM, NULL, NULL, format_label, NULL);
/*swp*/
@@ -580,7 +580,7 @@ char fileBuf[2048],*fileBoxFileName;
{
XmFileSelectionDoSearch (win->save_win, NULL);
}
-
+
/*SWP -- 10.12.95 -- Save File now goes to a specific filename*/
XtVaGetValues(win->save_win,
XmNdirSpec, &fbfn,
@@ -627,7 +627,7 @@ static XmxCallback (savebinary_cancel_cb)
mo_window *win = mo_fetch_window_by_id
(XmxExtractUniqid ((int)client_data));
- if (unlink(temp_binary_fnam)<0)
+ if (unlink(temp_binary_fnam)<0)
{
char *buf, *final, tmpbuf[80];
int final_len;
@@ -644,7 +644,7 @@ static XmxCallback (savebinary_cancel_cb)
sprintf(final,"\nUnable to Remove Local File:\n %s\n\nRemove Error:\n %s\n" ,(!temp_binary_fnam || !*temp_binary_fnam?" ":temp_binary_fnam),buf);
XmxMakeErrorDialog (win->base,
- final,
+ final,
"Remove Error" );
XtManageChild (Xmx_w);
@@ -659,7 +659,7 @@ static XmxCallback (savebinary_cancel_cb)
/*
free (cmd);
*/
-
+
return;
}
@@ -711,12 +711,12 @@ char fileBuf[2048],*fileBoxFileName;
XmDIALOG_FULL_APPLICATION_MODAL);
win->savebinary_win =
XmxMakeFileSBDialog(win->base,
- "NCSA Mosaic: Save Binary File To Local Disk" ,
+ "NCSA Mosaic: Save Binary File To Local Disk" ,
"Name for binary file on local disk:" ,
savebinary_win_cb,
0);
XmxAddCallback(win->savebinary_win,
- XmNcancelCallback,
+ XmNcancelCallback,
savebinary_cancel_cb,
0);
}
@@ -776,7 +776,7 @@ static XmxCallback (open_local_win_cb)
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
XtUnmanageChild (win->open_local_win);
-
+
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET,
&fname);
@@ -801,7 +801,7 @@ mo_status mo_post_open_local_window (mo_window *win)
/* Widget frame, workarea, format_label;*/
win->open_local_win = XmxMakeFileSBDialog
- (win->base, "NCSA Mosaic: Open Local Document" ,
+ (win->base, "NCSA Mosaic: Open Local Document" ,
"Name of local document to open:" ,
open_local_win_cb, 0);
}
@@ -809,7 +809,7 @@ mo_status mo_post_open_local_window (mo_window *win)
{
XmFileSelectionDoSearch (win->open_local_win, NULL);
}
-
+
XmxManageRemanage (win->open_local_win);
return mo_succeed;
}
@@ -844,7 +844,7 @@ static XmxCallback (open_win_cb)
/* if URL is enclosed inside then extract it */
if ( strstr(url, "<") )
url = strtok(url, "<>");
-
+
xurl=mo_url_prepend_protocol(url);
mo_load_window_text (win, xurl, NULL);
/* The following free breaks things under the following conditions:
@@ -861,7 +861,7 @@ static XmxCallback (open_win_cb)
break;
case 2:
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("docview-menubar-file.html"),
NULL, NULL);
break;
@@ -880,32 +880,32 @@ mo_status mo_post_open_window (mo_window *win)
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget open_form, label;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->open_win = XmxMakeFormDialog
+ win->open_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Open Document" );
dialog_frame = XmxMakeFrame (win->open_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
open_form = XmxMakeForm (dialog_frame);
-
+
label = XmxMakeLabel (open_form, "URL To Open: " );
XmxSetArg (XmNwidth, 310);
win->open_text = XmxMakeTextField (open_form);
XmxAddCallbackToText (win->open_text, open_win_cb, 0);
-
+
dialog_sep = XmxMakeHorizontalSeparator (open_form);
-
+
buttons_form = XmxMakeFormAndFourButtons
- (open_form, open_win_cb, "Open" ,
- "Clear" , "Dismiss" ,
- "Help..." ,
+ (open_form, open_win_cb, "Open" ,
+ "Clear" , "Dismiss" ,
+ "Help..." ,
0, 3, 1, 2);
/* Constraints for open_form. */
@@ -918,18 +918,18 @@ mo_status mo_post_open_window (mo_window *win)
(win->open_text, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_WIDGET,
XmATTACH_FORM, NULL, NULL, label, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
win->open_text, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XmxManageRemanage (win->open_win);
-
+
return mo_succeed;
}
@@ -946,7 +946,7 @@ mo_status mo_send_document_over_dtm (mo_window *win)
return mo_fail;
text = HTMLGetText (win->scrolled_win, 1, win->current_node->url, 0);
-
+
mo_dtm_send_text (win, win->current_node->title, text);
free (text);
@@ -957,7 +957,7 @@ mo_status mo_send_document_over_dtm (mo_window *win)
static XmxCallback (dtmout_win_cb)
{
- mo_window *win = mo_fetch_window_by_id
+ mo_window *win = mo_fetch_window_by_id
(XmxExtractUniqid ((int)client_data));
char *port;
@@ -988,7 +988,7 @@ static XmxCallback (dtmout_win_cb)
break;
case 2:
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("docview-menubar-file.html"),
NULL, NULL);
break;
@@ -1004,31 +1004,31 @@ mo_status mo_post_dtmout_window (mo_window *win)
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget dtmout_form, label;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->dtmout_win = XmxMakeFormDialog
+ win->dtmout_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Open DTM Outport" );
dialog_frame = XmxMakeFrame (win->dtmout_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
dtmout_form = XmxMakeForm (dialog_frame);
-
+
label = XmxMakeLabel (dtmout_form, "DTM Output Port: " );
XmxSetArg (XmNwidth, 240);
win->dtmout_text = XmxMakeTextField (dtmout_form);
XmxAddCallbackToText (win->dtmout_text, dtmout_win_cb, 0);
-
+
dialog_sep = XmxMakeHorizontalSeparator (dtmout_form);
-
+
buttons_form = XmxMakeFormAndThreeButtons
(dtmout_form, dtmout_win_cb, "Open" ,
- "Dismiss" , "Help..." ,
+ "Dismiss" , "Help..." ,
0, 1, 2);
/* Constraints for dtmout_form. */
@@ -1041,18 +1041,18 @@ mo_status mo_post_dtmout_window (mo_window *win)
(win->dtmout_text, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_WIDGET,
XmATTACH_FORM, NULL, NULL, label, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
win->dtmout_text, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XmxManageRemanage (win->dtmout_win);
-
+
return mo_succeed;
}
#endif /* HAVE_DTM */
@@ -1117,14 +1117,14 @@ static XmxCallback (mail_win_cb)
XmToggleButtonGetState(win->print_url_only)?
"url_only" : content_type,
win->current_node ? win->current_node->url : NULL);
-
+
if (free_text && text)
free (text);
free (to);
free (subj);
-
+
mo_not_busy ();
-
+
break;
case 1:
XtUnmanageChild (win->mail_win);
@@ -1132,8 +1132,8 @@ static XmxCallback (mail_win_cb)
break;
case 2:
mo_open_another_window
- (win,
- mo_assemble_help_url ("docview-menubar-file.html"),
+ (win,
+ mo_assemble_help_url ("docview-menubar-file.html"),
NULL, NULL);
break;
}
@@ -1146,7 +1146,7 @@ void mail_sensitive(mo_window *win, int format) {
Arg args[2];
int n;
-
+
if (format==mo_plaintext) { /*PLAIN*/
XmxSetToggleButton(win->print_header_toggle_mail,XmxNotSet);
XmxSetToggleButton(win->print_footer_toggle_mail,XmxNotSet);
@@ -1220,7 +1220,7 @@ int n;
static XmxCallback (mail_fmtmenu_cb) {
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
-
+
win->mail_format = XmxExtractToken ((int)client_data);
mail_sensitive(win,win->mail_format);
@@ -1241,26 +1241,26 @@ int i;
Widget frame, workarea, format_label;
Widget paper_size_toggle_box;
Widget frame2, url_toggle_box;
-
-
+
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->mail_win = XmxMakeFormDialog
+ win->mail_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Mail Document" );
dialog_frame = XmxMakeFrame (win->mail_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
mail_form = XmxMakeForm (dialog_frame);
-
+
to_label = XmxMakeLabel (mail_form, "Mail To: " );
XmxSetArg (XmNwidth, 335);
win->mail_to_text = XmxMakeTextField (mail_form);
-
+
subj_label = XmxMakeLabel (mail_form, "Subject: " );
win->mail_subj_text = XmxMakeTextField (mail_form);
@@ -1269,7 +1269,7 @@ int i;
XmxSetArg (XmNmarginHeight, 5);
frame = XmxMakeFrame (mail_form, XmxShadowEtchedIn);
workarea = XmxMakeForm (frame);
-
+
/*swp*/
win->print_header_toggle_mail=XmxMakeToggleButton(workarea,
"Include Banners",mail_print_header_cb,0);
@@ -1329,7 +1329,7 @@ int i;
}
win->mail_fmtmenu = XmxRMakeOptionMenu (workarea, "",
- mail_fmtmenu_cb,
+ mail_fmtmenu_cb,
format_opts);
XmxSetArg(XmNtopOffset,7);
@@ -1337,7 +1337,7 @@ int i;
(format_label, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE, NULL, NULL, NULL, NULL);
XmxSetConstraints
- (win->mail_fmtmenu->base, XmATTACH_FORM, XmATTACH_NONE,
+ (win->mail_fmtmenu->base, XmATTACH_FORM, XmATTACH_NONE,
XmATTACH_WIDGET,
XmATTACH_FORM, NULL, NULL, format_label, NULL);
/*swp*/
@@ -1367,7 +1367,7 @@ int i;
win->print_url_only = XmxMakeToggleButton(url_toggle_box,
"Mail URL Only",
print_url_cb, 0);
-
+
XmxSetToggleButton(win->print_doc_only, 1);
XmxSetToggleButton(win->print_url_only, 0);
dialog_sep = XmxMakeHorizontalSeparator (mail_form);
@@ -1389,7 +1389,7 @@ int i;
XmxSetOffsets (subj_label, 14, 0, 10, 0);
XmxSetConstraints
- (subj_label, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
+ (subj_label, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE,
win->mail_to_text, NULL, NULL, NULL);
XmxSetOffsets (win->mail_subj_text, 10, 0, 5, 10);
@@ -1408,22 +1408,22 @@ int i;
frame, NULL, NULL, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
frame2, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XmxManageRemanage (win->mail_win);
return mo_succeed;
}
-mo_status mo_print_window(mo_window *win,
+mo_status mo_print_window(mo_window *win,
mo_format_token print_format, char *lpr)
{
char *fnam, *cmd;
@@ -1500,8 +1500,8 @@ mo_status mo_print_window(mo_window *win,
oops:
free (lpr);
-
- unlink(fnam);
+
+ unlink(fnam);
free (fnam);
return mo_succeed;
@@ -1523,7 +1523,7 @@ static XmxCallback (print_win_cb)
mo_busy ();
lpr = XmxTextGetString (win->print_text);
-
+
if (!lpr)
return;
if (lpr[0] == '\0')
@@ -1532,7 +1532,7 @@ static XmxCallback (print_win_cb)
mo_print_window(win, win->print_format, lpr);
mo_not_busy ();
-
+
break;
case 1:
XtUnmanageChild (win->print_win);
@@ -1540,7 +1540,7 @@ static XmxCallback (print_win_cb)
break;
case 2:
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("docview-menubar-file.html"),
NULL, NULL);
break;
@@ -1554,7 +1554,7 @@ void print_sensitive(mo_window *win, int format) {
Arg args[2];
int n;
-
+
if (format==mo_plaintext) { /*PLAIN*/
XmxSetToggleButton(win->print_header_toggle_print,XmxNotSet);
XmxSetToggleButton(win->print_footer_toggle_print,XmxNotSet);
@@ -1628,7 +1628,7 @@ int n;
static XmxCallback (print_fmtmenu_cb) {
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
-
+
win->print_format = XmxExtractToken ((int)client_data);
print_sensitive(win,win->print_format);
@@ -1651,18 +1651,18 @@ int i;
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->print_win = XmxMakeFormDialog
+ win->print_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Print Document" );
dialog_frame = XmxMakeFrame (win->print_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
print_form = XmxMakeForm (dialog_frame);
-
+
print_label = XmxMakeLabel (print_form, "Print Command: " );
XmxSetArg (XmNwidth, 270);
if (get_pref_boolean(eKIOSK) && get_pref_boolean(eKIOSKPRINT)) {
@@ -1676,7 +1676,7 @@ int i;
XmxSetArg (XmNmarginHeight, 5);
frame = XmxMakeFrame (print_form, XmxShadowEtchedIn);
workarea = XmxMakeForm (frame);
-
+
/*swp*/
win->print_header_toggle_print=XmxMakeToggleButton(workarea,
@@ -1742,7 +1742,7 @@ int i;
}
win->print_fmtmenu = XmxRMakeOptionMenu (workarea, "",
- print_fmtmenu_cb,
+ print_fmtmenu_cb,
format_opts);
XmxSetArg(XmNtopOffset, 7);
@@ -1750,17 +1750,17 @@ int i;
(format_label, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE, NULL, NULL, NULL, NULL);
XmxSetConstraints
- (win->print_fmtmenu->base, XmATTACH_FORM, XmATTACH_NONE,
+ (win->print_fmtmenu->base, XmATTACH_FORM, XmATTACH_NONE,
XmATTACH_NONE,
XmATTACH_FORM, NULL, NULL, NULL, NULL);
/*swp*/
XmxSetArg(XmNtopOffset, 15);
XmxSetConstraints
- (win->print_header_toggle_print, XmATTACH_WIDGET, XmATTACH_NONE,
+ (win->print_header_toggle_print, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_FORM, XmATTACH_NONE,
format_label,NULL,NULL,NULL);
XmxSetConstraints
- (win->print_footer_toggle_print, XmATTACH_WIDGET, XmATTACH_NONE,
+ (win->print_footer_toggle_print, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_FORM, XmATTACH_NONE,
win->print_header_toggle_print,NULL,NULL,NULL);
XmxSetConstraints
@@ -1772,7 +1772,7 @@ int i;
}
dialog_sep = XmxMakeHorizontalSeparator (print_form);
-
+
buttons_form = XmxMakeFormAndThreeButtons
(print_form, print_win_cb, "Print" ,
"Dismiss" , "Help..." ,
@@ -1794,17 +1794,17 @@ int i;
win->print_text, NULL, NULL, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
frame, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XmxManageRemanage (win->print_win);
return mo_succeed;
@@ -1851,7 +1851,7 @@ char *ptr=NULL,*tptr=NULL,*my_str=NULL;
searchlen=strlen(win->current_node->text);
- /* search the first hit every time if by cci application */
+ /* search the first hit every time if by cci application */
if (cci_docommand) {
win->src_search_pos=0;
}
@@ -2024,7 +2024,7 @@ mo_window *win=mo_fetch_window_by_id(XmxExtractUniqid((int)client_data));
}
case 3: { /* help */
- mo_open_another_window(win,
+ mo_open_another_window(win,
mo_assemble_help_url("docview-menubar-file.html"),
NULL,
NULL);
@@ -2043,7 +2043,7 @@ mo_status mo_post_source_search_window(mo_window *win) {
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget search_form, label;
-
+
/* Create it for the first time. */
XmxSetUniqid(win->id);
win->src_search_win=
@@ -2056,18 +2056,18 @@ mo_status mo_post_source_search_window(mo_window *win) {
/* Constraints for base. */
XmxSetConstraints(dialog_frame,
XmATTACH_FORM,
- XmATTACH_FORM,
+ XmATTACH_FORM,
XmATTACH_FORM,
XmATTACH_FORM,
NULL,
NULL,
- NULL,
+ NULL,
NULL);
-
+
/* Main form. */
search_form=
XmxMakeForm(dialog_frame);
-
+
label=
XmxMakeLabel(search_form,
"Find string in Source View: " );
@@ -2094,10 +2094,10 @@ mo_status mo_post_source_search_window(mo_window *win) {
dialog_sep=
XmxMakeHorizontalSeparator(search_form);
-
+
buttons_form=
XmxMakeFormAndFourButtons(search_form,
- source_search_win_cb,
+ source_search_win_cb,
"Find",
"Reset",
"Dismiss",
@@ -2137,7 +2137,7 @@ mo_status mo_post_source_search_window(mo_window *win) {
XmATTACH_WIDGET,
XmATTACH_FORM,
NULL,
- NULL,
+ NULL,
label,
NULL);
@@ -2147,7 +2147,7 @@ mo_status mo_post_source_search_window(mo_window *win) {
XmATTACH_WIDGET,
XmATTACH_NONE,
XmATTACH_WIDGET,
- XmATTACH_NONE,
+ XmATTACH_NONE,
win->src_search_win_text,
NULL,
label,
@@ -2165,7 +2165,7 @@ mo_status mo_post_source_search_window(mo_window *win) {
XmATTACH_NONE,
XmATTACH_WIDGET,
XmATTACH_NONE,
- win->src_search_caseless_toggle,
+ win->src_search_caseless_toggle,
NULL,
label,
NULL);
@@ -2185,7 +2185,7 @@ mo_status mo_post_source_search_window(mo_window *win) {
XmxSetConstraints(dialog_sep,
XmATTACH_WIDGET,
XmATTACH_WIDGET,
- XmATTACH_FORM,
+ XmATTACH_FORM,
XmATTACH_FORM,
win->src_search_backwards_toggle,
buttons_form,
@@ -2194,16 +2194,16 @@ mo_status mo_post_source_search_window(mo_window *win) {
XmxSetConstraints(buttons_form,
XmATTACH_NONE,
XmATTACH_FORM,
- XmATTACH_FORM,
+ XmATTACH_FORM,
XmATTACH_FORM,
NULL,
NULL,
NULL,
NULL);
}
-
+
XmxManageRemanage(win->src_search_win);
-
+
return(mo_succeed);
}
@@ -2223,7 +2223,7 @@ mo_window *win=mo_fetch_window_by_id(XmxExtractUniqid((int)client_data));
}
case 1: { /* Help */
- mo_open_another_window(win,
+ mo_open_another_window(win,
mo_assemble_help_url("docview-menubar-file.html"),
NULL,
NULL);
@@ -2248,7 +2248,7 @@ mo_status mo_post_source_window(mo_window *win) {
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget source_form, label, dlabel;
-
+
/* Create it for the first time. */
XmxSetUniqid(win->id);
win->source_win=
@@ -2261,18 +2261,18 @@ mo_status mo_post_source_window(mo_window *win) {
/* Constraints for base. */
XmxSetConstraints(dialog_frame,
XmATTACH_FORM,
- XmATTACH_FORM,
+ XmATTACH_FORM,
XmATTACH_FORM,
XmATTACH_FORM,
NULL,
NULL,
NULL,
NULL);
-
+
/* Main form. */
source_form=
XmxMakeForm(dialog_frame);
-
+
label=
XmxMakeLabel(source_form,
"URL: ");
@@ -2291,7 +2291,7 @@ mo_status mo_post_source_window(mo_window *win) {
False);
win->source_date_text=
XmxMakeText(source_form);
-
+
/* Info window: text widget, not editable. */
XmxSetArg(XmNscrolledWindowMarginWidth,
10);
@@ -2309,7 +2309,7 @@ mo_status mo_post_source_window(mo_window *win) {
80);
win->source_text=
XmxMakeScrolledText(source_form);
-
+
dialog_sep=
XmxMakeHorizontalSeparator(source_form);
@@ -2331,7 +2331,7 @@ mo_status mo_post_source_window(mo_window *win) {
0);
XmxSetConstraints(label,
XmATTACH_FORM,
- XmATTACH_NONE,
+ XmATTACH_NONE,
XmATTACH_FORM,
XmATTACH_NONE,
NULL,
@@ -2345,7 +2345,7 @@ mo_status mo_post_source_window(mo_window *win) {
0);
XmxSetConstraints(dlabel,
XmATTACH_WIDGET,
- XmATTACH_NONE,
+ XmATTACH_NONE,
XmATTACH_FORM,
XmATTACH_NONE,
label,
@@ -2382,11 +2382,11 @@ mo_status mo_post_source_window(mo_window *win) {
NULL);
XmxSetConstraints(XtParent(win->source_text),
XmATTACH_WIDGET,
- XmATTACH_WIDGET,
+ XmATTACH_WIDGET,
XmATTACH_FORM,
XmATTACH_FORM,
win->source_date_text,
- dialog_sep,
+ dialog_sep,
NULL,
NULL);
XmxSetArg(XmNtopOffset,
@@ -2394,7 +2394,7 @@ mo_status mo_post_source_window(mo_window *win) {
XmxSetConstraints(dialog_sep,
XmATTACH_NONE,
XmATTACH_WIDGET,
- XmATTACH_FORM,
+ XmATTACH_FORM,
XmATTACH_FORM,
NULL,
buttons_form,
@@ -2403,14 +2403,14 @@ mo_status mo_post_source_window(mo_window *win) {
XmxSetConstraints(buttons_form,
XmATTACH_NONE,
XmATTACH_FORM,
- XmATTACH_FORM,
+ XmATTACH_FORM,
XmATTACH_FORM,
NULL,
NULL,
NULL,
NULL);
}
-
+
XmxManageRemanage(win->source_win);
if (win->current_node) {
@@ -2432,7 +2432,7 @@ mo_status mo_search_window(mo_window *win,char *str, int backward, int caseless,
{
int rc;
- /* search the first hit every time if by cci application */
+ /* search the first hit every time if by cci application */
if (cci_docommand || news)
{
((ElementRef *)win->search_start)->id = 0;
@@ -2460,9 +2460,9 @@ mo_status mo_search_window(mo_window *win,char *str, int backward, int caseless,
(ElementRef *)win->search_end);
}
else {
- rc = HTMLSearchText(win->scrolled_win, str,
+ rc = HTMLSearchText(win->scrolled_win, str,
(ElementRef *)win->search_start,
- (ElementRef *)win->search_end,
+ (ElementRef *)win->search_end,
backward,
caseless);
}
@@ -2548,7 +2548,7 @@ static XmxCallback (search_win_cb)
break;
case 3: /* help */
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("docview-menubar-file.html"),
NULL, NULL);
break;
@@ -2564,36 +2564,36 @@ mo_status mo_post_search_window (mo_window *win)
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget search_form, label;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->search_win = XmxMakeFormDialog
+ win->search_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Find In Document" );
dialog_frame = XmxMakeFrame (win->search_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
search_form = XmxMakeForm (dialog_frame);
-
+
label = XmxMakeLabel (search_form, "Find string in document: " );
XmxSetArg (XmNcolumns, 25);
win->search_win_text = XmxMakeText (search_form);
XmxAddCallbackToText (win->search_win_text, search_win_cb, 0);
- win->search_caseless_toggle = XmxMakeToggleButton
+ win->search_caseless_toggle = XmxMakeToggleButton
(search_form, "Caseless Search" , NULL, 0);
XmxSetToggleButton (win->search_caseless_toggle, XmxSet);
- win->search_backwards_toggle = XmxMakeToggleButton
+ win->search_backwards_toggle = XmxMakeToggleButton
(search_form, "Backwards Search" , NULL, 0);
dialog_sep = XmxMakeHorizontalSeparator (search_form);
-
+
buttons_form = XmxMakeFormAndFourButtons
- (search_form, search_win_cb,
+ (search_form, search_win_cb,
"Find" , "Reset" ,
"Dismiss" , "Help..." ,
0, 1, 2, 3);
@@ -2616,7 +2616,7 @@ mo_status mo_post_search_window (mo_window *win)
left to position, right to position. */
XmxSetConstraints
(win->search_caseless_toggle, XmATTACH_WIDGET, XmATTACH_NONE,
- XmATTACH_WIDGET, XmATTACH_NONE,
+ XmATTACH_WIDGET, XmATTACH_NONE,
win->search_win_text, NULL, label, NULL);
XmxSetOffsets (win->search_caseless_toggle, 8, 0, 2, 0);
@@ -2624,25 +2624,25 @@ mo_status mo_post_search_window (mo_window *win)
bottom to nothing, left to position, right to position. */
XmxSetConstraints
(win->search_backwards_toggle, XmATTACH_WIDGET, XmATTACH_NONE,
- XmATTACH_WIDGET, XmATTACH_NONE, win->search_caseless_toggle,
+ XmATTACH_WIDGET, XmATTACH_NONE, win->search_caseless_toggle,
NULL, label, NULL);
XmxSetOffsets (win->search_backwards_toggle, 8, 0, 2, 0);
XmxSetOffsets (dialog_sep, 8, 0, 0, 0);
/* dialog_sep attaches top to search_backwards_toggle,
bottom to buttons_form, left to form, right to form */
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
win->search_backwards_toggle, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XmxManageRemanage (win->search_win);
-
+
return mo_succeed;
}
@@ -2737,13 +2737,13 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
if ((!editorName) || (!strlen(editorName))) {
/*
XmxMakeErrorDialog (win->save_win,
- "Unable to get EDITOR environment variable.",
+ "Unable to get EDITOR environment variable.",
"Edit Source Error");
return mo_fail;
*/
editorName="vi"; /* default to vi */
}
-
+
}
/* write out source to tmp file with .html extension */
@@ -2768,7 +2768,7 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
sprintf(final,"\nUnable to Open Editor Temp File:\n %s\n\nOpen Error:\n %s\n" ,(!sourceFileName || !*sourceFileName?" ":sourceFileName),buf);
XmxMakeErrorDialog (win->save_win,
- final,
+ final,
"Edit Source Error" );
if (final) {
@@ -2798,7 +2798,7 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
sprintf(final,"\nUnable to Write Editor Temp File:\n %s\n\nWrite Error:\n %s\n" ,(!sourceFileName || !*sourceFileName?" ":sourceFileName),buf);
XmxMakeErrorDialog (win->save_win,
- final,
+ final,
"Edit Write Error" );
if (final) {
@@ -2819,7 +2819,7 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
if (get_pref_boolean(eEDIT_COMMAND_USE_XTERM)) {
sprintf(execString,"%s -T %s -e %s",
get_pref_string(eXTERM_COMMAND),
- editorTitle,
+ editorTitle,
editorCommand);
execArg[argCount++] = get_pref_string(eXTERM_COMMAND);
@@ -2831,8 +2831,8 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
sprintf(execString,"%s %s\n",editorName,sourceFileName);
}
- execArg[argCount++] = editorName; /* problem if there are spaces
- in this edit command....will have
+ execArg[argCount++] = editorName; /* problem if there are spaces
+ in this edit command....will have
to parse and break up */
execArg[argCount++] = sourceFileName;
execArg[argCount++] = NULL;
@@ -2844,14 +2844,14 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
#endif
if (!pid) {
/* I'm the child */
- execvp(execArg[0], execArg);
+ execvp(execArg[0], execArg);
#ifndef DISABLE_TRACE
if (srcTrace) {
fprintf(stderr,"Couldn't execute:\n%s\n",execString);
}
#endif
- _exit(-1); /*don't use regular exit() or mom's I/O channels
+ _exit(-1); /*don't use regular exit() or mom's I/O channels
will close */
}
@@ -2874,7 +2874,7 @@ extern void AddChildProcessHandler(int, void (*)(), void *);
AddChildProcessHandler(pid, mo_done_editing, e);
return mo_succeed;
-}
+}
diff --git a/src/gui-dialogs.h b/src/gui-dialogs.h
index a9b9523..9384231 100644
--- a/src/gui-dialogs.h
+++ b/src/gui-dialogs.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/gui-documents.c b/src/gui-documents.c
index f167983..b665f8e 100644
--- a/src/gui-documents.c
+++ b/src/gui-documents.c
@@ -101,10 +101,10 @@ static void mo_back_possible (mo_window *win);
static void mo_forward_possible (mo_window *win);
static void mo_annotate_edit_possible (mo_window *win);
static void mo_annotate_edit_impossible (mo_window *win);
-static void mo_set_text (Widget w, char *txt, char *ans, int id,
+static void mo_set_text (Widget w, char *txt, char *ans, int id,
char *target_anchor, void *cached_stuff);
-static mo_status mo_post_load_window_text (mo_window *win, char *url,
- char *content_type, char *post_data,
+static mo_status mo_post_load_window_text (mo_window *win, char *url,
+ char *content_type, char *post_data,
char *ref);
/* for selective image loading */
@@ -117,18 +117,18 @@ extern Boolean currently_delaying_images;
/****************************************************************************
* name: check_imagedelay
* purpose: checks the win->current_node->url against the imagedelay_sites
- * inputs:
+ * inputs:
* - char *url - the current url
- * returns:
+ * returns:
* 1 if there is a match in imagedelay_sites
* 0 if there is not a match
- *
+ *
****************************************************************************/
static Boolean check_imagedelay (char *url) {
long i;
-
+
if(imagedelay_sites != NULL) {
for(i = 0; imagedelay_sites[i]; i++) {
if(strstr(url, imagedelay_sites[i])) {
@@ -136,9 +136,9 @@ static Boolean check_imagedelay (char *url) {
}
}
}
-
+
return 0;
-
+
}
@@ -146,12 +146,12 @@ static Boolean check_imagedelay (char *url) {
* name: mo_snarf_scrollbar_values
* purpose: Store current viewing state in the current node, in case
* we want to return to the same location later.
- * inputs:
+ * inputs:
* - mo_window *win: Current window.
- * returns:
+ * returns:
* mo_succeed
* (mo_fail if no current node exists)
- * remarks:
+ * remarks:
* Snarfs current docid position in the HTML widget.
****************************************************************************/
static mo_status mo_snarf_scrollbar_values (mo_window *win)
@@ -255,7 +255,7 @@ static void mo_forward_possible (mo_window *win)
mo_tool_state(&(win->tools[BTN_NEXT]),XmxSensitive,BTN_NEXT);
XmxRSetSensitive (win->menubar, mo_forward, XmxSensitive);
}
-
+
mo_popup_set_something("Forward", XmxSensitive, NULL);
return;
@@ -272,7 +272,7 @@ mo_status mo_forward_impossible (mo_window *win)
mo_tool_state(&(win->tools[BTN_NEXT]),XmxNotSensitive,BTN_NEXT);
XmxRSetSensitive (win->menubar, mo_forward, XmxNotSensitive);
}
-
+
mo_popup_set_something("Forward", XmxNotSensitive, NULL);
return mo_succeed;
}
@@ -296,7 +296,7 @@ static void mo_annotate_edit_impossible (mo_window *win)
/* ------------------------------------------------------------------------ */
-static void mo_set_text (Widget w, char *txt, char *ans, int id,
+static void mo_set_text (Widget w, char *txt, char *ans, int id,
char *target_anchor, void *cached_stuff)
{
/* Any data transfer that takes place in here must be inlined
@@ -305,10 +305,10 @@ static void mo_set_text (Widget w, char *txt, char *ans, int id,
interrupted = 0;
mo_set_image_cache_nuke_threshold ();
if (get_pref_boolean(eANNOTATIONS_ON_TOP))
- HTMLSetText (w, txt, ans ? ans : "\0", "\0", id, target_anchor,
+ HTMLSetText (w, txt, ans ? ans : "\0", "\0", id, target_anchor,
cached_stuff);
else
- HTMLSetText (w, txt, "\0", ans ? ans : "\0", id, target_anchor,
+ HTMLSetText (w, txt, "\0", ans ? ans : "\0", id, target_anchor,
cached_stuff);
loading_inlined_images = 0;
interrupted = 0;
@@ -320,7 +320,7 @@ static void mo_set_text (Widget w, char *txt, char *ans, int id,
* name: mo_do_window_text (PRIVATE)
* purpose: Set a window's text and do lots of other housekeeping
* and GUI-maintenance things.
- * inputs:
+ * inputs:
* - mo_window *win: The current window.
* - char *url: The URL for the text; assumed to be canonicalized
* and otherwise ready for inclusion in history lists,
@@ -332,9 +332,9 @@ static void mo_set_text (Widget w, char *txt, char *ans, int id,
* as a new node in the history list. If FALSE,
* then we're just moving around in the history list.
* - char *ref: Reference (possible title) for this text.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
* This is the mother of all functions in Mosaic. Probably should be
* rethought and broken down.
****************************************************************************/
@@ -367,7 +367,7 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
/* TRACK APPLICATION MODE */
{
int newmode = moMODE_PLAIN;
-
+
if(!strncmp(url,"ftp:",4)) newmode = moMODE_FTP;
if(!strncmp(url,"news:",4)) {
int p,n,pt,nt,f;
@@ -380,38 +380,38 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
mo_tool_state(&(win->tools[BTN_NTHR]),
nt?XmxSensitive:XmxNotSensitive,BTN_NTHR);
- XmxRSetSensitive (win->menubar, mo_news_nextt,
+ XmxRSetSensitive (win->menubar, mo_news_nextt,
nt?XmxSensitive:XmxNotSensitive);
mo_tool_state(&(win->tools[BTN_PART]),
p?XmxSensitive:XmxNotSensitive,BTN_PART);
- XmxRSetSensitive (win->menubar, mo_news_prev,
+ XmxRSetSensitive (win->menubar, mo_news_prev,
p?XmxSensitive:XmxNotSensitive);
mo_tool_state(&(win->tools[BTN_NART]),
n?XmxSensitive:XmxNotSensitive,BTN_NART);
- XmxRSetSensitive (win->menubar, mo_news_next,
+ XmxRSetSensitive (win->menubar, mo_news_next,
n?XmxSensitive:XmxNotSensitive);
mo_tool_state(&(win->tools[BTN_POST]),XmxSensitive,BTN_POST);
mo_tool_state(&(win->tools[BTN_FOLLOW]),
f?XmxSensitive:XmxNotSensitive,BTN_FOLLOW);
- XmxRSetSensitive (win->menubar, mo_news_follow,
+ XmxRSetSensitive (win->menubar, mo_news_follow,
f?XmxSensitive:XmxNotSensitive);
/* set the popup too */
- mo_popup_set_something("Previous Thread",
+ mo_popup_set_something("Previous Thread",
pt?XmxSensitive:XmxNotSensitive, NULL);
mo_popup_set_something("Next Thread",
nt?XmxSensitive:XmxNotSensitive, NULL);
- mo_popup_set_something("Previous Article",
- p?XmxSensitive:XmxNotSensitive, NULL);
- mo_popup_set_something("Next Article",
+ mo_popup_set_something("Previous Article",
+ p?XmxSensitive:XmxNotSensitive, NULL);
+ mo_popup_set_something("Next Article",
n?XmxSensitive:XmxNotSensitive, NULL);
mo_popup_set_something("Followup",
f?XmxSensitive:XmxNotSensitive, NULL);
newmode = moMODE_NEWS;
- }
+ }
if(newmode != win->mode) {
win->mode = newmode;
mo_switch_mode(win);
@@ -430,7 +430,7 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
NULL);
XmStringFree (xmstr);
}
-
+
/* If !register_visit, we're just screwing around with current_node
already, so don't bother snarfing scrollbar values. */
if (register_visit)
@@ -441,7 +441,7 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
win->cached_url = cached_url;
mo_here_we_are_son (url);
-
+
{
/* Since mo_fetch_annotation_links uses the communications code,
we need to play games with binary_transfer. */
@@ -488,8 +488,8 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
/* vvv HREF ListBox Stuff -- BJS 10/2/95 */
if(win->links_win) mo_update_links_window(win);
-
-
+
+
if (win->target_anchor)
free (win->target_anchor);
@@ -553,13 +553,13 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
mo_back_possible (win);
else
mo_back_impossible (win);
-
+
if (win->current_node && win->current_node->next != NULL)
mo_forward_possible (win);
else
mo_forward_impossible (win);
- if (win->current_node &&
+ if (win->current_node &&
mo_is_editable_annotation (win, win->current_node->text))
mo_annotate_edit_possible (win);
else
@@ -584,7 +584,7 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
win->delay_image_loads = 0;
did_we_image_delay=0;
}
-
+
return mo_succeed;
}
@@ -594,12 +594,12 @@ mo_status mo_do_window_text (mo_window *win, char *url, char *txt,
* purpose: Given a window and a node, set the window's current node.
* This assumes node is already all put together, in the history
* list for the window, etc.
- * inputs:
+ * inputs:
* - mo_window *win: The current window.
* - mo_node *node: The node to use.
- * returns:
+ * returns:
* Result of calling mo_do_window_text.
- * remarks:
+ * remarks:
* This routine is meant to be used to move forward, backward,
* and to arbitrarily locations in the history list.
****************************************************************************/
@@ -608,7 +608,7 @@ mo_status mo_set_win_current_node (mo_window *win, mo_node *node)
void *to_free = NULL;
mo_status r;
Widget pix_free;
-
+
mo_snarf_scrollbar_values (win);
pix_free = win->scrolled_win;
@@ -629,8 +629,8 @@ mo_status mo_set_win_current_node (mo_window *win, mo_node *node)
MoCCISendAnchorToCCI(win->current_node->url, 0);
/*****************************************************/
- r = mo_do_window_text (win, win->current_node->url,
- win->current_node->text,
+ r = mo_do_window_text (win, win->current_node->url,
+ win->current_node->text,
win->current_node->texthead,
FALSE, win->current_node->ref,
win->current_node->last_modified,
@@ -652,25 +652,25 @@ mo_status mo_set_win_current_node (mo_window *win, mo_node *node)
* name: mo_reload_window_text
* purpose: Reload the current window's text by pulling it over the
* network again.
- * inputs:
+ * inputs:
* - mo_window *win: The current window.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
* This frees the current window's texthead. This calls mo_pull_er_over
* directly, and needs to be smarter about handling HDF, etc.
****************************************************************************/
mo_status mo_reload_window_text (mo_window *win, int reload_images_also)
{
static Boolean did_we_image_delay=0;
-
+
mo_busy ();
mo_set_current_cached_win (win);
/* Uh oh, this is trouble... */
if (!win->current_node)
- return mo_load_window_text
+ return mo_load_window_text
(win, startup_document ? startup_document : home_document, NULL);
/* Free all images in the current document. */
@@ -697,7 +697,7 @@ mo_status mo_reload_window_text (mo_window *win, int reload_images_also)
reloading=1;
}
- win->current_node->text = mo_pull_er_over (win->current_node->url,
+ win->current_node->text = mo_pull_er_over (win->current_node->url,
&win->current_node->texthead);
@@ -723,17 +723,17 @@ mo_status mo_reload_window_text (mo_window *win, int reload_images_also)
}
}
#ifdef HAVE_HDF
- if (win->current_node->text &&
+ if (win->current_node->text &&
strncmp (win->current_node->text, "current_node->url, win->current_node->text,
mo_url_extract_anchor (win->current_node->url));
win->current_node->text = text;
win->current_node->texthead = text;
}
-#endif
-
+#endif
+
/* Clear out the cached stuff, if any exists. */
win->reloading = 1;
@@ -743,7 +743,7 @@ mo_status mo_reload_window_text (mo_window *win, int reload_images_also)
/* If news: URL, then we need to auto-scroll to the >>> marker if it
is here. We use a hacked version of the searching function here
- which will need to be updated when we rewrite. --SWP
+ which will need to be updated when we rewrite. --SWP
*/
if (win->current_node &&
@@ -760,11 +760,11 @@ mo_status mo_reload_window_text (mo_window *win, int reload_images_also)
/****************************************************************************
* name: mo_refresh_window_text
* purpose: Reload the current window's text without pulling it over the net.
- * inputs:
+ * inputs:
* - mo_window *win: The current window.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
****************************************************************************/
mo_status mo_refresh_window_text (mo_window *win)
{
@@ -795,14 +795,14 @@ mo_status mo_refresh_window_text (mo_window *win)
* name: mo_load_window_text
* purpose: Given a window and a raw URL, load the window. The window
* is assumed to already exist with a document inside, etc.
- * inputs:
+ * inputs:
* - mo_window *win: The current window.
* - char *url: The URL to load.
* - char *ref: The reference ("parent") URL.
* NOTE: actually, the ref field is the citation hypertext - AMB
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
* This is getting ugly.
****************************************************************************/
mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
@@ -824,9 +824,9 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
} else {
newtexthead = newtext;
goto special_urls;
- }
+ }
}
-
+
/* If we're just referencing an anchor inside a document,
do the right thing. */
if (url && *url == '#')
@@ -848,7 +848,7 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
newtexthead = newtext;
}
}
- url = mo_url_canonicalize_keep_anchor
+ url = mo_url_canonicalize_keep_anchor
(url, win->current_node ? win->current_node->url : "");
/********* Send Anchor history to CCI if CCI wants it */
MoCCISendAnchorToCCI(url, 1);
@@ -874,16 +874,16 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
/* ADC ZZZZ ugly hack below: */
-
+
CCIprotocol_handler_found = 0;
-
+
/********* Send Anchor history to CCI if CCI wants to handle it */
MoCCISendAnchorToCCI(url,3);
/*****************************************************/
-
+
if (CCIprotocol_handler_found)
return return_stat; /* success */
-
+
/********* Send Anchor history to CCI if CCI wants it */
@@ -891,19 +891,19 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
/*****************************************************/
newtext = mo_pull_er_over (canon, &newtexthead);
- /*
+ /*
* added so MCCIRequestGetURL could return failed when
* url fails
*/
if (newtext)
if ( (!strncmp(newtext, "ERROR", 10)) ||
- (!strncmp(newtext,
+ (!strncmp(newtext,
"404 Not Found",
28)))
return_stat = mo_fail;
/* Yes this is a really big hack (ETG) */
- if (win->target_anchor && *(win->target_anchor))
+ if (win->target_anchor && *(win->target_anchor))
MoCCIAddAnchorToURL(canon, url);
/* AF */
@@ -923,7 +923,7 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
{
mo_here_we_are_son (url);
url = use_this_url_instead;
-
+
/* Go get another target_anchor. */
if (win->target_anchor)
free (win->target_anchor);
@@ -973,7 +973,7 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
if (win->target_anchor)
free (win->target_anchor);
win->target_anchor = NULL;
-
+
mo_gui_done_with_icon ();
mo_not_busy ();
}
@@ -990,8 +990,8 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
}
else
#endif
-
-
+
+
/* Now, if it's a telnet session, there should be no need
to do anything else. Also check for override in text itself. */
if (strncmp (url, "telnet:", 7) == 0 ||
@@ -1002,7 +1002,7 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
/* We don't need this anymore. */
free (newtext);
- /* We still want a global history entry but NOT a
+ /* We still want a global history entry but NOT a
window history entry. */
mo_here_we_are_son (url);
/* ... and we want to redisplay the current window to
@@ -1014,14 +1014,14 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
}
else if (newtext)
{
-
+
/* Not a telnet session and not an override, but text present
(the "usual" case): */
/* first check if we are using cci Get, if so, don't display
the error message */
- if (cci_get && (return_stat == mo_fail) )
+ if (cci_get && (return_stat == mo_fail) )
{
#ifndef DISABLE_TRACE
if (srcTrace) {
@@ -1034,7 +1034,7 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
{
special_urls:
/* Set the window text. */
- mo_do_window_text (win, url, newtext, newtexthead, (do_meta==1?0:2),
+ mo_do_window_text (win, url, newtext, newtexthead, (do_meta==1?0:2),
ref, last_modified, expires);
}
}
@@ -1051,7 +1051,7 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
/* first check if we are using cci Get, if so, don't display
the error message */
- if (cci_get && (return_stat == mo_fail) )
+ if (cci_get && (return_stat == mo_fail) )
{
#ifndef DISABLE_TRACE
if (srcTrace) {
@@ -1087,8 +1087,8 @@ mo_status mo_load_window_text (mo_window *win, char *url, char *ref)
}
-static mo_status mo_post_load_window_text (mo_window *win, char *url,
- char *content_type, char *post_data,
+static mo_status mo_post_load_window_text (mo_window *win, char *url,
+ char *content_type, char *post_data,
char *ref)
{
char *newtext = NULL, *newtexthead = NULL, *actionID;
@@ -1120,7 +1120,7 @@ static mo_status mo_post_load_window_text (mo_window *win, char *url,
newtexthead = newtext;
}
}
- url = mo_url_canonicalize_keep_anchor
+ url = mo_url_canonicalize_keep_anchor
(url, win->current_node ? win->current_node->url : "");
}
else
@@ -1142,7 +1142,7 @@ static mo_status mo_post_load_window_text (mo_window *win, char *url,
interrupted = 0;
if (!MoCCIFormToClient(actionID, NULL, content_type, post_data, 0))
- newtext = mo_post_pull_er_over (canon, content_type,
+ newtext = mo_post_pull_er_over (canon, content_type,
post_data, &newtexthead);
free (canon);
}
@@ -1220,7 +1220,7 @@ static mo_status mo_post_load_window_text (mo_window *win, char *url,
/* We don't need this anymore. */
free (newtext);
- /* We still want a global history entry but NOT a
+ /* We still want a global history entry but NOT a
window history entry. */
mo_here_we_are_son (url);
/* ... and we want to redisplay the current window to
@@ -1263,12 +1263,12 @@ static mo_status mo_post_load_window_text (mo_window *win, char *url,
* name: mo_duplicate_window_text
* purpose: Given an old window and a new window, make a copy of the text
* in the old window and install it in the new window.
- * inputs:
+ * inputs:
* - mo_window *oldw: The old window.
* - mo_window *neww: The new window.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
* This is how windows are cloned: a new window is created and this
* call sets up its contents.
****************************************************************************/
@@ -1283,9 +1283,9 @@ mo_status mo_duplicate_window_text (mo_window *oldw, mo_window *neww)
newtext = strdup (oldw->current_node->text);
- mo_do_window_text
- (neww, strdup (oldw->current_node->url),
- newtext, newtext, TRUE,
+ mo_do_window_text
+ (neww, strdup (oldw->current_node->url),
+ newtext, newtext, TRUE,
oldw->current_node->ref ? strdup (oldw->current_node->ref) : NULL,
oldw->current_node->last_modified,
oldw->current_node->expires);
@@ -1296,14 +1296,14 @@ mo_status mo_duplicate_window_text (mo_window *oldw, mo_window *neww)
/****************************************************************************
* name: mo_access_document
- * purpose: Given a URL, access the document by loading the current
+ * purpose: Given a URL, access the document by loading the current
* window's text.
- * inputs:
+ * inputs:
* - mo_window *win: The current window.
* - char *url: URL to access.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
* This should be the standard call for accessing a document.
****************************************************************************/
mo_status mo_access_document (mo_window *win, char *url)
diff --git a/src/gui-documents.h b/src/gui-documents.h
index 68a6149..62a4248 100644
--- a/src/gui-documents.h
+++ b/src/gui-documents.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/gui-extras.c b/src/gui-extras.c
index 08ff87d..f24a7a5 100644
--- a/src/gui-extras.c
+++ b/src/gui-extras.c
@@ -75,7 +75,7 @@ static XmxCallback (links_win_cb)
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
int *posns, pcount;
char *text,*fnam,*url;
-
+
switch (XmxExtractToken ((int)client_data)){
case 0: /* GOTO */
if(XmListGetSelectedPos(win->links_list, &posns, &pcount)){
@@ -94,7 +94,7 @@ static XmxCallback (links_win_cb)
return;
case 3:
if(XmListGetSelectedPos(win->links_list, &posns, &pcount)){
-
+
if(pcount && XmStringGetLtoR(win->links_items[posns[0]-1],
XmSTRING_DEFAULT_CHARSET,
&text)){
@@ -109,18 +109,18 @@ static XmxCallback (links_win_cb)
XtFree(text);
}
XtFree((char *)posns);
-
+
}
mo_gui_done_with_icon();
- return;
+ return;
case 1: /* DISMISS */
XtUnmanageChild (win->links_win);
break;
case 2: /* HELP */
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("help-on-links.html"),
NULL, NULL);
break;
@@ -134,7 +134,7 @@ static void links_list_cb(Widget w, XtPointer client, XtPointer call)
mo_window *win = (mo_window *) client;
char *text;
XmListCallbackStruct *cs = (XmListCallbackStruct *) call;
-
+
if(XmStringGetLtoR(win->links_items[cs->item_position-1],
XmSTRING_DEFAULT_CHARSET,
&text)){
@@ -144,7 +144,7 @@ static void links_list_cb(Widget w, XtPointer client, XtPointer call)
}
/* Don't unmanage the list. */
-
+
return;
}
@@ -153,31 +153,31 @@ mo_status mo_post_links_window(mo_window *win)
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget links_form, list, scroller, label;
-
+
if (!win->links_win)
{
/* Create it for the first time. */
XmxSetUniqid (win->id);
Xmx_n = 0;
- win->links_win = XmxMakeFormDialog
+ win->links_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Document Links" );
dialog_frame = XmxMakeFrame (win->links_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
links_form = XmxMakeForm (dialog_frame);
-
+
dialog_sep = XmxMakeHorizontalSeparator (links_form);
-
+
buttons_form = XmxMakeFormAndFourButtons
- (links_form, links_win_cb,
- "Goto URL" , "Save" ,
- "Dismiss" , "Help..." ,
+ (links_form, links_win_cb,
+ "Goto URL" , "Save" ,
+ "Dismiss" , "Help..." ,
0, 3, 1, 2);
label = XtVaCreateManagedWidget("Document Links & Images ..." ,
@@ -189,7 +189,7 @@ mo_status mo_post_links_window(mo_window *win)
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, 2,
NULL);
-
+
scroller = XtVaCreateWidget("scroller",
xmScrolledWindowWidgetClass,
links_form,
@@ -207,8 +207,8 @@ mo_status mo_post_links_window(mo_window *win)
XmNleftOffset, 8,
XmNrightOffset, 8,
NULL);
-
- list = XtVaCreateManagedWidget("list", xmListWidgetClass,
+
+ list = XtVaCreateManagedWidget("list", xmListWidgetClass,
scroller,
XmNvisibleItemCount, 10,
XmNresizable, False,
@@ -217,28 +217,28 @@ mo_status mo_post_links_window(mo_window *win)
NULL);
XtAddCallback(list, XmNdefaultActionCallback, links_list_cb, (XtPointer) win);
-
+
win->links_list = list;
win->links_items = NULL;
win->links_count = 0;
-
+
XtManageChild(scroller);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep,
+ XmxSetConstraints
+ (dialog_sep,
XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
NULL, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form,
+ XmxSetConstraints
+ (buttons_form,
XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
XmxManageRemanage (win->links_win);
mo_update_links_window(win);
-
+
return mo_succeed;
}
@@ -252,7 +252,7 @@ mo_status mo_update_links_window(mo_window *win)
imgs = HTMLGetImageSrcs(win->scrolled_win,&icount);
count = icount + hcount;
-
+
if(!count){
XtVaSetValues(win->links_list,
XmNitemCount, 0,
@@ -288,14 +288,14 @@ mo_status mo_update_links_window(mo_window *win)
XmNitemCount, count,
NULL);
}
-
+
if(win->links_count) {
- XtFree((char *)(win->links_items));
+ XtFree((char *)(win->links_items));
}
win->links_count = count;
win->links_items = xmstr;
-
+
return mo_succeed;
}
@@ -342,7 +342,7 @@ struct {
{"help","0http://www.ncsa.uiuc.edu/SDG/Software/mosaic-x/"},
/* places & organizations */
{"acm","0http://www.acm.uiuc.edu/"},
- {"ncsa","0http://www.ncsa.uiuc.edu/"},
+ {"ncsa","0http://www.ncsa.uiuc.edu/"},
{"sdg","0http://sdg.ncsa.uiuc.edu/"},
{"uiuc","0http://www.uiuc.edu/"},
/* for fun */
@@ -354,7 +354,7 @@ struct {
"Are you lost?Surely you jest?
"},
{NULL,NULL}
};
-
+
/* assorted FUN things */
char *mo_special_urls(char *url)
{
@@ -363,7 +363,7 @@ char *mo_special_urls(char *url)
if(!url) return NULL;
if(strncmp(url,"about:",6)) return NULL;
-
+
for(i=0;abouts[i].name;i++) {
if(!strncmp(&url[6],abouts[i].name,strlen(abouts[i].name))) {
if(abouts[i].expand[0]=='0')
diff --git a/src/gui-extras.h b/src/gui-extras.h
index 780fe2b..bcdeaca 100644
--- a/src/gui-extras.h
+++ b/src/gui-extras.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/gui-ftp.c b/src/gui-ftp.c
index 087c247..b73ba6d 100644
--- a/src/gui-ftp.c
+++ b/src/gui-ftp.c
@@ -67,8 +67,8 @@
static mo_status mo_handle_ftpremove (mo_window *win, char *urlNsite);
-/* gui-ftp handles all of the gui bits of the FTP send, remove, and mkdir
- functionality. All of the actual transfer stuff is in libwww2/HTFTP.c
+/* gui-ftp handles all of the gui bits of the FTP send, remove, and mkdir
+ functionality. All of the actual transfer stuff is in libwww2/HTFTP.c
*/
/*--------------------- mo_handle_ftpput ---------------------------------*/
@@ -86,12 +86,12 @@ mo_status mo_handle_ftpput(mo_window *win)
win->ftp_site = strdup(win->current_node->url);
mo_post_ftpput_window(win);
} else {
- sprintf(tbuf, "FTP Send requires you to be on a page with an FTP url.");
+ sprintf(tbuf, "FTP Send requires you to be on a page with an FTP url.");
application_user_info_wait(tbuf);
return mo_fail;
}
- return mo_succeed;
-}
+ return mo_succeed;
+}
/* ---------------------- mo_post_ftpput_window ----------------------- */
static XmxCallback (ftpput_win_cb)
@@ -103,7 +103,7 @@ static XmxCallback (ftpput_win_cb)
XmString st;
XmStringTable selected_items;
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
-
+
XtUnmanageChild (win->ftpput_win); /* Down with the box */
fsbList = XmFileSelectionBoxGetChild (win->ftpput_win, XmDIALOG_LIST);
XtVaGetValues (fsbList,
@@ -115,7 +115,7 @@ static XmxCallback (ftpput_win_cb)
for (i=0; iftp_site, efname);
if ((ret = HTFTPSend (tbuf)) != 0) { /* !HT_LOADED */
@@ -135,7 +135,7 @@ static XmxCallback (ftpput_win_cb)
NULL);
XmStringGetLtoR (st, XmSTRING_DEFAULT_CHARSET, &fname);
pathEval (efname, fname);
- XtFree (fname);
+ XtFree (fname);
sprintf (tbuf, "%s&%s", win->ftp_site, efname);
if ((ret = HTFTPSend (tbuf)) != 0) { /* !HT_LOADED */
if (ret != -2) { /* If the user interrupted us, forget about telling them */
@@ -147,8 +147,8 @@ static XmxCallback (ftpput_win_cb)
}
}
-
- /* Clear out the selections, we have to do this because the XmFSB has no clue
+
+ /* Clear out the selections, we have to do this because the XmFSB has no clue
it is being used in extended selection mode. */
XmListDeselectAllItems(fsbList);
free(win->ftp_site);
@@ -160,7 +160,7 @@ mo_status mo_post_ftpput_window (mo_window *win)
{
char tbuf[MAX_BUF_LEN+1];
Widget fsbList;
-
+
if( win->ftp_site == NULL ) {
return mo_fail;
}
@@ -171,14 +171,14 @@ mo_status mo_post_ftpput_window (mo_window *win)
{
win->ftpput_win = XmxMakeFileSBDialog(win->base, tbuf, "Name of local file to send:", ftpput_win_cb, 0);
/* Change the selection mode */
- fsbList = XmFileSelectionBoxGetChild (win->ftpput_win, XmDIALOG_LIST);
+ fsbList = XmFileSelectionBoxGetChild (win->ftpput_win, XmDIALOG_LIST);
XtVaSetValues (fsbList,
XmNselectionPolicy, XmEXTENDED_SELECT,
NULL);
} else {
XmFileSelectionDoSearch (win->ftpput_win, NULL);
}
-
+
XmxManageRemanage (win->ftpput_win);
return mo_succeed;
}
@@ -189,7 +189,7 @@ mo_status mo_handle_ftpmkdir(mo_window *win)
{
char tbuf[MAX_BUF_LEN+1];
- if (!win->current_node)
+ if (!win->current_node)
return mo_fail;
/* Check to see if the url is somethin' like ftp://somewarez.31337.com */
@@ -197,12 +197,12 @@ mo_status mo_handle_ftpmkdir(mo_window *win)
win->ftp_site = strdup(win->current_node->url);
mo_post_ftpmkdir_window(win);
} else {
- sprintf(tbuf, "FTP MkDir requires you to be on a page with an FTP url.");
+ sprintf(tbuf, "FTP MkDir requires you to be on a page with an FTP url.");
application_user_info_wait(tbuf);
return mo_fail;
}
- return mo_succeed;
-}
+ return mo_succeed;
+}
/*--------------------- mo_post_ftpmkdir_window ---------------------------------*/
static XmxCallback (ftpmkdir_win_cb)
@@ -212,7 +212,7 @@ static XmxCallback (ftpmkdir_win_cb)
int ret;
switch (XmxExtractToken ((int)client_data)) {
-
+
case 0: /* Create dir */
XtUnmanageChild (win->ftpmkdir_win);
dirpath = XmxTextGetString (win->ftpmkdir_text);
@@ -252,29 +252,29 @@ mo_status mo_post_ftpmkdir_window (mo_window *win)
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget form, label;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
win->ftpmkdir_win = XmxMakeFormDialog (win->base, "NCSA Mosaic: FTP MkDir");
dialog_frame = XmxMakeFrame (win->ftpmkdir_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
form = XmxMakeForm (dialog_frame);
-
+
label = XmxMakeLabel (form, "Directory to Create: ");
XmxSetArg (XmNwidth, 310);
win->ftpmkdir_text = XmxMakeTextField (form);
XmxAddCallbackToText (win->ftpmkdir_text, ftpmkdir_win_cb, 0);
-
+
dialog_sep = XmxMakeHorizontalSeparator (form);
-
+
buttons_form = XmxMakeFormAndFourButtons
- (form, ftpmkdir_win_cb, "Create", "Clear", "Dismiss", "Help...",
+ (form, ftpmkdir_win_cb, "Create", "Clear", "Dismiss", "Help...",
0, 3, 1, 2);
/* Constraints for form. */
@@ -287,24 +287,24 @@ mo_status mo_post_ftpmkdir_window (mo_window *win)
(win->ftpmkdir_text, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_WIDGET,
XmATTACH_FORM, NULL, NULL, label, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
win->ftpmkdir_text, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XmxManageRemanage (win->ftpmkdir_win);
-
+
return mo_succeed;
}
/* ---------------------- mo_handle_ftpremove ----------------------- */
-static mo_status mo_handle_ftpremove (mo_window *win, char *urlNsite)
+static mo_status mo_handle_ftpremove (mo_window *win, char *urlNsite)
{
int ret;
char tbuf[MAX_BUF_LEN+1];
@@ -328,16 +328,16 @@ void ftp_rmbm_cb(Widget w, XtPointer client_data, XtPointer call_data)
char *xurl, tbuf[MAX_BUF_LEN+1];
extern mo_window *current_win;
struct ele_rec *eptr;
-
+
which = acst->act_code;
eptr = acst->eptr;
-
+
switch(which) {
case mo_ftp_put:
mo_handle_ftpput (current_win);
break;
-
+
case mo_ftp_mkdir:
mo_handle_ftpmkdir (current_win);
break;
diff --git a/src/gui-ftp.h b/src/gui-ftp.h
index 317f3b9..e81750e 100644
--- a/src/gui-ftp.h
+++ b/src/gui-ftp.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
@@ -69,10 +69,10 @@
mo_status mo_handle_ftpput(mo_window *win);
mo_status mo_handle_ftpmkdir(mo_window *win);
-mo_status mo_post_ftpput_window(mo_window *);
-mo_status mo_post_ftpremove_window(mo_window *);
-mo_status mo_post_ftpmkdir_window(mo_window *);
-mo_status mo_post_ftpbar_window(mo_window *);
+mo_status mo_post_ftpput_window(mo_window *);
+mo_status mo_post_ftpremove_window(mo_window *);
+mo_status mo_post_ftpmkdir_window(mo_window *);
+mo_status mo_post_ftpbar_window(mo_window *);
#endif
diff --git a/src/gui-menubar.c b/src/gui-menubar.c
index c2fc4a2..f99e895 100644
--- a/src/gui-menubar.c
+++ b/src/gui-menubar.c
@@ -133,7 +133,7 @@ static XmxCallback (exit_confirm_cb)
mo_exit ();
else
XtUnmanageChild (w);
-
+
return;
}
@@ -470,7 +470,7 @@ mo_status mo_set_underlines (mo_window *win, int choice)
WbNanchorUnderlines, &(win->underlines),
WbNvisitedAnchorUnderlines, &(win->visited_underlines),
WbNdashedAnchorUnderlines, &(win->dashed_underlines),
- WbNdashedVisitedAnchorUnderlines,
+ WbNdashedVisitedAnchorUnderlines,
&(win->dashed_visited_underlines),
NULL);
win->underlines_snarfed = 1;
@@ -482,7 +482,7 @@ mo_status mo_set_underlines (mo_window *win, int choice)
XmxSetArg (WbNanchorUnderlines, win->underlines);
XmxSetArg (WbNvisitedAnchorUnderlines, win->visited_underlines);
XmxSetArg (WbNdashedAnchorUnderlines, win->dashed_underlines);
- XmxSetArg (WbNdashedVisitedAnchorUnderlines,
+ XmxSetArg (WbNdashedVisitedAnchorUnderlines,
win->dashed_visited_underlines);
XmxSetValues (win->scrolled_win);
break;
@@ -519,7 +519,7 @@ mo_status mo_set_underlines (mo_window *win, int choice)
XmxRSetToggleState (win->menubar, win->underlines_state, XmxNotSet);
XmxRSetToggleState (win->menubar, choice, XmxSet);
win->underlines_state = choice;
-
+
return mo_succeed;
}
@@ -528,7 +528,7 @@ mo_status mo_set_underlines (mo_window *win, int choice)
static XmxCallback (clear_history_confirm_cb)
{
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
-
+
if (XmxExtractToken ((int)client_data))
{
mo_window *w = NULL;
@@ -539,7 +539,7 @@ static XmxCallback (clear_history_confirm_cb)
}
else
XtUnmanageChild (w);
-
+
return;
}
@@ -558,9 +558,9 @@ static mo_status mo_do_delete_annotation (mo_window *win)
{
mo_grok_pan_pieces (win->current_node->url,
win->current_node->text,
- &title, &author, &text,
+ &title, &author, &text,
&id, &fname);
-
+
mo_delete_annotation (win, id);
}
else if (win->current_node->annotation_type == mo_annotation_workgroup)
@@ -580,10 +580,10 @@ static XmxCallback (delete_annotation_confirm_cb)
if (!mo_is_editable_annotation (win, win->current_node->text))
return;
-
+
if (XmxExtractToken ((int)client_data))
mo_do_delete_annotation (win);
-
+
return;
}
@@ -611,7 +611,7 @@ int i = XmxExtractToken ((int)client_data);
mo_set_agents(win,i);
return;
}
-
+
/* ------------------------------ menubar_cb ------------------------------ */
@@ -630,7 +630,7 @@ XmxCallback (menubar_cb)
win = current_win;
eptr = acst->eptr;
}
-
+
switch (i)
{
case mo_reload_document:
@@ -749,7 +749,7 @@ XmxCallback (menubar_cb)
mo_access_document (win, NETWORK_STARTING_POINTS_DEFAULT);
break;
case mo_internet_metaindex:
- if (cci_event)
+ if (cci_event)
MoCCISendEventOutput(NAVIGATE_INTERNET_RESOURCES_META_INDEX);
mo_access_document (win, INTERNET_METAINDEX_DEFAULT);
break;
@@ -810,7 +810,7 @@ XmxCallback (menubar_cb)
}
mo_rbm_myself_to_death(win,0);
break;
-/* removed 5/17/96 - bjs
+/* removed 5/17/96 - bjs
case mo_fancy_selections:
win->pretty = 1 - win->pretty;
mo_set_fancy_selections_toggle (win);
@@ -848,8 +848,8 @@ XmxCallback (menubar_cb)
(win->binary_transfer ? 0 : 1);
if (cci_event)
{
- if (win->binary_transfer)
- MoCCISendEventOutput(OPTIONS_LOAD_TO_LOCAL_DISK_ON);
+ if (win->binary_transfer)
+ MoCCISendEventOutput(OPTIONS_LOAD_TO_LOCAL_DISK_ON);
else
MoCCISendEventOutput(OPTIONS_LOAD_TO_LOCAL_DISK_OFF);
}
@@ -975,17 +975,17 @@ XmxCallback (menubar_cb)
break;
case mo_help_faq:
if (cci_event) MoCCISendEventOutput(HELP_ON_FAQ);
- mo_open_another_window (win, mo_assemble_help_url ("mosaic-faq.html"),
+ mo_open_another_window (win, mo_assemble_help_url ("mosaic-faq.html"),
NULL, NULL);
break;
case mo_help_html:
if (cci_event) MoCCISendEventOutput(HELP_ON_HTML);
- mo_open_another_window (win, HTMLPRIMER_PAGE_DEFAULT,
+ mo_open_another_window (win, HTMLPRIMER_PAGE_DEFAULT,
NULL, NULL);
break;
case mo_help_url:
if (cci_event) MoCCISendEventOutput(HELP_ON_URLS);
- mo_open_another_window (win, URLPRIMER_PAGE_DEFAULT,
+ mo_open_another_window (win, URLPRIMER_PAGE_DEFAULT,
NULL, NULL);
break;
#ifndef PRERELEASE
@@ -995,18 +995,18 @@ XmxCallback (menubar_cb)
CommentCard(win);
break;
#endif
- case mo_techsupport:
+ case mo_techsupport:
if (cci_event) MoCCISendEventOutput(HELP_MAIL_TECH_SUPPORT);
{
char subj[128];
-
+
sprintf (subj, "User Feedback -- NCSA Mosaic %s on %s.",
MO_VERSION_STRING, MO_MACHINE_TYPE);
-
+
mo_post_mailto_win(MO_DEVELOPER_ADDRESS,subj);
}
-
+
/* mo_post_techsupport_win (win);*/
break;
case mo_annotate:
@@ -1101,7 +1101,7 @@ XmxCallback (menubar_cb)
sprintf (buf, "news:*");
mo_load_window_text (win, buf, NULL);
break;
-
+
case mo_news_mread:
gui_news_markGroupRead (win);
break;
@@ -1182,21 +1182,21 @@ XmxCallback (menubar_cb)
{
char *author, *title, *text, *fname;
int id;
-
+
if (win->current_node->annotation_type == mo_annotation_private)
{
mo_grok_pan_pieces (win->current_node->url,
win->current_node->text,
- &title, &author, &text,
+ &title, &author, &text,
&id, &fname);
-
+
mo_post_annotate_win (win, 1, id, title, author, text, fname);
}
else if (win->current_node->annotation_type == mo_annotation_workgroup)
{
mo_grok_grpan_pieces (win->current_node->url,
win->current_node->text,
- &title, &author, &text,
+ &title, &author, &text,
&id, &fname);
mo_post_annotate_win (win, 1, id, title, author, text, fname);
}
@@ -1779,13 +1779,13 @@ char buf[BUFSIZ];
/* -------------------- mo_make_document_view_menubar --------------------- */
-/* We now allow a single customizable menu.
+/* We now allow a single customizable menu.
First choice for the spec file is the value of the resource
documentsMenuSpecfile.
If that doesn't exist, second choice is the value of the
environment variable MOSAIC_DOCUMENTS_MENU_SPECFILE.
- If *that* doesn't exist, third choice is specified in
+ If *that* doesn't exist, third choice is specified in
#define DOCUMENTS_MENU_SPECFILE. */
static mo_status mo_file_exists (char *filename)
@@ -1793,7 +1793,7 @@ static mo_status mo_file_exists (char *filename)
struct stat buf;
int r;
- r = stat (filename, &buf);
+ r = stat (filename, &buf);
if (r != -1)
return mo_succeed;
else
@@ -1814,10 +1814,10 @@ static void mo_grok_menubar (char *filename)
/* goto screwed_no_file;*/
/* Make the menu. */
- menu = (XmxMenubarStruct *) malloc
+ menu = (XmxMenubarStruct *) malloc
(MAX_DOCUMENTS_MENU_ITEMS * sizeof (XmxMenubarStruct));
count = 0;
-
+
/* File consists of alternating titles and URL's.
A title consisting of at least two leading dashes
is a separator. */
@@ -1849,17 +1849,17 @@ static void mo_grok_menubar (char *filename)
menu[count].func = (void (*)())menubar_cb;
menu[count].data = count + DOCUMENTS_MENU_COUNT_OFFSET;
menu[count].sub_menu = 0;
-
+
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
{
/* Oops, something went wrong. */
menu[count].namestr = 0;
-
+
/* goto done;*/
break;
}
-
+
/* There's a URL. */
urllist[count] = strdup (line);
urllist[count][strlen(line)-1] = '\0';
@@ -1908,7 +1908,7 @@ static void mo_grok_menubar (char *filename)
static void mo_try_to_grok_menubar (void)
{
char *filename = get_pref_string(eDOCUMENTS_MENU_SPECFILE);
-
+
if (filename && mo_file_exists (filename))
{
mo_grok_menubar (filename);
@@ -1948,7 +1948,7 @@ XmxMenuRecord *toBeReturned;
mo_try_to_grok_menubar ();
}
- toBeReturned = XmxRMakeMenubar(form,
+ toBeReturned = XmxRMakeMenubar(form,
get_pref_boolean(eSIMPLE_INTERFACE) ?
simple_menuspec : menuspec);
diff --git a/src/gui-menubar.h b/src/gui-menubar.h
index d092e1c..00856f8 100644
--- a/src/gui-menubar.h
+++ b/src/gui-menubar.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/gui-news.c b/src/gui-news.c
index d07cdf6..797a912 100644
--- a/src/gui-news.c
+++ b/src/gui-news.c
@@ -2,7 +2,7 @@
* NCSA Mosaic for the X Window System *
* Software Development Group *
* National Center for Supercomputing Applications *
- * University of Illinois at Urbana-Champaign *
+ * University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* mosaic@ncsa.uiuc.edu *
* *
@@ -76,7 +76,7 @@
#define MAX_BUF 512
-void gui_news_post_subgroupwin (mo_window *win)
+void gui_news_post_subgroupwin (mo_window *win)
{
Widget w, f, b, s;
XmString str;
@@ -184,7 +184,7 @@ void gui_news_showGroups (mo_window *win)
void gui_news_showReadGroups (mo_window *win)
{
- HTSetNewsConfig (-1,-1,0,1,-1,-1,-1,-1);
+ HTSetNewsConfig (-1,-1,0,1,-1,-1,-1,-1);
gui_news_updateprefs (win);
mo_load_window_text (win, "news:*", NULL);
}
@@ -193,14 +193,14 @@ void gui_news_showAllArticles (mo_window *win)
{
char buf[512+1];
- HTSetNewsConfig (-1,1,-1,-1,-1,-1,-1,-1);
+ HTSetNewsConfig (-1,1,-1,-1,-1,-1,-1,-1);
gui_news_updateprefs (win);
if (!NewsGroup && !NewsGroupS)
return;
if (NewsGroupS)
sprintf (buf, "news:%s", NewsGroupS->name);
- else
+ else
sprintf (buf, "news:%s", NewsGroup);
mo_load_window_text (win, buf, NULL);
}
@@ -209,14 +209,14 @@ void gui_news_showArticles (mo_window *win)
{
char buf[512+1];
- HTSetNewsConfig (-1,0,-1,-1,-1,-1,-1,-1);
+ HTSetNewsConfig (-1,0,-1,-1,-1,-1,-1,-1);
gui_news_updateprefs (win);
if (!NewsGroup && !NewsGroupS)
return;
if (NewsGroup)
sprintf (buf, "news:%s", NewsGroup);
- else
+ else
sprintf (buf, "news:%s", NewsGroupS->name);
mo_load_window_text (win, buf, NULL);
}
@@ -275,7 +275,7 @@ void gui_news_index(mo_window *win)
newsrc_flush ();
strcpy(url,win->current_node->url);
news_index(url);
- if(url[0])
+ if(url[0])
mo_load_window_text(win,url,NULL);
}
@@ -324,7 +324,7 @@ static XmxCallback (include_fsb_cb)
XtUnmanageChild (win->news_fsb_win);
fname = (char *)malloc (128 * sizeof (char));
-
+
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET,
&fname);
@@ -347,8 +347,8 @@ static XmxCallback (include_fsb_cb)
sprintf(final,"\nUnable to Open Include File:\n %s\n\nOpen Error:\n %s\n" ,(!efname || !*efname?" ":efname),buf);
- XmxMakeErrorDialog (win->news_win,
- final,
+ XmxMakeErrorDialog (win->news_win,
+ final,
"News Include Error" );
XtManageChild (Xmx_w);
@@ -358,14 +358,14 @@ static XmxCallback (include_fsb_cb)
}
return;
}
-
+
while (1)
{
long pos;
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
goto done;
-
+
XmTextInsert (win->news_text,
pos = XmTextGetInsertionPosition (win->news_text),
line);
@@ -431,7 +431,7 @@ static XmxCallback (news_win_cb)
break;
case 2: /* HELP */
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("help-on-news.html"),
NULL, NULL);
break;
@@ -445,13 +445,13 @@ static XmxCallback (news_win_cb)
} else {
XmFileSelectionDoSearch (win->news_fsb_win, NULL);
}
-
+
XmxManageRemanage (win->news_fsb_win);
-
+
break;
case 4: /* QUOTE */
break;
-
+
}
@@ -480,7 +480,7 @@ static XmxCallback (follow_win_cb)
if (msg[0] == '\0')
return;
- NNTPpost(from, subj, win->newsfollow_ref, group, msg);
+ NNTPpost(from, subj, win->newsfollow_ref, group, msg);
free(msg);
free(from);
@@ -489,12 +489,12 @@ static XmxCallback (follow_win_cb)
case 1: /* DISMISS */
- if(win->newsfollow_ref) free(win->newsfollow_ref);
- if(win->newsfollow_grp) free(win->newsfollow_grp);
- if(win->newsfollow_subj) free(win->newsfollow_subj);
- if(win->newsfollow_from) free(win->newsfollow_from);
- if(win->newsfollow_artid) free(win->newsfollow_artid);
-
+ if(win->newsfollow_ref) free(win->newsfollow_ref);
+ if(win->newsfollow_grp) free(win->newsfollow_grp);
+ if(win->newsfollow_subj) free(win->newsfollow_subj);
+ if(win->newsfollow_from) free(win->newsfollow_from);
+ if(win->newsfollow_artid) free(win->newsfollow_artid);
+
XtUnmanageChild (win->news_win);
/* since we're going to re-use this in different configs
we'll destroy it */
@@ -505,7 +505,7 @@ static XmxCallback (follow_win_cb)
break;
case 2: /* HELP */
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("help-on-news.html"),
NULL, NULL);
break;
@@ -519,9 +519,9 @@ static XmxCallback (follow_win_cb)
} else {
XmFileSelectionDoSearch (win->news_fsb_win, NULL);
}
-
+
XmxManageRemanage (win->news_fsb_win);
-
+
break;
case 4: /* QUOTE */
line = malloc(strlen(win->newsfollow_from)+30);
@@ -530,7 +530,7 @@ static XmxCallback (follow_win_cb)
XmTextInsert(win->news_text,
pos = XmTextGetInsertionPosition (win->news_text),
line);
- /* move insertion position to past this line to avoid
+ /* move insertion position to past this line to avoid
inserting the lines in reverse order */
XmTextSetInsertionPosition (win->news_text, pos+strlen(line));
@@ -539,7 +539,7 @@ static XmxCallback (follow_win_cb)
XmTextInsert(win->news_text,
pos = XmTextGetInsertionPosition (win->news_text),
line);
- /* move insertion position to past this line to avoid
+ /* move insertion position to past this line to avoid
inserting the lines in reverse order */
XmTextSetInsertionPosition (win->news_text, pos+strlen(line));
} while (line = NNTPgetquoteline(NULL));
@@ -553,7 +553,7 @@ static XmxCallback (follow_win_cb)
mo_status mo_post_news_win (mo_window *win)
{
- return mo_post_generic_news_win(win,0);
+ return mo_post_generic_news_win(win,0);
}
mo_status mo_post_follow_win (mo_window *win)
@@ -562,16 +562,16 @@ mo_status mo_post_follow_win (mo_window *win)
if(strncmp("news:",win->current_node->url,5))
return mo_fail; /* fix me */
-
- NNTPgetarthdrs(&(win->current_node->url)[5],
- &(win->newsfollow_ref),
- &(win->newsfollow_grp),
- &(win->newsfollow_subj),
+
+ NNTPgetarthdrs(&(win->current_node->url)[5],
+ &(win->newsfollow_ref),
+ &(win->newsfollow_grp),
+ &(win->newsfollow_subj),
&(win->newsfollow_from));
-
+
/* add a re: if needed*/
- if(strncmp("Re: ",win->newsfollow_subj,4) &&
+ if(strncmp("Re: ",win->newsfollow_subj,4) &&
strncmp("re: ",win->newsfollow_subj,4)){
s = malloc(strlen(win->newsfollow_subj)+5); /* this sucks -bjs*/
sprintf(s,"Re: %s",win->newsfollow_subj);
@@ -593,7 +593,7 @@ mo_status mo_post_follow_win (mo_window *win)
free(win->newsfollow_ref);
win->newsfollow_ref = s;
}
- return mo_post_generic_news_win(win,1);
+ return mo_post_generic_news_win(win,1);
}
mo_status mo_post_generic_news_win(mo_window *win, int follow)
@@ -605,25 +605,25 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
FILE *fp;
long pos;
- sprintf (namestr, "%s <%s>",
+ sprintf (namestr, "%s <%s>",
get_pref_string(eDEFAULT_AUTHOR_NAME),
get_pref_string(eDEFAULT_AUTHOR_EMAIL));
-
+
if (!win->news_win)
{
/* Create it for the first time. */
XmxSetUniqid (win->id);
Xmx_n = 0;
- win->news_win = XmxMakeFormDialog
+ win->news_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: News" );
dialog_frame = XmxMakeFrame (win->news_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
news_form = XmxMakeForm (dialog_frame);
@@ -651,7 +651,7 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
XmxSetArg (XmNcolumns, 65);
XmxSetArg (XmNeditable, False);
win->news_text_from = XmxMakeText (news_form);
-
+
XmxSetArg (XmNscrolledWindowMarginWidth, 10);
XmxSetArg (XmNscrolledWindowMarginHeight, 10);
XmxSetArg (XmNcursorPositionVisible, True);
@@ -659,21 +659,21 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
XmxSetArg (XmNeditMode, XmMULTI_LINE_EDIT);
XmxSetArg (XmNrows, 30);
XmxSetArg (XmNcolumns, 80);
- XmxSetArg (XmNwordWrap, True);
- XmxSetArg (XmNscrollHorizontal, False);
+ XmxSetArg (XmNwordWrap, True);
+ XmxSetArg (XmNscrollHorizontal, False);
win->news_text = XmxMakeScrolledText (news_form);
-
+
dialog_sep = XmxMakeHorizontalSeparator (news_form);
-
+
if(follow)
buttons_form = XmxMakeFormAndFiveButtons
- (news_form, follow_win_cb,
- "Post" , "Quote" , "Include File..." , "Dismiss" , "Help..." ,
+ (news_form, follow_win_cb,
+ "Post" , "Quote" , "Include File..." , "Dismiss" , "Help..." ,
0, 4, 3, 1, 2);
else
buttons_form = XmxMakeFormAndFourButtons
- (news_form, news_win_cb,
- "Post" , "Include File..." , "Dismiss" , "Help..." ,
+ (news_form, news_win_cb,
+ "Post" , "Include File..." , "Dismiss" , "Help..." ,
0, 3, 1, 2);
@@ -682,14 +682,14 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
XmxSetOffsets (yap_label, 10, 20, 0, 0);
XmxSetConstraints
- (yap_label,
+ (yap_label,
XmATTACH_FORM, XmATTACH_NONE ,XmATTACH_FORM, XmATTACH_FORM,
NULL, NULL, NULL, NULL);
XmxSetOffsets (win->news_text_from, 10, 10, 10, 10);
XmxSetConstraints
- (win->news_text_from,
+ (win->news_text_from,
XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
yap_label, NULL, f_label, NULL);
@@ -701,7 +701,7 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
XmxSetOffsets (win->news_text_subj, 10, 10, 10, 10);
XmxSetConstraints
- (win->news_text_subj,
+ (win->news_text_subj,
XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
win->news_text_from, NULL, s_label, NULL);
@@ -713,7 +713,7 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
XmxSetOffsets (win->news_text_group, 10, 10, 10, 10);
XmxSetConstraints
- (win->news_text_group,
+ (win->news_text_group,
XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
win->news_text_subj, NULL, g_label, NULL);
@@ -725,23 +725,23 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
XmxSetOffsets (XtParent (win->news_text), 10, 0, 3, 3);
XmxSetConstraints
- (XtParent (win->news_text),
+ (XtParent (win->news_text),
XmATTACH_WIDGET, XmATTACH_WIDGET,XmATTACH_FORM, XmATTACH_FORM,
win->news_text_group, dialog_sep, NULL, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep,
+ XmxSetConstraints
+ (dialog_sep,
XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
NULL, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form,
+ XmxSetConstraints
+ (buttons_form,
XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM, XmATTACH_FORM,
NULL, NULL, NULL, NULL);
XmxTextSetString (win->news_text, "");
-
+
/* tack signature on the end if it exists - code from Martin Hamilton */
if (get_pref_string(eSIGNATURE)) {
XmxTextSetString (win->news_text, "\n\n");
@@ -758,10 +758,10 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
} else {
XmxTextSetString (win->news_text, "");
}
-
+
}
XmTextSetInsertionPosition (win->news_text, 0);
-
+
if(follow){
XmxTextSetString (win->news_text_group, win->newsfollow_grp);
XmxTextSetString (win->news_text_subj, win->newsfollow_subj);
@@ -772,8 +772,8 @@ mo_status mo_post_generic_news_win(mo_window *win, int follow)
XmxTextSetString (win->news_text_from, namestr);
}
-
+
XmxManageRemanage (win->news_win);
-
+
return mo_succeed;
}
diff --git a/src/gui-news.h b/src/gui-news.h
index 78eaf22..c300ea8 100644
--- a/src/gui-news.h
+++ b/src/gui-news.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/gui-popup.c b/src/gui-popup.c
index 260af5b..e72608f 100644
--- a/src/gui-popup.c
+++ b/src/gui-popup.c
@@ -93,11 +93,11 @@ void ThirdButtonMenu(w, client_data, event, ctd)
if(hw == NULL)
return;
- eptr = LocateElement(hw, BuEvent->x, BuEvent->y,
+ eptr = LocateElement(hw, BuEvent->x, BuEvent->y,
&epos);
if(!popup)
- {
+ {
/* before we build the popup see if the user has a .mosiac/user-defs
file and if so use it to build a user menu */
popup_items[3].sub_items = popup_build_user_defs();
@@ -108,7 +108,7 @@ void ThirdButtonMenu(w, client_data, event, ctd)
if(popup_items[3].sub_items == NULL)
popup_items[3].types = 0;
- popup = _PopupMenuBuilder((Widget) w, XmMENU_POPUP,
+ popup = _PopupMenuBuilder((Widget) w, XmMENU_POPUP,
"popup", 0, popup_items);
}
@@ -116,7 +116,7 @@ void ThirdButtonMenu(w, client_data, event, ctd)
if(eptr)
{
- type = eptr->type;
+ type = eptr->type;
if((type == E_IMAGE) && (eptr->anchorHRef))
{ /* turn on anchor and off text */
type |= E_ANCHOR;
@@ -128,13 +128,13 @@ void ThirdButtonMenu(w, client_data, event, ctd)
}
else
type = E_HRULE; /* pick a good normal little element */
-
- for(i = 0; popup_items[i].class != LastItem; i++)
+
+ for(i = 0; popup_items[i].class != LastItem; i++)
{
if(popup_items[i]._w) /* anything is possible in Mosaic */
{
int good = True;
-
+
/* take care of session menu */
if(popup_items[i].acst.act_code == -2)
XtVaSetValues(popup_items[i]._w, XmNsubMenuId,
@@ -145,12 +145,12 @@ void ThirdButtonMenu(w, client_data, event, ctd)
good = good && (popup_items[i].types & type);
else
good = good && (popup_items[i].types == type);
-
+
if(popup_items[i].modes_method == LOOSE)
good = good && (popup_items[i].modes & mode);
else
good = good && (popup_items[i].modes == mode);
-
+
if(good)
{
if(popup_items[i].class == Separator)
@@ -182,7 +182,7 @@ void ThirdButtonMenu(w, client_data, event, ctd)
break;
}
}
- XtManageChild(popup_items[i]._w);
+ XtManageChild(popup_items[i]._w);
}
else
XtUnmanageChild(popup_items[i]._w);
@@ -192,7 +192,7 @@ void ThirdButtonMenu(w, client_data, event, ctd)
/* set all the widgets eptr data */
_set_eptr_field(popup_items, eptr);
- /* motif puts the menu in a boring place lets fix it */
+ /* motif puts the menu in a boring place lets fix it */
/* BuEvent->x_root -= 40; */ /* middle of buttons */
BuEvent->y_root -= del; /* first active button or first specialty
item if we're over element that has em */
@@ -209,14 +209,14 @@ PopupItem *popup_build_user_defs()
FILE *fp;
int num, i;
- if ((num=get_home(&str))!=0)
+ if ((num=get_home(&str))!=0)
{
return NULL;
}
-
+
file = malloc(sizeof(char) * (strlen(str)+strlen("/.mosaic/user-defs")+1)); // SAM
sprintf(file, "%s/.mosaic/user-defs", str); // SAM
-
+
free(str);
if(!file_exists(file))
@@ -245,7 +245,7 @@ PopupItem *popup_build_user_defs()
if(items)
return items;
- else
+ else
return NULL;
}
@@ -267,9 +267,9 @@ void mo_make_popup(Widget view)
{
have_popup = True; /* this will cause it to be created later */
popup = NULL;
-
+
XtInsertEventHandler(view, ButtonPressMask, False,
- (XtEventHandler)ThirdButtonMenu, NULL,
+ (XtEventHandler)ThirdButtonMenu, NULL,
XtListHead);
}
@@ -304,7 +304,7 @@ void mo_popup_set_something(char *what, int to, PopupItem *items)
XtSetSensitive(w, to);
}
-Widget _PopupMenuBuilder(Widget parent, int type, char *title,
+Widget _PopupMenuBuilder(Widget parent, int type, char *title,
char mnem, PopupItem *items)
{
Widget menu, cascade;
@@ -316,14 +316,14 @@ Widget _PopupMenuBuilder(Widget parent, int type, char *title,
menu = XmCreatePopupMenu(parent, title, NULL, 0);
}
else if(type == XmMENU_PULLDOWN)
- {
+ {
menu = XmCreatePulldownMenu(parent, title, NULL, 0);
str = XmStringCreateLtoR(title, XmSTRING_DEFAULT_CHARSET);
mapping_del = get_pref_int(ePOPUPCASCADEMAPPINGDELAY);
cascade = XtVaCreateManagedWidget(title, xmCascadeButtonGadgetClass,
parent, XmNsubMenuId, menu,
XmNlabelString, str,
- XmNmnemonic, mnem,
+ XmNmnemonic, mnem,
XmNmappingDelay, mapping_del, NULL);
XmStringFree(str);
}
@@ -336,54 +336,54 @@ Widget _PopupMenuBuilder(Widget parent, int type, char *title,
{
case PushButton:
{
- items[i]._w = XtVaCreateManagedWidget(items[i].label,
- xmPushButtonGadgetClass,
+ items[i]._w = XtVaCreateManagedWidget(items[i].label,
+ xmPushButtonGadgetClass,
menu, NULL);
if(items[i].mnemonic)
XtVaSetValues(items[i]._w, XmNmnemonic, items[i].mnemonic,
NULL);
if(items[i].accel)
{
- XtVaSetValues(items[i]._w,
- XmNaccelerator , items[i].accel,
+ XtVaSetValues(items[i]._w,
+ XmNaccelerator , items[i].accel,
NULL);
}
if(items[i].accel_text)
{
str = XmStringCreateLtoR(items[i].accel_text, XmSTRING_DEFAULT_CHARSET);
- XtVaSetValues(items[i]._w,
+ XtVaSetValues(items[i]._w,
XmNacceleratorText, str,
NULL);
XmStringFree(str);
}
if(items[i].cbfp)
- XtAddCallback(items[i]._w, XmNactivateCallback,
+ XtAddCallback(items[i]._w, XmNactivateCallback,
items[i].cbfp, &(items[i].acst));
-
+
XtSetSensitive(items[i]._w, items[i].startup);
if(items[i].acst.str && items[i].acst.act_code==69)
{
- XtAddCallback(items[i]._w,
- XmNarmCallback, rbm_ballonify,
+ XtAddCallback(items[i]._w,
+ XmNarmCallback, rbm_ballonify,
items[i].acst.str);
- XtAddCallback(items[i]._w,
+ XtAddCallback(items[i]._w,
XmNdisarmCallback, rbm_ballonify, NULL);
}
}
break;
case Separator:
{
- items[i]._w = XtVaCreateManagedWidget(items[i].label,
- xmSeparatorGadgetClass,
+ items[i]._w = XtVaCreateManagedWidget(items[i].label,
+ xmSeparatorGadgetClass,
menu, NULL);
}
break;
case ToggleButton:
{
- items[i]._w = XtVaCreateManagedWidget(items[i].label,
- xmToggleButtonGadgetClass,
+ items[i]._w = XtVaCreateManagedWidget(items[i].label,
+ xmToggleButtonGadgetClass,
menu, NULL);
}
break;
@@ -391,26 +391,26 @@ Widget _PopupMenuBuilder(Widget parent, int type, char *title,
{
if(items[i].sub_items && (items[i].acst.act_code != -2))
items[i]._w = _PopupMenuBuilder(menu, XmMENU_PULLDOWN,
- items[i].label,
+ items[i].label,
items[i].mnemonic,
items[i].sub_items);
else
{
int mapping_del;
-
+
if(get_pref_boolean(eSESSION_HISTORY_ON_RBM))
{
mapping_del = get_pref_int(ePOPUPCASCADEMAPPINGDELAY);
- items[i]._w = XtVaCreateManagedWidget("Session History",
+ items[i]._w = XtVaCreateManagedWidget("Session History",
xmCascadeButtonGadgetClass,
- menu, XmNsubMenuId,
+ menu, XmNsubMenuId,
current_win->session_menu,
XmNmappingDelay, mapping_del, NULL);
}
}
}
}
-
+
}
return type == XmMENU_POPUP ? menu : cascade;
}
@@ -459,7 +459,7 @@ int which;
return;
}
- xurl=mo_url_canonicalize(eptr->anchorHRef,
+ xurl=mo_url_canonicalize(eptr->anchorHRef,
strdup(current_win->current_node->url));
do_meta=2;
mo_load_window_text(current_win, xurl, NULL);
@@ -483,7 +483,7 @@ void image_cb(Widget w, XtPointer client_data, XtPointer call_data)
act_struct *acst = (act_struct *) client_data;
char *src, *xurl;
struct ele_rec *eptr;
- int which,tmp;
+ int which,tmp;
eptr = acst->eptr;
which = acst->act_code;
@@ -499,7 +499,7 @@ void image_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
case I_Save:
{
- /* FIXME: this should be
+ /* FIXME: this should be
fsb(eptr->edata); */
fsb(eptr->pic_data->src);
}
@@ -536,11 +536,11 @@ void fsb(char *src)
XmString str,fbfn;
char *fname, *tmpstr, fBuf[1024];
static char *last_src=NULL;
-
+
if ( !dialog ) {
last_src=strdup(src);
- dialog = XmCreateFileSelectionDialog (current_win->view,
- "Save Image File",
+ dialog = XmCreateFileSelectionDialog (current_win->view,
+ "Save Image File",
NULL, 0 );
XtAddCallback(dialog,
XmNcancelCallback,
@@ -553,7 +553,7 @@ void fsb(char *src)
XtSetSensitive(XmFileSelectionBoxGetChild(dialog, XmDIALOG_HELP_BUTTON),
False);
-
+
XtVaSetValues(dialog,
XmNfileTypeMask, XmFILE_REGULAR,
NULL);
@@ -582,11 +582,11 @@ void fsb(char *src)
XtVaGetValues(dialog,
XmNdirSpec, &str,
NULL);
-
+
XmStringGetLtoR(str,XmSTRING_DEFAULT_CHARSET,&fname);
XmStringFree(str);
- if (fname)
+ if (fname)
{
if(src && *src)
sprintf(fBuf,"%s%s",fname,getFileName(src));
@@ -594,15 +594,15 @@ void fsb(char *src)
sprintf(fBuf,"%s",fname);
str=XmStringCreateLtoR(fBuf,XmSTRING_DEFAULT_CHARSET);
-
+
XtVaSetValues(dialog,
XmNdirSpec, str,
NULL);
-
+
XmStringFree(str);
free(fname);
}
-
+
XtManageChild ( dialog );
}
@@ -610,16 +610,16 @@ void fsb(char *src)
void fsb_OKCallback (
Widget w, XtPointer client_data, XtPointer call_data)
{
- XmFileSelectionBoxCallbackStruct *cbs =
+ XmFileSelectionBoxCallbackStruct *cbs =
(XmFileSelectionBoxCallbackStruct *) call_data;
char *filename, *url = (char *) client_data, efilename[MO_LINE_LENGTH];
-
+
/* Remove the widget from the screen, and kill it. */
XtUnmanageChild ( w );
-
+
/* Retrieve the character string from the compound string format. */
-
+
XmStringGetLtoR ( cbs->value, XmSTRING_DEFAULT_CHARSET, &filename );
/* Expand any ~ */
@@ -647,7 +647,7 @@ void fsb_OKCallback (
mo_gui_notify_progress("Image has been downloaded and saved.");
}
-
+
void fsb_CancelCallback (
Widget w,
XtPointer clientData,
@@ -671,7 +671,7 @@ void hot_cb(Widget w, XtPointer client_data, XtPointer call_data)
char *xurl;
int i;
mo_hot_item *hn = (mo_hot_item *) acst->str;
-
+
switch(acst->act_code) {
case 1: /* add item */
mo_add_item_to_hotlist (acst->str, mo_t_url,
@@ -687,13 +687,13 @@ void hot_cb(Widget w, XtPointer client_data, XtPointer call_data)
mo_add_item_to_hotlist (acst->str, mo_t_list, xurl, NULL, 0,
get_pref_boolean(eADD_RBM_ADDS_RBM));
}
-
+
break;
default: /* goto link */
if(acst->str) {
xurl=mo_url_prepend_protocol(acst->str);
- mo_load_window_text (current_win, xurl, NULL);
+ mo_load_window_text (current_win, xurl, NULL);
}
break;
}
@@ -705,15 +705,15 @@ void mo_destroy_hot_menu(PopupItem *pmenu)
for(i=0;pmenu[i].class != LastItem;i++) {
if((pmenu[i].class != Separator) &&
(pmenu[i].acst.act_code != 1) &&
- (pmenu[i].acst.act_code != 2))
+ (pmenu[i].acst.act_code != 2))
free(pmenu[i].label);
-
+
if(pmenu[i].class == CascadeButton)
mo_destroy_hot_menu(pmenu[i].sub_items);
}
free(pmenu);
}
-
+
PopupItem *mo_assemble_hot_menu(mo_hotlist *list)
{
mo_hot_item *item;
@@ -743,7 +743,7 @@ PopupItem *mo_assemble_hot_menu(mo_hotlist *list)
pmenu[i].label = strdup(str);
if(item->type == mo_t_url){
pmenu[i].acst.str = item->hot.url;
- pmenu[i].acst.act_code = 69; /* identifies this as a hotlist
+ pmenu[i].acst.act_code = 69; /* identifies this as a hotlist
button so we can ballon it */
}
pmenu[i].cbfp = hot_cb;
@@ -766,7 +766,7 @@ PopupItem *mo_assemble_hot_menu(mo_hotlist *list)
pmenu[i].sub_items = NULL;
pmenu[i].label = strdup("Sep");
i++;
-
+
pmenu[i].class = PushButton;
pmenu[i].label = "Add current URL...";
pmenu[i].types = 0;
@@ -796,7 +796,7 @@ PopupItem *mo_assemble_hot_menu(mo_hotlist *list)
pmenu[i].startup=1;
pmenu[i].sub_items = NULL;
i++;
-
+
pmenu[i].class = LastItem;
return pmenu;
}
@@ -807,9 +807,9 @@ void mo_init_hotlist_menu(mo_hotlist *list)
{
/* this doesn't check the first button but that is okay because
the first two buttons are always back and forward */
- while(popup_items[hot_button].acst.act_code != -1)
+ while(popup_items[hot_button].acst.act_code != -1)
hot_button++;
-
+
popup_items[hot_button].sub_items = mo_assemble_hot_menu(list);
/* popup_items[hot_button].class = CascadeButton; not necassary */
}
@@ -817,9 +817,9 @@ void mo_init_hotlist_menu(mo_hotlist *list)
void mo_reinit_hotlist_menu(mo_hotlist *list)
{
short pos;
-
+
if(!popup) return;
-
+
mo_destroy_hot_menu(popup_items[hot_button].sub_items);
popup_items[hot_button].sub_items = mo_assemble_hot_menu(list);
@@ -827,15 +827,15 @@ void mo_reinit_hotlist_menu(mo_hotlist *list)
/*
XtVaGetValues(popup_items[hot_button]._w,XmNpositionIndex, &pos, NULL);
*/
-
+
XtDestroyWidget(popup);
-
- popup = _PopupMenuBuilder(current_win->view, XmMENU_POPUP,
+
+ popup = _PopupMenuBuilder(current_win->view, XmMENU_POPUP,
"popup", 0, popup_items);
-
+
/* popup_items[hot_button]._w =
_PopupMenuBuilder(popup, XmMENU_PULLDOWN,
- popup_items[hot_button].label,
+ popup_items[hot_button].label,
popup_items[hot_button].mnemonic,
popup_items[hot_button].sub_items);*/
@@ -886,7 +886,7 @@ char **user_defs_get_entries(FILE *fp, int *num)
else
{
entries[i]=strdup(&(str[index]));
- entries[i]=my_chop(entries[i]);
+ entries[i]=my_chop(entries[i]);
i++;
}
}
@@ -910,7 +910,7 @@ PopupItem *build_user_defs_items(char **entries, int num)
if(!items || !entries || num<=0)
return NULL;
-
+
for(i=0;istr is the url */
XmPushButtonCallbackStruct *cbs = (XmPushButtonCallbackStruct *) call_data;
char *str = acst->str;
-
+
if(!str)
return;
- XtGetSelectionValue(current_win->scrolled_win, XA_PRIMARY, XA_STRING,
+ XtGetSelectionValue(current_win->scrolled_win, XA_PRIMARY, XA_STRING,
select_cb, str, cbs->event->xbutton.time);
}
@@ -1089,12 +1089,12 @@ void copy_link_cb(Widget w, XtPointer client_data, XtPointer call_data)
url = mo_url_canonicalize(acst->eptr->anchorHRef, strdup(current_win->current_node->url));
- if(XtOwnSelection((Widget) current_win->scrolled_win, XA_PRIMARY,
+ if(XtOwnSelection((Widget) current_win->scrolled_win, XA_PRIMARY,
cbs->event->xbutton.time, convert_selection,
- NULL, NULL) == False)
+ NULL, NULL) == False)
{
fprintf(stderr, "Mosaic: Error: Could not copy selection, try again.\n");
- if (url)
+ if (url)
{
free(url);
}
@@ -1102,12 +1102,12 @@ void copy_link_cb(Widget w, XtPointer client_data, XtPointer call_data)
else
{
int i;
-
+
for(i=0;popup_items[i].class!=LastItem; i++)
{
if(!strcmp(popup_items[i].label, COPY_URL_LABEL) && url)
{
- char *copy_str = malloc((strlen(url) +
+ char *copy_str = malloc((strlen(url) +
strlen("URL: has been copied ")) * sizeof(char));
if(popup_items[i].acst.str)
free(popup_items[i].acst.str);
@@ -1129,7 +1129,7 @@ void copy_link_cb(Widget w, XtPointer client_data, XtPointer call_data)
}
static Boolean convert_selection(Widget w, Atom *sel, Atom *tar, Atom *typ_ret,
- XtPointer *val_ret, unsigned long *val_len,
+ XtPointer *val_ret, unsigned long *val_len,
int *format)
{
char *url;
@@ -1138,7 +1138,7 @@ static Boolean convert_selection(Widget w, Atom *sel, Atom *tar, Atom *typ_ret,
if(*tar == XA_STRING)
{
#ifndef DISABLE_TRACE
- if (srcTrace)
+ if (srcTrace)
{
fprintf (stderr, "Pasting text selection.\n");
}
@@ -1174,24 +1174,24 @@ void mo_add_to_rbm_history(mo_window *win, char *url, char *title)
if(!get_pref_boolean(eSESSION_HISTORY_ON_RBM))
return;
else if(!win->session_menu)
- win->session_menu = XmCreatePulldownMenu(win->view, "session_menu",
+ win->session_menu = XmCreatePulldownMenu(win->view, "session_menu",
NULL, 0);
compact_string(title, label, 31, 3, 3);
if(win->num_session_items < max)
{
- win->session_items[win->num_session_items] =
- XtVaCreateManagedWidget(label, xmPushButtonGadgetClass,
+ win->session_items[win->num_session_items] =
+ XtVaCreateManagedWidget(label, xmPushButtonGadgetClass,
win->session_menu,NULL);
- XtAddCallback(win->session_items[win->num_session_items],
+ XtAddCallback(win->session_items[win->num_session_items],
XmNactivateCallback, session_cb, url);
- XtAddCallback(win->session_items[win->num_session_items],
+ XtAddCallback(win->session_items[win->num_session_items],
XmNarmCallback, rbm_ballonify, url);
- XtAddCallback(win->session_items[win->num_session_items],
+ XtAddCallback(win->session_items[win->num_session_items],
XmNdisarmCallback, rbm_ballonify, " ");
- win->num_session_items++;
+ win->num_session_items++;
}
else if (win && win->session_items)
{
@@ -1201,14 +1201,14 @@ void mo_add_to_rbm_history(mo_window *win, char *url, char *title)
for(i=0;isession_items[i] = win->session_items[i+1];
- win->session_items[max-1] =
+ win->session_items[max-1] =
XtVaCreateManagedWidget(label, xmPushButtonGadgetClass,
win->session_menu, NULL);
- XtAddCallback(win->session_items[max-1],
+ XtAddCallback(win->session_items[max-1],
XmNactivateCallback, session_cb, url);
- XtAddCallback(win->session_items[max-1],
+ XtAddCallback(win->session_items[max-1],
XmNarmCallback, rbm_ballonify, url);
- XtAddCallback(win->session_items[max-1],
+ XtAddCallback(win->session_items[max-1],
XmNdisarmCallback, rbm_ballonify, " ");
}
}
@@ -1217,7 +1217,7 @@ void session_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
char *xurl = (char *) client_data;
- mo_load_window_text (current_win, xurl, NULL);
+ mo_load_window_text (current_win, xurl, NULL);
}
diff --git a/src/gui-popup.h b/src/gui-popup.h
index ead4488..ded3e90 100644
--- a/src/gui-popup.h
+++ b/src/gui-popup.h
@@ -81,7 +81,7 @@ typedef enum _w_class { LastItem=1, PushButton, Separator, CascadeButton,
enum { I_Save, I_ViewExternal, I_ViewInternal, I_Reload,
M_ImageData, M_LinkData, M_FileData };
-typedef struct act_struct
+typedef struct act_struct
{
int act_code;
struct ele_rec *eptr;
@@ -93,7 +93,7 @@ typedef struct PopupItem
/* the top half must be filled in if this is to appear in the popup */
w_class class; /* this is a button, separator, label, cascade */
- unsigned long int types; /* for which widget elements this button is to
+ unsigned long int types; /* for which widget elements this button is to
popup for (the list of elements is below) */
int types_method; /* if TIGHT use == if LOOSE use & */
@@ -116,14 +116,14 @@ typedef struct PopupItem
/* this is needed for a cascade class */
- struct PopupItem *sub_items; /* NULL if this isn't a
+ struct PopupItem *sub_items; /* NULL if this isn't a
pull_right */
/* this is for internal uses */
Widget _w;
int startup; /* are we sensitive when we start */
-
+
} PopupItem;
XmxCallbackPrototype (menubar_cb);
@@ -139,14 +139,14 @@ XmxCallbackPrototype (rbm_ballonify);
void fsb();
void ThirdButtonMenu();
char *getFileName(char *file_src);
-Widget _PopupMenuBuilder(Widget parent, int type, char *title,
+Widget _PopupMenuBuilder(Widget parent, int type, char *title,
char mnem, PopupItem *items);
extern struct ele_rec *LocateElement();
void _set_eptr_field();
void mo_popup_set_something();
PopupItem *popup_build_user_defs();
PopupItem *build_user_defs_items();
-char **user_defs_get_entries();
+char **user_defs_get_entries();
extern mo_window *current_win;
extern int file_exists();
extern char *my_chop();
@@ -161,22 +161,22 @@ void mo_add_to_rbm_history(mo_window *win, char *url, char *title);
static Boolean convert_selection(Widget, Atom *, Atom *, Atom *, XtPointer *,
unsigned long *, int *);
-#ifdef GUI_POPUP_H /* this is set in gui-popup.c -- it prevents multiple
+#ifdef GUI_POPUP_H /* this is set in gui-popup.c -- it prevents multiple
instances of the following variables */
Boolean have_popup;
Widget popup = NULL;
PopupItem image_menu[] = {
- {PushButton, 0, 0, 0, 0, "Save", {I_Save, NULL, NULL}, image_cb, 0, NULL,
+ {PushButton, 0, 0, 0, 0, "Save", {I_Save, NULL, NULL}, image_cb, 0, NULL,
NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "Reload", {I_Reload, NULL, NULL}, image_cb, 0,
+ {PushButton, 0, 0, 0, 0, "Reload", {I_Reload, NULL, NULL}, image_cb, 0,
NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "View External", {I_ViewExternal, NULL, NULL},
+ {PushButton, 0, 0, 0, 0, "View External", {I_ViewExternal, NULL, NULL},
image_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "View Internal", {I_ViewInternal, NULL, NULL},
+ {PushButton, 0, 0, 0, 0, "View Internal", {I_ViewInternal, NULL, NULL},
image_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "Get Image Metadata", {M_ImageData, NULL, NULL},
+ {PushButton, 0, 0, 0, 0, "Get Image Metadata", {M_ImageData, NULL, NULL},
metadata_cb, 0, NULL, NULL, NULL, NULL, 1},
/*
{LastItem, 0, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL}
@@ -188,7 +188,7 @@ PopupItem pan_menu[] = {
{PushButton, 0, 0, 0, 0, "Right", {0, NULL, NULL}, NULL, 0,
NULL, NULL, NULL, NULL, 1},
{PushButton, 0, 0, 0, 0, "Up", {0, NULL, NULL}, NULL,
- 0, NULL, NULL, NULL, NULL, 1},
+ 0, NULL, NULL, NULL, NULL, 1},
{PushButton, 0, 0, 0, 0, "Left", {0, NULL, NULL}, NULL, 0,
NULL, NULL, NULL, NULL, 1},
{PushButton, 0, 0, 0, 0, "Down", {0, NULL, NULL}, NULL,
@@ -201,30 +201,30 @@ PopupItem pan_menu[] = {
PopupItem photo_cd_sub_menu[] = {
{PushButton, 0, 0, 0, 0,"Zoom In", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0,"Zoom Out", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {PushButton, 0, 0, 0, 0,"Zoom Out", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
{PushButton, 0, 0, 0, 0, "Zoom Crop", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "Crop", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {PushButton, 0, 0, 0, 0, "Crop", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
{Separator, 0, 0, 0, 0, "Sep", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
{PushButton, 0, 0,0, 0, "Enlarge", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "Reduce", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {PushButton, 0, 0, 0, 0, "Reduce", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
{Separator, 0, 0, 0, 0, "Sep", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL, NULL, 1},
{PushButton, 0, 0,0, 0, "Undo", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
{Separator, 0, 0, 0, 0, "Sep", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "Rotate Clockwise", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL,
+ {PushButton, 0, 0, 0, 0, "Rotate Clockwise", {0, NULL, NULL} , NULL, 0, NULL, NULL, NULL,
NULL, 1},
{PushButton, 0, 0, 0, 0, "Rotate Counter-Clockwise", {0, NULL, NULL}, NULL,
- 0, NULL, NULL, NULL, NULL, 1},
- {CascadeButton, 0, 0,0, 0, "Pan", {0, NULL, NULL}, NULL, 0, NULL, NULL, pan_menu, NULL, 1},
+ 0, NULL, NULL, NULL, NULL, 1},
+ {CascadeButton, 0, 0,0, 0, "Pan", {0, NULL, NULL}, NULL, 0, NULL, NULL, pan_menu, NULL, 1},
{Separator, 0, 0,0, 0, "Sep", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "Full Image", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, 0, 0,0, 0,"Reset To Original", {0, NULL, NULL}, NULL, 0, NULL, NULL,
- NULL, NULL, 1},
+ {PushButton, 0, 0, 0, 0, "Full Image", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {PushButton, 0, 0,0, 0,"Reset To Original", {0, NULL, NULL}, NULL, 0, NULL, NULL,
+ NULL, NULL, 1},
{Separator, 0, 0,0, 0, "Separator", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL},
- {PushButton, 0, 0,0, 0,"Print This Image", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL,
+ {PushButton, 0, 0,0, 0,"Print This Image", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL,
NULL, 1},
- {ToggleButton, 0, 0,0, 0, "Display PhotoCD Icon", {0, NULL, NULL}, NULL, 0, NULL, NULL,
- NULL, NULL, 1},
- {PushButton, 0, 0, 0, 0, "Options", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {ToggleButton, 0, 0,0, 0, "Display PhotoCD Icon", {0, NULL, NULL}, NULL, 0, NULL, NULL,
+ NULL, NULL, 1},
+ {PushButton, 0, 0, 0, 0, "Options", {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
/*
{LastItem, 0, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL}
*/
@@ -254,23 +254,23 @@ PopupItem popup_items[] = {
Permanent stuff
---------------------------------------------------------------*/
- {PushButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE,"Back",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE,"Back",
{mo_back, NULL, NULL},
menubar_cb, 0, "B", NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "Forward",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "Forward",
{mo_forward, NULL, NULL},
- menubar_cb, 0, "F", NULL, NULL, NULL, 1},
+ menubar_cb, 0, "F", NULL, NULL, NULL, 1},
/* negative one means this is a hotlist */
- {CascadeButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "Hotlist",
- {-1, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {CascadeButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "Hotlist",
+ {-1, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
- {CascadeButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "User",
- {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {CascadeButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "User",
+ {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
- {CascadeButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "Session History",
- {-2, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {CascadeButton, ALL_TYPES, LOOSE, moMODE_ALL, LOOSE, "Session History",
+ {-2, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
/*---------------------------------------------------------------
Stuff if on a html page and not on a image or anchor
@@ -278,9 +278,9 @@ PopupItem popup_items[] = {
{Separator, (E_TEXT | E_BULLET | E_LINEFEED | E_WIDGET | E_HRULE |E_TABLE),
LOOSE, moMODE_ALL, LOOSE, "Separator", {0, NULL, NULL},
- NULL, 0, NULL, NULL, NULL, NULL, 1},
+ NULL, 0, NULL, NULL, NULL, NULL, 1},
- {CascadeButton, (E_TEXT | E_BULLET | E_LINEFEED | E_WIDGET | E_HRULE |
+ {CascadeButton, (E_TEXT | E_BULLET | E_LINEFEED | E_WIDGET | E_HRULE |
E_TABLE),LOOSE, moMODE_ALL, LOOSE, "File",
{0, NULL, NULL}, NULL, 0, NULL, NULL, file_menu, NULL, 1},
@@ -288,139 +288,139 @@ PopupItem popup_items[] = {
Stuff if on any page and an anchor (including image anchor)
---------------------------------------------------------------*/
- {Separator, E_ANCHOR | E_IMAGE, LOOSE, moMODE_ALL, LOOSE, "Separator",
+ {Separator, E_ANCHOR | E_IMAGE, LOOSE, moMODE_ALL, LOOSE, "Separator",
{0, NULL, NULL},
- NULL, 0, NULL, NULL, NULL, NULL, 1},
+ NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_ANCHOR | E_IMAGE, LOOSE, moMODE_ALL, LOOSE, COPY_URL_LABEL,
+ {PushButton, E_ANCHOR | E_IMAGE, LOOSE, moMODE_ALL, LOOSE, COPY_URL_LABEL,
{0, NULL, NULL}, copy_link_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_ANCHOR | E_IMAGE, LOOSE, moMODE_ALL, LOOSE, "Get Link Metadata",
+ {PushButton, E_ANCHOR | E_IMAGE, LOOSE, moMODE_ALL, LOOSE, "Get Link Metadata",
{M_LinkData, NULL, NULL}, metadata_cb, 0, NULL, NULL, NULL, NULL, 1},
/*---------------------------------------------------------------
Stuff if on any page and a image (not including image link)
---------------------------------------------------------------*/
- {Separator, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Separator",
- {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
+ {Separator, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Separator",
+ {0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Save",
+ {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Save",
{I_Save, NULL, NULL}, image_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Reload",
+ {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Reload",
{I_Reload, NULL, NULL},
image_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "View External",
+ {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "View External",
{I_ViewExternal, NULL, NULL}, image_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "View Internal",
+ {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "View Internal",
{I_ViewInternal, NULL, NULL}, image_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Get Image Metadata",
+ {PushButton, E_IMAGE, TIGHT, moMODE_ALL, LOOSE, "Get Image Metadata",
{M_ImageData, NULL, NULL}, metadata_cb, 0, NULL, NULL, NULL, NULL, 1},
/*---------------------------------------------------------------
Stuff if on any page and a image link
---------------------------------------------------------------*/
- {Separator, E_IMAGE | E_ANCHOR, TIGHT, moMODE_PLAIN, LOOSE, "Separator",
+ {Separator, E_IMAGE | E_ANCHOR, TIGHT, moMODE_PLAIN, LOOSE, "Separator",
{0, NULL, NULL},
- NULL, 0, NULL, NULL, NULL, NULL, 1},
+ NULL, 0, NULL, NULL, NULL, NULL, 1},
- {CascadeButton, E_IMAGE | E_ANCHOR, TIGHT, moMODE_PLAIN, LOOSE, "Image",
- {0, NULL, NULL},
+ {CascadeButton, E_IMAGE | E_ANCHOR, TIGHT, moMODE_PLAIN, LOOSE, "Image",
+ {0, NULL, NULL},
NULL, 0, NULL, NULL, image_menu, NULL, 1},
/*---------------------------------------------------------------
- Stuff if on a ftp page
+ Stuff if on a ftp page
---------------------------------------------------------------*/
- {Separator, ALL_TYPES, LOOSE, moMODE_FTP, TIGHT, "Separator",
+ {Separator, ALL_TYPES, LOOSE, moMODE_FTP, TIGHT, "Separator",
{0, NULL, NULL},
- NULL, 0, NULL, NULL, NULL, NULL, 1},
+ NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_FTP, TIGHT, "Put ...",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_FTP, TIGHT, "Put ...",
{mo_ftp_put, NULL, NULL},
ftp_rmbm_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_FTP, TIGHT, "Make Directory",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_FTP, TIGHT, "Make Directory",
{mo_ftp_mkdir, NULL, NULL}, ftp_rmbm_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_ANCHOR, TIGHT, moMODE_FTP, TIGHT, "Remove",
+ {PushButton, E_ANCHOR, TIGHT, moMODE_FTP, TIGHT, "Remove",
{mo_ftp_remove, NULL, NULL}, ftp_rmbm_cb, 0, NULL, NULL, NULL, NULL, 1},
/*---------------------------------------------------------------
Stuff if on a news page and not a link
---------------------------------------------------------------*/
- {Separator, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Separator",
+ {Separator, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Separator",
{0, NULL, NULL},
- NULL, 0, NULL, NULL, NULL, NULL, 1},
+ NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Next Article",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Next Article",
{mo_news_next, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Previous Article",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Previous Article",
{mo_news_prev, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Next Thread",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Next Thread",
{mo_news_nextt, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Previous Thread",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Previous Thread",
{mo_news_prevt, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Article Index",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Article Index",
{mo_news_index, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Group Index",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Group Index",
{mo_news_groups, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
-
- {Separator, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, NULL,
+
+ {Separator, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, NULL,
{0, NULL, NULL},
NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Post",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Post",
{mo_news_post, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Followup",
+ {PushButton, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, "Followup",
{mo_news_follow, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
-
- {Separator, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, NULL,
+
+ {Separator, ALL_TYPES, LOOSE, moMODE_NEWS, TIGHT, NULL,
{0, NULL, NULL},
NULL, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, NEWS_NOANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Subscribe",
+ {PushButton, NEWS_NOANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Subscribe",
{mo_news_sub, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, NEWS_NOANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Unsubscribe",
+ {PushButton, NEWS_NOANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Unsubscribe",
{mo_news_unsub, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_ANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Subscribe",
+ {PushButton, E_ANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Subscribe",
{mo_news_sub_anchor, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_ANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Unsubscribe",
+ {PushButton, E_ANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Unsubscribe",
{mo_news_unsub_anchor, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, NEWS_NOANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Mark Group Read",
+ {PushButton, NEWS_NOANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Mark Group Read",
{mo_news_mread, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
- {PushButton, E_ANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Mark Group Read",
+ {PushButton, E_ANCHOR, LOOSE, moMODE_NEWS, TIGHT, "Mark Group Read",
{mo_news_mread_anchor, NULL, NULL},
menubar_cb, 0, NULL, NULL, NULL, NULL, 1},
diff --git a/src/gui.c b/src/gui.c
index f31ff4e..163f81c 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -315,7 +315,7 @@ static void BalloonHelpMe(Widget w, XEvent *event)
{
char *info;
- XtVaGetValues(w, XmNuserData, (XtPointer) &info, NULL);
+ XtVaGetValues(w, XmNuserData, (XtPointer) &info, NULL);
mo_gui_notify_progress(info);
}
@@ -331,7 +331,7 @@ static XtActionsRec balloon_action[] = {
{"UnBalloonHelpMe", (XtActionProc)UnBalloonHelpMe}
};
-/* to use balloon help, add these bits to your widget ... BJS 2/7/96
+/* to use balloon help, add these bits to your widget ... BJS 2/7/96
* XmNtranslations, XtParseTranslationTable(xlattab),
* XmNuserData, (xtpointer) "Balloon Help String!",
*/
@@ -465,7 +465,7 @@ extern Pixmap securityKerberos4, securityBasic, securityMd5, securityNone,
extern char *HTDescribeURL (char *);
extern mo_status mo_post_access_document (mo_window *win, char *url,
- char *content_type,
+ char *content_type,
char *post_data);
XmxCallbackPrototype (menubar_cb);
@@ -565,7 +565,7 @@ mo_status mo_remove_window_from_list (mo_window *win)
}
prev = w;
}
-
+
/* Couldn't find it. */
return mo_fail;
}
@@ -578,9 +578,9 @@ mo_status mo_remove_window_from_list (mo_window *win)
* name: mo_check_for_proxy
* purpose: Return the location of the proxy gateway for the passed access
* method.
- * inputs:
+ * inputs:
* - char *access: access string from the URL (http, gopher, ftp, etc)
- * returns:
+ * returns:
* The proxy gateway to use. (http://proxy.ncsa.uiuc.edu:911/)
* remarks: This should really be open-ended configurable.
****************************************************************************/
@@ -628,11 +628,11 @@ char *mo_check_for_proxy (char *access)
/****************************************************************************
* name: mo_assemble_help_url
* purpose: Make a temporary, unique filename.
- * inputs:
+ * inputs:
* - char *file: Filename to be appended to Rdata.docs_directory.
- * returns:
+ * returns:
* The desired help url (a malloc'd string).
- * remarks:
+ * remarks:
****************************************************************************/
char *mo_assemble_help_url (char *file)
{
@@ -655,7 +655,7 @@ char *mo_assemble_help_url (char *file)
/* No trailing slash. */
sprintf (tmp, "%s/%s", docs_directory, file);
}
-
+
return tmp;
}
@@ -674,7 +674,7 @@ mo_status mo_not_busy (void)
void stopBusyAnimation() {
mo_window *win = NULL;
-
+
if (busy) {
XUndefineCursor (dsp, XtWindow (toplevel));
while (win = mo_next_window (win)) {
@@ -686,7 +686,7 @@ mo_window *win = NULL;
if (win->searchindex_win)
XUndefineCursor (dsp, XtWindow (win->searchindex_win));
}
-
+
XFlush (dsp);
busy = 0;
}
@@ -878,7 +878,7 @@ mo_status mo_busy (void) {
if (!busy) {
}
*/
-
+
return mo_succeed;
}
@@ -892,7 +892,7 @@ mo_status mo_set_dtm_menubar_functions (mo_window *win)
{
/* If we've got an active outport, then we can send a document
but not open another outport. */
- XmxRSetSensitive
+ XmxRSetSensitive
(win->menubar, mo_dtm_open_outport, XmxNotSensitive);
XmxRSetSensitive
(win->menubar, mo_dtm_send_document, XmxSensitive);
@@ -901,7 +901,7 @@ mo_status mo_set_dtm_menubar_functions (mo_window *win)
{
/* If we don't have an active outport, then we can't send a document
but we can open an outport. */
- XmxRSetSensitive
+ XmxRSetSensitive
(win->menubar, mo_dtm_open_outport, XmxSensitive);
XmxRSetSensitive
(win->menubar, mo_dtm_send_document, XmxNotSensitive);
@@ -916,12 +916,12 @@ mo_status mo_set_dtm_menubar_functions (mo_window *win)
* name: mo_redisplay_window
* purpose: Cause the current window's HTML widget to be refreshed.
* This causes the anchors to be reexamined for visited status.
- * inputs:
+ * inputs:
* - mo_window *win: Current window.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_status mo_redisplay_window (mo_window *win)
{
@@ -1016,7 +1016,7 @@ static XmxCallback (url_field_cb)
if(!get_pref_boolean(eFOCUS_FOLLOWS_MOUSE))
XtSetKeyboardFocus(win->base, win->view);
-
+
if (cci_event) MoCCISendEventOutput(MOSAIC_URL_TEXT_FIELD);
url = XmxTextGetString (win->url_text);
@@ -1035,18 +1035,18 @@ static XmxCallback (url_field_cb)
}
if (cci_event) MoCCISendEventOutput(LINK_LOADED);
-
+
return;
}
/****************************************************************************
* name: anchor_cb
* purpose: Callback for triggering anchor in HTML widget.
- * inputs:
+ * inputs:
* - as per XmxCallback
- * returns:
+ * returns:
* nothing
- * remarks:
+ * remarks:
* This is too complex and should be broken down.
* We look at the button event passed in through the callback;
* button1 == same window, button2 == new window.
@@ -1059,7 +1059,7 @@ static XmxCallback (anchor_cb)
/* char *access;*/
static char *referer = NULL;
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
- XButtonReleasedEvent *event =
+ XButtonReleasedEvent *event =
(XButtonReleasedEvent *)(((WbAnchorCallbackData *)call_data)->event);
int force_newwin = (event->button == Button2 ? 1 : 0);
int old_binx_flag;
@@ -1074,9 +1074,9 @@ static XmxCallback (anchor_cb)
if ( (event->state & ShiftMask) == ShiftMask)
win->binary_transfer = 1;
- if (get_pref_boolean(eKIOSK) ||
- get_pref_boolean(eKIOSKNOEXIT) ||
- get_pref_boolean(eDISABLEMIDDLEBUTTON)) {
+ if (get_pref_boolean(eKIOSK) ||
+ get_pref_boolean(eKIOSKNOEXIT) ||
+ get_pref_boolean(eDISABLEMIDDLEBUTTON)) {
/* disable new window if in kiosk mode*/
force_newwin = 0;
/* disable load to disk in kiosk */
@@ -1085,7 +1085,7 @@ static XmxCallback (anchor_cb)
if (get_pref_boolean(ePROTECT_ME_FROM_MYSELF))
{
- int answer = XmxModalYesOrNo
+ int answer = XmxModalYesOrNo
(win->base, app_context,
"BEWARE: Despite our best and most strenuous intentions to the contrary,\nabsolutely anything could be on the other end of this hyperlink,\nincluding -- quite possibly -- pornography, or even nudity.\n\nNCSA disclaims all responsibility regarding your emotional and mental health\nand specifically all responsibility for effects of viewing salacious material via Mosaic.\n\nWith that in mind, are you *sure* you want to follow this hyperlink???" , "Yup, I'm sure, really." ,
"Ack, no! Get me outta here." );
@@ -1109,7 +1109,7 @@ static XmxCallback (anchor_cb)
}
else
HTReferer = NULL;
-
+
if (((WbAnchorCallbackData *)call_data)->href)
href = strdup (((WbAnchorCallbackData *)call_data)->href);
else
@@ -1126,7 +1126,7 @@ static XmxCallback (anchor_cb)
else
{
char *target = mo_url_extract_anchor (href);
- char *url =
+ char *url =
mo_url_canonicalize_keep_anchor (href, win->current_node->url);
/* @@@ should we be keeping the anchor here??? */
if (strncmp (url, "telnet:", 7) && strncmp (url, "tn3270:", 7) &&
@@ -1157,12 +1157,12 @@ static XmxCallback (anchor_cb)
* name: anchor_visited_predicate (PRIVATE)
* purpose: Called by the HTML widget to determine whether a given URL
* has been previously visited.
- * inputs:
+ * inputs:
* - Widget w: HTML widget that called this routine.
* - char *href: URL to test.
- * returns:
+ * returns:
* 1 if href has been visited previously; 0 otherwise.
- * remarks:
+ * remarks:
* All this does is canonicalize the URL and call
* mo_been_here_before_huh_dad() to figure out if we've been
* there before.
@@ -1192,13 +1192,13 @@ static void pointer_motion_callback (Widget w, char *href)
if (!get_pref_boolean(eTRACK_POINTER_MOTION))
return;
-
+
while (win = mo_next_window (win))
if (win->scrolled_win == w)
break;
if (win == NULL)
return;
-
+
if (href && *href) {
href = mo_url_canonicalize_keep_anchor (href, win->cached_url);
to_free = href;
@@ -1215,7 +1215,7 @@ static void pointer_motion_callback (Widget w, char *href)
href = HTDescribeURL (href);
to_free_2 = href;
}
- } else
+ } else
href = " ";
xmstr = XmStringCreateSimple (href);
@@ -1229,7 +1229,7 @@ static void pointer_motion_callback (Widget w, char *href)
free (to_free);
if (to_free_2)
free (to_free_2);
-
+
return;
}
@@ -1250,10 +1250,10 @@ XmxCallback (submit_form_callback)
while (win = mo_next_window (win))
if (win->scrolled_win == w)
goto foundit;
-
+
/* Shit outta luck. */
return;
-
+
foundit:
mo_busy ();
@@ -1359,9 +1359,9 @@ XmxCallback (submit_form_callback)
char *c = mo_escape_part (cbdata->attribute_names[i]);
strcat (query, c);
free (c);
-
+
strcat (query, "=");
-
+
if (cbdata->attribute_values[i])
{
char *c = mo_escape_part (cbdata->attribute_values[i]);
@@ -1377,7 +1377,7 @@ XmxCallback (submit_form_callback)
if (!my_strcasecmp(method,"cciPOST"))
MoCCIFormToClient(NULL, NULL, NULL,NULL,1);
- mo_post_access_document (win, url,
+ mo_post_access_document (win, url,
(plaintext?"text/plain":
"application/x-www-form-urlencoded"),
query);
@@ -1386,7 +1386,7 @@ XmxCallback (submit_form_callback)
{
mo_access_document (win, query);
}
-
+
if (query) free (query);
return;
@@ -1450,9 +1450,9 @@ void UpdateButtons (Widget w)
{
XEvent event;
Display * display = XtDisplay(w);
-
+
XSync (display, 0);
-
+
while (XCheckMaskEvent(display, (ButtonPressMask|ButtonReleaseMask),
&event))
{
@@ -1526,7 +1526,7 @@ static int current=HTAA_NONE;
if ((char *)pix != NULL) {
DrawSecurityPixmap (win->security, pix);
}
-
+
UpdateButtons (win->base);
XmUpdateDisplay (win->base);
@@ -1578,7 +1578,7 @@ int mo_gui_check_icon (int twirl)
logo_count = 0;
}
}
-
+
UpdateButtons (win->base);
XmUpdateDisplay (win->base);
@@ -1647,11 +1647,11 @@ void mo_presentation_mode(mo_window *win) {
* purpose: This is the event handler for the HTML widget and associated
* scrolled window; it handles keypress events and enables the
* hotkey support.
- * inputs:
+ * inputs:
* - as per XmxEventHandler
- * returns:
+ * returns:
* nothing
- * remarks:
+ * remarks:
* Hotkeys and their actions are currently hardcoded. This is probably
* a bad idea, and Eric hates it.
****************************************************************************/
@@ -1670,26 +1670,26 @@ static XmxEventHandler (mo_view_keypress_handler)
return;
/* Go get ascii translation. */
- _count = XLookupString (&(event->xkey), _buffer, _bufsize,
+ _count = XLookupString (&(event->xkey), _buffer, _bufsize,
&_key, &_cs);
/* I don't know why this is necessary but for some reason the rbm was making
the above function return 0 as the _key, this fixes it -- TPR */
if(!_key)
_key = XKeycodeToKeysym(XtDisplay(win->view), event->xkey.keycode, 0);
-
+
/* Insert trailing Nil. */
_buffer[_count] = '\0';
params[0] = "0";
-
+
switch(_key){
case XK_Prior: /* Page up. */
case XK_KP_Prior:
if(!get_pref_boolean(eCATCH_PRIOR_AND_NEXT)) break;
case XK_BackSpace:
case XK_Delete:
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb)) {
XtCallActionProc (sb, "PageUpOrLeft", event, params, 1);
@@ -1701,7 +1701,7 @@ static XmxEventHandler (mo_view_keypress_handler)
if(!get_pref_boolean(eCATCH_PRIOR_AND_NEXT)) break;
case XK_Return:
case XK_space:
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb)) {
XtCallActionProc (sb, "PageDownOrRight", event, params, 1);
@@ -1720,7 +1720,7 @@ static XmxEventHandler (mo_view_keypress_handler)
HTMLTraverseTabGroups(win->scrolled_win, XmTRAVERSE_NEXT_TAB_GROUP);
}
break;
-
+
case XK_Home: /* Home -- Top */
HTMLGotoId(win->scrolled_win, 0, 0);
break;
@@ -1731,7 +1731,7 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_Down:
case XK_KP_Down:
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb)) {
XtCallActionProc (sb, "IncrementDownOrRight", event, params, 1);
@@ -1741,7 +1741,7 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_Right:
case XK_KP_Right:
params[0] = "1";
- XtVaGetValues (win->scrolled_win, XmNhorizontalScrollBar,
+ XtVaGetValues (win->scrolled_win, XmNhorizontalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb)) {
XtCallActionProc (sb, "IncrementDownOrRight", event, params, 1);
@@ -1750,7 +1750,7 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_Up:
case XK_KP_Up:
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb)){
XtCallActionProc (sb, "IncrementUpOrLeft", event, params, 1);
@@ -1760,15 +1760,15 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_Left:
case XK_KP_Left:
params[0] = "1";
-
- XtVaGetValues (win->scrolled_win, XmNhorizontalScrollBar,
+
+ XtVaGetValues (win->scrolled_win, XmNhorizontalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb)) {
XtCallActionProc (sb, "IncrementUpOrLeft", event, params, 1);
}
break;
}
-
+
if (!(get_pref_boolean(eKIOSK) || get_pref_boolean(eKIOSKNOEXIT))) {
switch(_key){
@@ -1791,10 +1791,10 @@ static XmxEventHandler (mo_view_keypress_handler)
break;
case XK_A: /* Annotate. */
- case XK_a:
+ case XK_a:
mo_post_annotate_win (win, 0, 0, NULL, NULL, NULL, NULL);
break;
-
+
case XK_B: /* Back. */
case XK_b:
mo_back_node (win);
@@ -1819,7 +1819,7 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_f:
if(event->xkey.state & ControlMask)
{
- if(XtIsManaged(win->slab[SLAB_URL]) &&
+ if(XtIsManaged(win->slab[SLAB_URL]) &&
!get_pref_boolean(eFOCUS_FOLLOWS_MOUSE))
{
XmTextFieldSetString(win->url_text, "ftp://");
@@ -1830,7 +1830,7 @@ static XmxEventHandler (mo_view_keypress_handler)
else
mo_forward_node (win);
break;
-
+
case XK_H: /* Hotlist */
mo_post_hotlist_win (win);
break;
@@ -1838,7 +1838,7 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_h: /* History */
if(event->xkey.state & ControlMask)
{
- if(XtIsManaged(win->slab[SLAB_URL]) &&
+ if(XtIsManaged(win->slab[SLAB_URL]) &&
!get_pref_boolean(eFOCUS_FOLLOWS_MOUSE))
{
XmTextFieldSetString(win->url_text, "http://");
@@ -1854,7 +1854,7 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_l:
mo_post_open_local_window (win);
break;
-
+
case XK_M: /* Mailto */
case XK_m:
mo_post_mail_window (win);
@@ -1864,19 +1864,19 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_n:
if(event->xkey.state & ControlMask)
{
- if(XtIsManaged(win->slab[SLAB_URL]) &&
+ if(XtIsManaged(win->slab[SLAB_URL]) &&
!get_pref_boolean(eFOCUS_FOLLOWS_MOUSE))
{
XtSetKeyboardFocus(win->base, win->url_text);
-
+
XmTextFieldSetString(win->url_text, "news://");
XmTextSetInsertionPosition(win->url_text, 8);
}
- }
+ }
else
mo_open_another_window (win, home_document, NULL, NULL);
break;
-
+
case XK_O: /* Open */
case XK_o:
mo_post_open_window (win);
@@ -1898,16 +1898,16 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_r: /* reload */
mo_reload_window_text (win, 0);
break;
-
+
case XK_R: /* Refresh */
mo_refresh_window_text (win);
break;
-
+
case XK_S: /* Search. */
case XK_s:
mo_post_search_window (win);
break;
-
+
/* Tag 'n Bag */
/*
case XK_T:
@@ -1926,13 +1926,13 @@ static XmxEventHandler (mo_view_keypress_handler)
case XK_Z:
case XK_z:
- if(XtIsManaged(win->slab[SLAB_URL]) &&
+ if(XtIsManaged(win->slab[SLAB_URL]) &&
!get_pref_boolean(eFOCUS_FOLLOWS_MOUSE))
{
char *str;
-
+
str = XmTextFieldGetString(win->url_text);
- XmTextFieldSetSelection(win->url_text, 0, strlen(str),
+ XmTextFieldSetSelection(win->url_text, 0, strlen(str),
event->xkey.time);
XtSetKeyboardFocus(win->base, win->url_text);
@@ -1965,7 +1965,7 @@ static XmxEventHandler (mo_view_keypress_handler)
break;
}
}
-
+
return;
}
@@ -2060,14 +2060,14 @@ static void DrawMeter(Widget meter, XtPointer client, XtPointer call)
mask = GCFont;
XChangeGC(XtDisplay(meter), gc, mask, &values);
XSetForeground( XtDisplay(meter),gc,win->meter_font_bg);
- XDrawString(XtDisplay(meter), XtWindow(meter), gc,
+ XDrawString(XtDisplay(meter), XtWindow(meter), gc,
(win->meter_width/2-(win->meter_fontW*l)/2)+2,
- ((win->meter_height/2)+(win->meter_fontH/2)),
+ ((win->meter_height/2)+(win->meter_fontH/2)),
ss, l);
XSetForeground( XtDisplay(meter),gc,win->meter_font_fg);
- XDrawString(XtDisplay(meter), XtWindow(meter), gc,
+ XDrawString(XtDisplay(meter), XtWindow(meter), gc,
(win->meter_width/2-(win->meter_fontW*l)/2),
- ((win->meter_height/2)+(win->meter_fontH/2))-2,
+ ((win->meter_height/2)+(win->meter_fontH/2))-2,
ss, l);
}
}
@@ -2087,7 +2087,7 @@ static void ResizeMeter(Widget meter, XtPointer client, XtPointer call)
}
if(!XtWindow(meter)) return;
-
+
XGetWindowAttributes(XtDisplay(meter),XtWindow(meter),&wattr);
win->meter_width = wattr.width;
@@ -2110,7 +2110,7 @@ void mo_gui_update_meter(int level, char *text)
if(level<0) level = 0;
if(level>100) level = 100;
current_win->meter_level = level;
-
+
DrawMeter(current_win->meter,(XtPointer) current_win, NULL);
}
@@ -2127,7 +2127,7 @@ int parse_slabinfo(char *s)
for(p=s,i=0,done=0;!done;p++){
if(!*p) done = 1;
-
+
if(!*p || (*p==',')){
*p=0;
@@ -2152,8 +2152,8 @@ int parse_slabinfo(char *s)
}
fprintf(stderr,"layout: bad slab name \"%s\"\n",s);
return 0;
-
- next1:
+
+ next1:
s = p+1;
continue;
}
@@ -2189,7 +2189,7 @@ int parse_slabinfo(char *s)
return 0;
}
}
-
+
}
}
if(!done){
@@ -2213,9 +2213,9 @@ int parse_slabinfo(char *s)
return 1;
}
-
-struct tool mo_tools[] = {
+
+struct tool mo_tools[] = {
{"<-","Back","Previous page",mo_back,&toolbarBack, &toolbarBackGRAY, moMODE_ALL, 1, NULL},
{"->","Forward","Next page",mo_forward,&toolbarForward, &toolbarForwardGRAY, moMODE_ALL, 1, NULL},
{"Rel","Reload","Reload this page",mo_reload_document,&toolbarReload,NULL, moMODE_ALL, 0, NULL},
@@ -2347,14 +2347,14 @@ void mo_tool_detach_cb(Widget wx, XtPointer cli, XtPointer call)
XmxSetUniqid(win->id);
XtUnmanageChild(XtParent(win->scrolled_win));
-
+
if(win->toolbardetached){
win->toolbardetached = 0;
XtUnmanageChild(win->toolbarwin);
XtDestroyWidget(win->toolbarwin);
win->toolbarwin = NULL;
win->topform = win->slab[SLAB_TOOLS];
- mo_fill_toolbar(win,win->topform,0,0);
+ mo_fill_toolbar(win,win->topform,0,0);
if(win->biglogo && !win->smalllogo){
mo_make_globe(win, win->slab[SLAB_GLOBE], 0);
}
@@ -2362,7 +2362,7 @@ void mo_tool_detach_cb(Widget wx, XtPointer cli, XtPointer call)
win->toolbardetached = 1;
XtUnmanageChild(win->button_rc);
XtUnmanageChild(win->button2_rc);
-
+
XtDestroyWidget(win->button_rc);
XtDestroyWidget(win->button2_rc);
@@ -2372,7 +2372,7 @@ void mo_tool_detach_cb(Widget wx, XtPointer cli, XtPointer call)
XtUnmanageChild(win->security);
XtDestroyWidget(win->security);
XtUnmanageChild(win->encrypt);
- XtDestroyWidget(win->encrypt);
+ XtDestroyWidget(win->encrypt);
}
win->toolbarwin = XtVaCreatePopupShell
("ToolBox",
@@ -2390,7 +2390,7 @@ void mo_tool_detach_cb(Widget wx, XtPointer cli, XtPointer call)
XtManageChild(win->toolbarwin);
win->topform = XtVaCreateWidget
("slab_tools",
- xmFormWidgetClass, win->toolbarwin,
+ xmFormWidgetClass, win->toolbarwin,
XmNminHeight, h,
XmNminWidth, w,
XmNmaxHeight, h,
@@ -2403,9 +2403,9 @@ void mo_tool_detach_cb(Widget wx, XtPointer cli, XtPointer call)
WM_DELETE_WINDOW = XmInternAtom(dsp, "WM_DELETE_WINDOW", False);
XmAddWMProtocolCallback(win->toolbarwin, WM_DELETE_WINDOW,
mo_tool_detach_cb, (XtPointer)win);
-
+
XtPopup(win->toolbarwin, XtGrabNone);
- }
+ }
XtManageChild(XtParent(win->scrolled_win));
@@ -2419,7 +2419,7 @@ void mo_switch_mode(mo_window *win)
if(!(mo_tools[i].toolset & win->mode)) {
if(XtIsManaged(win->tools[i].w))
XtUnmanageChild(win->tools[i].w);
- } else {
+ } else {
if(!XtIsManaged(win->tools[i].w))
XtManageChild(win->tools[i].w);
}
@@ -2428,7 +2428,7 @@ void mo_switch_mode(mo_window *win)
}
-
+
mo_tool_state(struct toolbar *t,int state,int index)
{
if (use_tool[index]) {
@@ -2453,10 +2453,10 @@ void mo_extra_buttons(mo_window *win, Widget top)
XmNuserData, (XtPointer) "Security Stats Information",
XmNtraversalOn, False,
NULL);
-
+
XtOverrideTranslations(win->security,
XtParseTranslationTable(xlattab));
-
+
win->encrypt = XtVaCreateManagedWidget
(" ", xmPushButtonWidgetClass,
top,
@@ -2471,21 +2471,21 @@ void mo_extra_buttons(mo_window *win, Widget top)
NULL);
XmxApplyPixmapToLabelWidget (win->encrypt, enc_not_secure);
-
+
XtOverrideTranslations(win->encrypt,XtParseTranslationTable(xlattab));
-
+
/* insure we set the security icon! */
if (win->current_node) {
mo_gui_check_security_icon_in_win(win->current_node->authType,win);
}
-
+
}
void mo_make_globe(mo_window *win, Widget parent, int small)
{
int tmp = 25;
-
+
if(!small){
IconPix = IconPixBig;
IconWidth = IconHeight = 64;
@@ -2552,7 +2552,7 @@ void mo_make_globe(mo_window *win, Widget parent, int small)
XmNrightAttachment, XmATTACH_WIDGET,
XmNrightWidget, win->logo,
NULL);
- }
+ }
}
}
XtVaSetValues(win->logo,
@@ -2611,7 +2611,7 @@ Widget mo_fill_toolbar(mo_window *win, Widget top, int w, int h)
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
NULL);
-
+
win->button_rc = XtVaCreateWidget
("buttonrc", xmRowColumnWidgetClass,
@@ -2647,7 +2647,7 @@ Widget mo_fill_toolbar(mo_window *win, Widget top, int w, int h)
XmNfontList, tmpFontList,
XmNtraversalOn, False,
NULL);
-
+
XtOverrideTranslations(tearbutton,XtParseTranslationTable(xlattab));
XtAddCallback(tearbutton,
@@ -2692,32 +2692,32 @@ Widget mo_fill_toolbar(mo_window *win, Widget top, int w, int h)
XmxAddCallback(win->tools[i].w,
XmNactivateCallback, menubar_cb,
mo_tools[i].action);
-
+
if(!(mo_tools[i].toolset & win->mode))
- XtUnmanageChild(win->tools[i].w);
+ XtUnmanageChild(win->tools[i].w);
}
} else {
win->tools[i].w=NULL;
XtVaCreateManagedWidget
(" ",xmSeparatorWidgetClass,
win->button_rc,
- XmNorientation, vert?XmHORIZONTAL:XmVERTICAL,
+ XmNorientation, vert?XmHORIZONTAL:XmVERTICAL,
vert?XmNheight:XmNwidth, vert?3:4,
XmNseparatorType, XmNO_LINE,
XmNtraversalOn, False,
NULL);
}
}
-
+
if(!win->biglogo || (!win->smalllogo && win->toolbardetached)){
mo_extra_buttons(win, win->button2_rc);
mo_make_globe(win, win->button2_rc, 1);
- }
+ }
XtManageChild(win->button2_rc);
XtManageChild(win->button_rc);
-
+
return (win->topform);
}
@@ -2725,14 +2725,14 @@ Widget mo_fill_toolbar(mo_window *win, Widget top, int w, int h)
/****************************************************************************
* name: mo_fill_window (PRIVATE)
- * purpose: Take a new (empty) mo_window struct and fill in all the
+ * purpose: Take a new (empty) mo_window struct and fill in all the
* GUI elements.
- * inputs:
+ * inputs:
* - mo_window *win: The window.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
static mo_status mo_fill_window (mo_window *win)
{
@@ -2744,7 +2744,7 @@ static mo_status mo_fill_window (mo_window *win)
char *s;
static char *pres_slab=NULL;
static char *kiosk_slab=NULL;
-
+
form = XtVaCreateManagedWidget("form0", xmFormWidgetClass, win->base, NULL);
if (scount<0 && pres) {
@@ -2774,7 +2774,7 @@ static mo_status mo_fill_window (mo_window *win)
/* go with the default layout */
win->smalllogo = 0;
win->texttools = 0;
-
+
win->slabcount = 6;
win->slabpart[0] = SLAB_MENU;
win->slabpart[1] = SLAB_GLOBE;
@@ -2795,7 +2795,7 @@ static mo_status mo_fill_window (mo_window *win)
for(i=0;islabcount;i++){
if(win->slabpart[i]==SLAB_GLOBE) win->biglogo=1;
}
-
+
/* no active toolset, horiz, not detached */
win->toolset = 0;
win->toolbarorientation = 0;
@@ -2803,7 +2803,7 @@ static mo_status mo_fill_window (mo_window *win)
win->toolbarwin = NULL;
-
+
/*********************** SLAB_GLOBE ****************************/
if(win->biglogo){
win->slab[SLAB_GLOBE] = XtVaCreateWidget("slab_globe",
@@ -2813,8 +2813,8 @@ static mo_status mo_fill_window (mo_window *win)
} else {
win->slab[SLAB_GLOBE] = NULL;
}
-
-
+
+
/*********************** SLAB_MENU ****************************/
win->menubar = mo_make_document_view_menubar (form);
win->slab[SLAB_MENU] = win->menubar->base;
@@ -2845,7 +2845,7 @@ static mo_status mo_fill_window (mo_window *win)
XmNeditable, False,
XmNcursorPositionVisible, False,
NULL);
-
+
/*********************** SLAB_URL ****************************/
win->slab[SLAB_URL] = XtVaCreateWidget("slab_url",
@@ -2911,7 +2911,7 @@ static mo_status mo_fill_window (mo_window *win)
/* now that the htmlWidget is created we can do this */
mo_make_popup(win->view);
-
+
/*********************** SLAB_STATUS ****************************/
win->slab[SLAB_STATUS] = XtVaCreateWidget("slab_status",
xmFormWidgetClass, form, NULL);
@@ -2935,7 +2935,7 @@ static mo_status mo_fill_window (mo_window *win)
XmNtopAttachment, XmATTACH_FORM,
XmNbottomAttachment, XmATTACH_FORM,
NULL);
-
+
win->meter = XtVaCreateManagedWidget
("meter", xmDrawingAreaWidgetClass,
win->meter_frame,
@@ -2945,19 +2945,19 @@ static mo_status mo_fill_window (mo_window *win)
NULL);
XtOverrideTranslations(win->meter,
XtParseTranslationTable(xlattab));
-
+
win->meter_level = 0;
win->meter_width = -1;
-
+
XtAddCallback(win->meter, XmNexposeCallback,
DrawMeter, (XtPointer) win);
XtAddCallback(win->meter, XmNresizeCallback,
ResizeMeter, (XtPointer) win);
-
+
/* grab some colors */
{
XColor ccell1,ccell2;
-
+
XAllocNamedColor(dsp,(installed_colormap ?
installed_cmap :
DefaultColormapOfScreen(XtScreen(win->base))),
@@ -3031,7 +3031,7 @@ static mo_status mo_fill_window (mo_window *win)
XmNtopAttachment, XmATTACH_NONE,
NULL);
}
-
+
} else {
if(win->slabpart[i] == SLAB_VIEW){
/* we change link dir here AND link this slab both ways*/
@@ -3061,7 +3061,7 @@ static mo_status mo_fill_window (mo_window *win)
} else {
up = win->slab[win->slabpart[(i-1)-(globe==2 ? 1 : 0)]];
}
-
+
topatt = XmATTACH_WIDGET;
}
dn = NULL;
@@ -3076,14 +3076,14 @@ static mo_status mo_fill_window (mo_window *win)
}
up = NULL;
topatt = XmATTACH_NONE;
- }
+ }
}
/*
fprintf(stderr,"%s (0x%08X): up=0x%08X dn=0x%08X ta=%d ba=%d\n",
slab_words[win->slabpart[i]], win->slab[win->slabpart[i]],
up, dn, topatt, botatt);
- */
+ */
XtVaSetValues(win->slab[win->slabpart[i]],
XmNleftOffset, 0,
@@ -3117,11 +3117,11 @@ static mo_status mo_fill_window (mo_window *win)
/****************************************************************************
* name: mo_delete_window
* purpose: Shut down a window.
- * inputs:
+ * inputs:
* - mo_window *win: The window.
- * returns:
+ * returns:
* mo_succeed
- * remarks:
+ * remarks:
* This can be called, among other places, from the WM_DELETE_WINDOW
* handler. By the time we get here, we must assume the window is already
* in the middle of being shut down.
@@ -3185,7 +3185,7 @@ mo_status mo_delete_window (mo_window *win)
free (tofree);
}
win->history=NULL;
-
+
free (win->search_start);
win->search_start=NULL;
free (win->search_end);
@@ -3209,7 +3209,7 @@ int mo_get_font_size_from_res(char *userfontstr,int *fontfamily)
for (x=0; ximage_view_internal = parent->image_view_internal;
XmxRSetToggleState (win->menubar, mo_image_view_internal,
(win->image_view_internal ? XmxSet : XmxNotSet));
-
+
tableSupportEnabled = win->table_support = parent->table_support;
XmxRSetToggleState (win->menubar, mo_table_support,
win->table_support ? XmxSet : XmxNotSet);
-
+
win->body_color = parent->body_color;
XtVaSetValues(win->scrolled_win,
WbNbodyColors,
@@ -3322,14 +3322,14 @@ void mo_sync_windows(mo_window *win, mo_window *parent)
/****************************************************************************
* name: mo_open_window_internal (PRIVATE)
* purpose: Make a mo_window struct and fill up the GUI.
- * inputs:
- * - Widget base: The dialog widget on which this window is
+ * inputs:
+ * - Widget base: The dialog widget on which this window is
* to be based.
* - mo_window *parent: The parent mo_window struct for this window,
* if one exists; this can be NULL.
- * returns:
+ * returns:
* The new window (mo_window *).
- * remarks:
+ * remarks:
* This routine must set to 0 all elements in the mo_window struct
* that can be tested by various routines to see if various things
* have been done yet (popup windows created, etc.).
@@ -3347,7 +3347,7 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
win->base = base;
win->mode = moMODE_PLAIN;
-
+
win->source_win = 0;
win->save_win = 0;
win->upload_win = 0;
@@ -3419,7 +3419,7 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
win->record_fnam = 0;
win->record_pid = 0;
#endif
-
+
win->print_text = 0;
win->print_format = 0;
@@ -3433,7 +3433,7 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
/* We don't know yet. */
win->keyword_search_possible = -1;
#endif
-
+
/*SWP 7/3/95*/
if (get_pref_boolean(eSECURITYICON)) {
if (win->current_node) {
@@ -3453,7 +3453,7 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
newsShowAllArticles = get_pref_boolean (eSHOWALLARTICLES);
newsNoThreadJumping = get_pref_boolean (eNOTHREADJUMPING);
gui_news_updateprefs (win);
-
+
win->have_focus = False;
win->binary_transfer = 0;
@@ -3482,7 +3482,7 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
win->session_menu = NULL;
win->num_session_items = 0;
if(get_pref_boolean(eSESSION_HISTORY_ON_RBM))
- win->session_items = malloc(sizeof(Widget) *
+ win->session_items = malloc(sizeof(Widget) *
get_pref_int(eNUMBER_OF_ITEMS_IN_RBM_HISTORY));
}
@@ -3490,7 +3490,7 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
XtPopup (win->base, XtGrabNone);
XFlush (dsp);
XSync (dsp, False);
-
+
/* Register win with internal window list. */
mo_add_window_to_list (win);
@@ -3514,7 +3514,7 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
#endif
mo_sync_windows(win,parent);
}
-
+
return win;
}
@@ -3522,11 +3522,11 @@ static mo_window *mo_open_window_internal (Widget base, mo_window *parent)
/****************************************************************************
* name: delete_cb (PRIVATE)
* purpose: Callback for the WM_DELETE_WINDOW protocol.
- * inputs:
+ * inputs:
* - as per XmxCallback
- * returns:
+ * returns:
* nothing
- * remarks:
+ * remarks:
* By the time we get called here, the window has already been popped
* down. Just call mo_delete_window to clean up.
****************************************************************************/
@@ -3541,12 +3541,12 @@ static XmxCallback (delete_cb)
/****************************************************************************
* name: mo_make_window (PRIVATE)
* purpose: Make a new window from scratch.
- * inputs:
+ * inputs:
* - Widget parent: Parent for the new window shell.
* - mo_window *parentw: Parent window, if one exists (may be NULL).
- * returns:
+ * returns:
* The new window (mo_window *).
- * remarks:
+ * remarks:
* The 'parent window' parentw is the window being cloned, or the
* window in which the 'new window' command was triggered, etc.
* Some GUI properties are inherited from it, if it exists (fonts,
@@ -3571,7 +3571,7 @@ static mo_window *mo_make_window (Widget parent, mo_window *parentw)
toplevel, Xmx_wargs, Xmx_n);
Xmx_n = 0;
-#ifdef EDITRES_SUPPORT
+#ifdef EDITRES_SUPPORT
XtAddEventHandler(base, (EventMask) 0, TRUE,
(XtEventHandler) _XEditResCheckMessages, NULL);
#endif
@@ -3591,11 +3591,11 @@ static mo_window *mo_make_window (Widget parent, mo_window *parentw)
/****************************************************************************
* name: mo_open_another_window_internal (PRIVATE)
* purpose: Open a new window from an existing window.
- * inputs:
+ * inputs:
* - mo_window *win: The old window.
- * returns:
+ * returns:
* The new window (mo_window *).
- * remarks:
+ * remarks:
* This routine handles (optional) autoplace of new windows.
****************************************************************************/
static mo_window *mo_open_another_window_internal (mo_window *win)
@@ -3614,16 +3614,16 @@ static mo_window *mo_open_another_window_internal (mo_window *win)
/* If not, deal with it... */
/* Bug fix, thanks to Ken Shores */
-
+
/* the original test did not handle the case where the old window
* was exactly the same size as the screen. Also, it used a looping
* algorithm which would infinite loop under such a case. */
-
+
if ((oldx+width) > (scrx-40))
x = (scrx - (oldx + width));
else
x = oldx + 40;
-
+
if ((oldy+height) > (scry-40))
y = (scry - (oldy + height));
else
@@ -3631,7 +3631,7 @@ static mo_window *mo_open_another_window_internal (mo_window *win)
if (x > scrx) x = 0;
if (y > scry) y = 0;
-
+
XmxSetArg (XmNdefaultPosition, False);
if (get_pref_boolean(eAUTO_PLACE_WINDOWS))
{
@@ -3651,14 +3651,14 @@ static mo_window *mo_open_another_window_internal (mo_window *win)
/****************************************************************************
* name: mo_open_window
* purpose: Open a new window to view a given URL.
- * inputs:
+ * inputs:
* - Widget parent: The parent Widget for the new window's shell.
* - char *url: The URL to view in the new window.
* - mo_window *parentw: The (optional) parent window of the new window.
- * returns:
+ * returns:
* The new window.
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_window *mo_open_window (Widget parent, char *url, mo_window *parentw)
{
@@ -3677,12 +3677,12 @@ mo_window *mo_open_window (Widget parent, char *url, mo_window *parentw)
/****************************************************************************
* name: mo_duplicate_window
* purpose: Clone a existing window as intelligently as possible.
- * inputs:
+ * inputs:
* - mo_window *win: The existing window.
- * returns:
+ * returns:
* The new window.
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_window *mo_duplicate_window (mo_window *win) {
@@ -3693,7 +3693,7 @@ mo_window *neww;
}
neww = mo_open_another_window_internal (win);
-
+
mo_duplicate_window_text (win, neww);
mo_gui_update_meter(100,NULL);
@@ -3707,17 +3707,17 @@ mo_window *neww;
* name: mo_open_another_window
* purpose: Open another window to view a given URL, unless the URL
* indicates that it's pointless to do so
- * inputs:
+ * inputs:
* - mo_window *win: The existing window.
* - char *url: The URL to view in the new window.
* - char *ref: The reference (hyperlink text contents) for this
* URL; can be NULL.
* - char *target_anchor: The target anchor to view open opening the
* window, if any.
- * returns:
+ * returns:
* The new window.
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
mo_window *mo_open_another_window (mo_window *win, char *url, char *ref,
char *target_anchor)
@@ -3742,7 +3742,7 @@ mo_window *mo_open_another_window (mo_window *win, char *url, char *ref,
(it probably won't, now. */
neww->target_anchor = target_anchor;
- return_stat = mo_load_window_text (neww, url, ref);
+ return_stat = mo_load_window_text (neww, url, ref);
if ((cci_get) && (return_stat == mo_fail))
return (mo_window *) NULL;
@@ -3766,7 +3766,7 @@ static XmxCallback (blip)
mo_dtm_poll_and_read ();
XtAppAddTimeOut (app_context, 100, (XtTimerCallbackProc)blip, (XtPointer)True);
-
+
return;
}
#endif
@@ -3776,7 +3776,7 @@ mo_status mo_register_dtm_blip (void)
{
/* Set a timer that will poll DTM regularly. */
XtAppAddTimeOut (app_context, 100, (XtTimerCallbackProc)blip, (XtPointer)True);
-
+
return mo_succeed;
}
#endif
@@ -3786,11 +3786,11 @@ mo_status mo_register_dtm_blip (void)
* name: fire_er_up (PRIVATE)
* purpose: Callback from timer that actually starts up the application,
* i.e., opens the first window.
- * inputs:
+ * inputs:
* - as per XmxCallback
- * returns:
+ * returns:
* Nothing.
- * remarks:
+ * remarks:
* This routine figures out what the home document should be
* and then calls mo_open_window().
****************************************************************************/
@@ -3885,7 +3885,7 @@ static XmxCallback (fire_er_up)
if (get_pref_boolean(eINITIAL_WINDOW_ICONIC))
XmxSetArg (XmNiconic, True);
- win = mo_open_window
+ win = mo_open_window
(toplevel, startup_document ? startup_document : init_document, NULL);
#if 0
@@ -3926,9 +3926,9 @@ static XmxCallback (fire_er_up)
* name: mo_open_initial_window
* purpose: This routine is called when we know we want to open the
* initial Document View window.
- * inputs:
+ * inputs:
* none
- * returns:
+ * returns:
* mo_succeed
* remarks: This routine is simply a stub that sets a timeout that
* calls fire_er_up() after 10 milliseconds, which does the
@@ -3937,7 +3937,7 @@ static XmxCallback (fire_er_up)
mo_status mo_open_initial_window (void)
{
/* Set a timer that will actually cause the window to open. */
- XtAppAddTimeOut (app_context, 10,
+ XtAppAddTimeOut (app_context, 10,
(XtTimerCallbackProc)fire_er_up, (XtPointer)True);
return mo_succeed;
@@ -3947,12 +3947,12 @@ mo_status mo_open_initial_window (void)
/****************************************************************************
* name: mo_error_handler (PRIVATE)
* purpose: Handle X errors.
- * inputs:
+ * inputs:
* - Display *dsp: The X display.
* - XErrorEvent *event: The error event to handle.
- * returns:
+ * returns:
* 0, if it doesn't force an exit.
- * remarks:
+ * remarks:
* The main reason for this handler is to keep the application
* from crashing on BadAccess errors during calls to XFreeColors().
****************************************************************************/
@@ -3965,9 +3965,9 @@ static int mo_error_handler (Display *dsp, XErrorEvent *event)
/* BadAlloc errors (on a XCreatePixmap() call)
and BadAccess errors on XFreeColors are 'ignoreable' errors */
if (event->error_code == BadAlloc ||
- (event->error_code == BadAccess && event->request_code == 88))
+ (event->error_code == BadAccess && event->request_code == 88))
return 0;
- else
+ else
{
/* All other errors are 'fatal'. */
XGetErrorText (dsp, event->error_code, buf, 128);
@@ -3985,11 +3985,11 @@ static int mo_error_handler (Display *dsp, XErrorEvent *event)
* name: setup_imagekill
* purpose: Read the imagekill file if it exists and fill in the
* imagekill_sites array
- *
- * returns:
+ *
+ * returns:
* nothing
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
#define IMAGESELECT_FILENAME ".mosaic/imageselect-sites" // SAM
@@ -4007,7 +4007,7 @@ void setup_imagekill(void) {
fprintf(stderr,"home: Could not get your home directory.\n");
return;
}
-
+
sprintf(imageselect_file_pathname, "%s/%s",
home, IMAGESELECT_FILENAME);
@@ -4036,7 +4036,7 @@ void setup_imagekill(void) {
else if(buf[0] == 'k' || buf[0] == 'K')
num_kill_sites++;
}
-
+
rewind(fp);
imagekill_sites = (char **)malloc((num_kill_sites+1) * sizeof(char *));
@@ -4050,15 +4050,15 @@ void setup_imagekill(void) {
}
i=j=0;
-
+
while(!(fgets(buf, 512, fp) == NULL)) {
int len;
-
-
+
+
if(buf[0] == '#' || buf[0] == '\n')
continue;
-
+
else if(buf[0] == 'd' || buf[0] == 'D') {
len = strlen(buf) - 6 - 1; /* 6 == strlen("delay ") */
imagedelay_sites[i] = NULL;
@@ -4067,9 +4067,9 @@ void setup_imagekill(void) {
imagedelay_sites[i][len] = '\0';
i++;
}
-
+
else if(buf[0] == 'k' || buf[0] == 'K') {
-
+
len = strlen(buf) - 5 - 1; /* 5 == strlen("kill ") */
imagekill_sites[j] = NULL;
imagekill_sites[j] = (char *)malloc((len+1) * sizeof(char));
@@ -4078,15 +4078,15 @@ void setup_imagekill(void) {
j++;
}
}
-
+
imagedelay_sites[i] = NULL;
imagekill_sites[j] = NULL;
-
+
fclose(fp);
-
+
return;
-
+
}
@@ -4097,13 +4097,13 @@ void HT_SetExtraHeaders(char **headers);
/****************************************************************************
* name: mo_do_gui
* purpose: This is basically the real main routine of the application.
- * inputs:
+ * inputs:
* - int argc: Number of arguments.
* - char **argv: The argument vector.
- * returns:
+ * returns:
* nothing
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
void mo_do_gui (int argc, char **argv)
{
@@ -4187,7 +4187,7 @@ void mo_do_gui (int argc, char **argv)
if (no_defaults)
{
- toplevel = XtAppInitialize
+ toplevel = XtAppInitialize
(&app_context, "Mosaic", options, XtNumber (options),
&argc, argv, NULL, Xmx_wargs, Xmx_n);
}
@@ -4195,13 +4195,13 @@ void mo_do_gui (int argc, char **argv)
{
if (use_color)
{
- toplevel = XtAppInitialize
+ toplevel = XtAppInitialize
(&app_context, "Mosaic", options, XtNumber (options),
&argc, argv, color_resources, Xmx_wargs, Xmx_n);
}
else
{
- toplevel = XtAppInitialize
+ toplevel = XtAppInitialize
(&app_context, "Mosaic", options, XtNumber (options),
&argc, argv, mono_resources, Xmx_wargs, Xmx_n);
}
@@ -4211,7 +4211,7 @@ void mo_do_gui (int argc, char **argv)
dsp = XtDisplay (toplevel);
- /* initialize the preferences stuff */
+ /* initialize the preferences stuff */
successful = preferences_genesis();
if(!successful) { /* I should probably be generating an error here... */
signal (SIGBUS, 0);
@@ -4295,8 +4295,8 @@ void mo_do_gui (int argc, char **argv)
{
XVisualInfo vinfo, *vptr;
int cnt;
-
- vinfo.visualid =
+
+ vinfo.visualid =
XVisualIDFromVisual
(DefaultVisual (dsp,
DefaultScreen (dsp)));
@@ -4304,19 +4304,19 @@ void mo_do_gui (int argc, char **argv)
Vclass = vptr->class;
XFree((char *)vptr);
}
-
+
/* First get the hostname. */
machine = (char *)malloc (sizeof (char) * 64);
gethostname (machine, 64);
uname(&mo_uname);
- HTAppVersion =
+ HTAppVersion =
(char *)malloc (sizeof(char) * (
strlen(MO_VERSION_STRING) +
- strlen(mo_uname.sysname) +
+ strlen(mo_uname.sysname) +
strlen(mo_uname.release) +
strlen(mo_uname.machine) + 20));
- sprintf(HTAppVersion, "%s (X11;%s %s %s)",
+ sprintf(HTAppVersion, "%s (X11;%s %s %s)",
MO_VERSION_STRING,
mo_uname.sysname,
mo_uname.release,
@@ -4337,13 +4337,13 @@ splash_goto:
GC gc;
XGCValues values;
XColor ccell1, ccell_fg;
-
+
int x,y;
XWindowAttributes war;
Widget sform, spixwid;
XFontStruct *font;
char s[64];
-
+
int l;
int fontW, fontH;
@@ -4368,7 +4368,7 @@ splash_goto:
fontW = font->max_bounds.rbearing;
fontH = font->max_bounds.ascent + font->max_bounds.descent;
-
+
splash = XtVaCreatePopupShell
("Hello, World!",
xmMenuShellWidgetClass,
@@ -4379,7 +4379,7 @@ splash_goto:
XmNy, y,
XmNallowShellResize, FALSE,
NULL);
-
+
splash_cc=180;
splashpix = LoadSplashXPM(splash,&splash_cc);
if (!splash_cc) {
@@ -4389,9 +4389,9 @@ splash_goto:
}
sprintf(s,"version %s",MO_VERSION_STRING);
-
+
l = strlen(s);
-
+
sform = XtVaCreateManagedWidget("sform", xmRowColumnWidgetClass,
splash,
XmNheight, 320,
@@ -4413,20 +4413,20 @@ splash_goto:
DefaultColormapOfScreen(XtScreen(splash))),
&ccell_fg))
ccell_fg.pixel = WhitePixelOfScreen(XtScreen(splash));
-
-
+
+
gc = XtGetGC( splash,0,NULL);
values.font = font->fid;
values.foreground = ccell_fg.pixel;
-
+
XChangeGC(dsp, gc, GCFont | GCForeground, &values);
-
- XDrawString(dsp, splashpix, gc,
+
+ XDrawString(dsp, splashpix, gc,
320-(fontW*l/2),
- 320-fontH/2,
+ 320-fontH/2,
s, l);
-
-
+
+
spixwid = XtVaCreateManagedWidget(" ", xmLabelWidgetClass,
sform,
XmNlabelType, XmPIXMAP,
@@ -4435,14 +4435,14 @@ splash_goto:
XmNx, x,
XmNy, y,
NULL);
-
+
XFlush (dsp);
XmUpdateDisplay (splash);
XFlush (dsp);
XSync (dsp, False);
XtReleaseGC(splash,gc);
}
-
+
XtAppAddActions(app_context, balloon_action, 2);
XtAppAddActions(app_context, toplevel_actions, 1);
XtAppAddActions(app_context, url_actions, 2);
@@ -4465,10 +4465,10 @@ splash_goto:
"Accept-Language: %s",
get_pref_string(eACCEPT_LANGUAGE_STR));
extras[1] = NULL;
-
+
HT_SetExtraHeaders(extras);
}
-
+
global_xterm_str = get_pref_string(eXTERM_COMMAND);
uncompress_program = get_pref_string(eUNCOMPRESS_COMMAND);
@@ -4517,15 +4517,15 @@ splash_goto:
if (get_pref_string(ePERSONAL_EXTENSION_MAP))
{
char *home = getenv ("HOME");
-
+
if (!home)
home = "/tmp";
-
- personal_extension_map = (char *)malloc
+
+ personal_extension_map = (char *)malloc
(strlen (home) +
strlen (get_pref_string(ePERSONAL_EXTENSION_MAP)) +
8);
- sprintf (personal_extension_map, "%s/%s", home,
+ sprintf (personal_extension_map, "%s/%s", home,
get_pref_string(ePERSONAL_EXTENSION_MAP));
}
else
@@ -4536,15 +4536,15 @@ splash_goto:
if (get_pref_string(ePERSONAL_TYPE_MAP))
{
char *home = getenv ("HOME");
-
+
if (!home)
home = "/tmp";
-
- personal_type_map = (char *)malloc
+
+ personal_type_map = (char *)malloc
(strlen (home) +
strlen (get_pref_string(ePERSONAL_TYPE_MAP)) +
8);
- sprintf (personal_type_map, "%s/%s", home,
+ sprintf (personal_type_map, "%s/%s", home,
get_pref_string(ePERSONAL_TYPE_MAP));
}
else
@@ -4557,11 +4557,11 @@ splash_goto:
#endif
twirl_increment = get_pref_int(eTWIRL_INCREMENT);
-
+
/* Then make a copy of the hostname for shortmachine.
Don't even ask. */
shortmachine = strdup (machine);
-
+
/* Then find out the full name, if possible. */
if (get_pref_string(eFULL_HOSTNAME))
{
@@ -4571,7 +4571,7 @@ splash_goto:
else if (!get_pref_boolean(eGETHOSTBYNAME_IS_EVIL))
{
struct hostent *phe;
-
+
phe = gethostbyname (machine);
if (phe && phe->h_name)
{
@@ -4580,7 +4580,7 @@ splash_goto:
}
}
/* (Otherwise machine just remains whatever gethostname returned.) */
-
+
machine_with_domain = (strlen (machine) > strlen (shortmachine) ?
machine : shortmachine);
@@ -4589,7 +4589,7 @@ splash_goto:
char *cc;
char *default_author_name = get_pref_string(eDEFAULT_AUTHOR_NAME);
char *default_author_email = get_pref_string(eDEFAULT_AUTHOR_EMAIL);
-
+
if(!default_author_name) {
if (!pw || !pw->pw_gecos) {
default_author_name = strdup("Unknown");
@@ -4615,16 +4615,16 @@ splash_goto:
(char *) malloc(strlen(pw->pw_name)+strlen(machine)+2);
sprintf(default_author_email,"%s@%s",pw->pw_name,machine);
}
- }
+ }
set_pref(eDEFAULT_AUTHOR_NAME, (void *)default_author_name);
set_pref(eDEFAULT_AUTHOR_EMAIL, (void *)default_author_email);
}
-
+
/* If there's no tmp directory assigned by the X resource, then
look at TMPDIR. */
{
char *tmp_dir = get_pref_string(eTMP_DIRECTORY);
-
+
if (!tmp_dir)
{
tmp_dir = getenv ("TMPDIR");
@@ -4639,7 +4639,7 @@ splash_goto:
and then at hardcoded default. */
{
char *docs_dir = get_pref_string(eDOCS_DIRECTORY);
-
+
if (!docs_dir)
{
docs_dir = getenv ("MOSAIC_DOCS_DIRECTORY");
@@ -4675,35 +4675,35 @@ splash_goto:
{
char *home = getenv ("HOME"), *fnam;
FILE *fp;
-
+
if (!home)
home = "/tmp";
-
+
fnam = (char *)malloc (strlen (home) + 32);
sprintf (fnam, "%s/.mosaic/mosaicpid", home); // SAM
-
+
fp = fopen (fnam, "w");
if (fp)
{
fprintf (fp, "%d\n", getpid());
fclose (fp);
}
-
+
free (fnam);
}
-
+
busy_cursor = XCreateFontCursor (dsp, XC_watch);
XtRealizeWidget (toplevel);
/* get the current geometry values */
- XtVaGetValues(toplevel,
- XmNwidth, &userWidth,
- XmNheight, &userHeight,
+ XtVaGetValues(toplevel,
+ XmNwidth, &userWidth,
+ XmNheight, &userHeight,
XmNx, &userX,
XmNy, &userY,
NULL);
-
+
gargv = argv;
gargc = argc;
@@ -4739,7 +4739,7 @@ splash_goto:
#endif
if ((get_pref_int(eCCIPORT) > 1023 ) && (get_pref_int(eCCIPORT) < 65536))
- {
+ {
MoCCIStartListening(toplevel,get_pref_int(eCCIPORT));
}
@@ -4751,13 +4751,13 @@ splash_goto:
* name: mo_process_external_directive
* purpose: Handle an external directive given to the application via
* a config file read in response to a SIGUSR1.
- * inputs:
+ * inputs:
* - char *directive: The directive; either "goto" or "newwin".
* - char *url: The URL corresponding to the directive.
- * returns:
+ * returns:
* nothing
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
#define CLIP_TRAILING_NEWLINE(url) \
if (url[strlen (url) - 1] == '\n') \
@@ -4796,7 +4796,7 @@ void mo_process_external_directive (char *directive, char *url)
{
CLIP_TRAILING_NEWLINE(url);
- /* Force a new window to open. */
+ /* Force a new window to open. */
mo_open_another_window (win, url, NULL, NULL);
XmUpdateDisplay (win->base);
@@ -4805,10 +4805,10 @@ void mo_process_external_directive (char *directive, char *url)
{
Widget sb;
String params[1];
-
+
params[0] = "0";
-
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb))
{
@@ -4825,7 +4825,7 @@ void mo_process_external_directive (char *directive, char *url)
params[0] = "0";
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb))
{
@@ -4838,10 +4838,10 @@ void mo_process_external_directive (char *directive, char *url)
{
Widget sb;
String params[1];
-
+
params[0] = "0";
-
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb))
{
@@ -4857,7 +4857,7 @@ void mo_process_external_directive (char *directive, char *url)
params[0] = "0";
- XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
+ XtVaGetValues (win->scrolled_win, XmNverticalScrollBar,
(long)(&sb), NULL);
if (sb && XtIsManaged (sb))
{
@@ -4945,7 +4945,7 @@ void take_focus(Widget w, XEvent *event,
void mo_flush_passwd_cache (mo_window *win)
{
-
+
HTFTPClearCache ();
HTAAServer_clear ();
HTProgress ("Password cache flushed");
diff --git a/src/gui.h b/src/gui.h
index fd52882..6b4f52b 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/hdf-browse.c b/src/hdf-browse.c
index 51570ec..977973d 100644
--- a/src/hdf-browse.c
+++ b/src/hdf-browse.c
@@ -2,7 +2,7 @@
/*After much deliberation, it was decided NOT to Internationalize this file.*/
/*
-
+
This module provides access routines to take an HDF file and return an
HTML description of its contents.
@@ -13,7 +13,7 @@
The function hdfGrokReference() will return a description of what can
be "seen" from a given location in the file. Typically, this will be how
users can navigate their way through a forest of Vgroups.
-
+
*/
/*
@@ -117,7 +117,7 @@ int32 nt;
case DFNT_FLOAT32 : return("32-bit floating point numbers");
case DFNT_FLOAT64 : return("64-bit floating point numbers");
-
+
default : return("unknown number type");
}
@@ -139,7 +139,7 @@ int32 count;
{
intn i;
char * buffer;
-
+
if(nt == DFNT_CHAR) {
tbuff[count] = '\0';
return tbuff;
@@ -151,31 +151,31 @@ int32 count;
buffer[0] = '\0';
switch(nt) {
- case DFNT_INT8 :
- case DFNT_UINT8 :
+ case DFNT_INT8 :
+ case DFNT_UINT8 :
sprintf(buffer, "%d", ((int8 *)tbuff)[0]);
for(i = 1; i < count; i++)
sprintf(buffer, "%s, %d", buffer, ((int8 *)tbuff)[i]);
break;
- case DFNT_INT16 :
- case DFNT_UINT16 :
+ case DFNT_INT16 :
+ case DFNT_UINT16 :
sprintf(buffer, "%d", ((int16 *)tbuff)[0]);
for(i = 1; i < count; i++)
sprintf(buffer, "%s, %d", buffer, ((int16 *)tbuff)[i]);
break;
- case DFNT_INT32 :
- case DFNT_UINT32 :
+ case DFNT_INT32 :
+ case DFNT_UINT32 :
sprintf(buffer, "%d", ((int32 *)tbuff)[0]);
for(i = 1; i < count; i++)
sprintf(buffer, "%s, %d", buffer, ((int32 *)tbuff)[i]);
break;
- case DFNT_FLOAT32 :
+ case DFNT_FLOAT32 :
sprintf(buffer, "%f", ((float32 *)tbuff)[0]);
for(i = 1; i < count; i++)
sprintf(buffer, "%s, %f", buffer, ((float32 *)tbuff)[i]);
break;
- case DFNT_FLOAT64 :
- sprintf(buffer, "%f", ((float64 *)tbuff)[0]);
+ case DFNT_FLOAT64 :
+ sprintf(buffer, "%f", ((float64 *)tbuff)[0]);
for(i = 1; i < count; i++)
sprintf(buffer, "%s, %f", buffer, ((float64 *)tbuff)[i]);
break;
@@ -219,7 +219,7 @@ int32 num;
}
-/*
+/*
Print out the info for data sets in the file. This code is based on
the multi-file interface of HDF 3.3 so it is able to decode netCDF files
@@ -230,7 +230,7 @@ int32 num;
do_sds(char *fname)
#else
do_sds(fname)
-char *fname;
+char *fname;
#endif
{
@@ -263,8 +263,8 @@ char *fname;
if(dsets > MAX_DATASET_DISPLAY)
brief = TRUE;
- fprintf(fp, "There are %d dataset%s and %d global attribute%s in this file.\n",
- dsets, (dsets == 1 ? "" : "s"),
+ fprintf(fp, "There are %d dataset%s and %d global attribute%s in this file.
\n",
+ dsets, (dsets == 1 ? "" : "s"),
nattr, (nattr == 1 ? "" : "s"));
if(dsets) {
@@ -297,18 +297,18 @@ char *fname;
}
if(POWER_USER)
- fprintf(fp, "
%s(%s) rank %d : [",
+ fprintf(fp, " %s(%s) rank %d : [",
i, name, longname, rank);
else
- fprintf(fp, " Dataset %s(%s) has rank %d with dimensions [",
+ fprintf(fp, " Dataset %s(%s) has rank %d with dimensions [",
i, name, longname, rank);
}
else {
if(POWER_USER)
- fprintf(fp, " %s rank %d : [",
+ fprintf(fp, " %s rank %d : [",
i, name, rank);
else
- fprintf(fp, " Dataset %s has rank %d with dimensions [",
+ fprintf(fp, " Dataset %s has rank %d with dimensions [",
i, name, rank);
}
@@ -317,14 +317,14 @@ char *fname;
hdfXsds(name, rank);
#endif /* CHOUCK */
- for(j = 0; j < rank; j++)
+ for(j = 0; j < rank; j++)
if(j == 0)
fprintf(fp, "%d", dimsizes[j]);
else
fprintf(fp, ", %d", dimsizes[j]);
fprintf(fp, "]");
-
+
if(POWER_USER)
fprintf(fp, "; %s.\n", get_type(nt));
else
@@ -332,18 +332,18 @@ char *fname;
#ifdef HAVE_DTM
if (mo_dtm_out_active_p () && ((rank == 2) || (rank == 3)))
- fprintf (fp, "(To broadcast this dataset over DTM, click here.)\n",
+ fprintf (fp, "(To broadcast this dataset over DTM, click here.)\n",
(int32) DFTAG_NDG, i);
#endif
if(nattrs) {
if(brief || nattrs > MAX_ATTRIBUTE_DISPLAY) {
-
- fprintf(fp, "There %s %d attribute%s.\n",
- (nattrs == 1 ? "is" : "are"), nattrs, (int32) DFTAG_NDG, i,
+
+ fprintf(fp, "There %s %d attribute%s.\n",
+ (nattrs == 1 ? "is" : "are"), nattrs, (int32) DFTAG_NDG, i,
(nattrs == 1 ? "" : "s"));
} else {
-
+
if(POWER_USER)
fprintf(fp, "Attributes :\n");
else
@@ -354,17 +354,17 @@ char *fname;
char *valstr;
status = SDattrinfo(sds, j, name, &nt, &count);
if(status == FAIL) return;
-
+
valstr = get_attribute(sds, j, nt, count);
if(valstr == NULL) continue;
-
+
if(POWER_USER)
fprintf(fp, " %s : %s", name, valstr);
else
fprintf(fp, " Attribute %s has the value : %s", name, valstr);
HDfreespace((void *)valstr);
-
+
}
fprintf(fp, "\n");
}
@@ -395,7 +395,7 @@ char *fname;
fprintf(fp, " Attribute %s has the value : %s", name, valstr);
HDfreespace((void *)valstr);
-
+
}
fprintf(fp, "\n");
}
@@ -406,14 +406,14 @@ char *fname;
/*
-
+
If there are a lot of attributes we need to do them in a separate window
-
+
That's what this function is for
*/
do_attributes(char *fname, int index) {
-
+
char name[MAX_NC_NAME];
int32 nattrs, nt, dims[MAX_VAR_DIMS], rank, status;
int32 fid, sds;
@@ -436,27 +436,27 @@ do_attributes(char *fname, int index) {
char *valstr;
status = SDattrinfo(sds, j, name, &nt, &count);
if(status == FAIL) return;
-
+
valstr = get_attribute(sds, j, nt, count);
if(valstr == NULL) continue;
-
+
if(POWER_USER)
fprintf(fp, " %s : %s", name, valstr);
else
fprintf(fp, " Attribute %s has the value : %s", name, valstr);
HDfreespace((void *)valstr);
-
+
}
fprintf(fp, "\n");
}
-
+
SDend(fid);
} /* do_attributes */
-/*
+/*
Print out info about file ids and descriptions
@@ -465,7 +465,7 @@ do_attributes(char *fname, int index) {
do_fanns(int32 fid)
#else
do_fanns(fid)
-int32 fid;
+int32 fid;
#endif
{
char *buffer;
@@ -497,7 +497,7 @@ int32 fid;
if(status == FAIL) return;
buffer[len] = '\0';
- fprintf(fp, "Here is the file description: %s
\n", buffer);
+ fprintf(fp, "Here is the file description: %s
\n", buffer);
HDfreespace((void *)buffer);
@@ -529,7 +529,7 @@ char *name;
buffer = HDgetspace(len + 1);
if(buffer == NULL) return;
-
+
status = DFANgetlabel(fname, tag, ref, buffer, len + 1);
if(status == SUCCEED) {
name[0] = tolower(name[0]);
@@ -541,13 +541,13 @@ char *name;
}
HDfreespace((void *)buffer);
}
-
+
len = DFANgetdesclen(fname, tag, ref);
if(len > 0) {
-
+
buffer = HDgetspace(len + 1);
if(buffer == NULL) return;
-
+
status = DFANgetdesc(fname, tag, ref, buffer, len + 1);
if(status == SUCCEED) {
buffer[len] = '\0';
@@ -556,20 +556,20 @@ char *name;
}
HDfreespace((void *)buffer);
}
-
+
} /* print_desc */
-/*
+/*
- print out the info for RIGSs in the file
+ print out the info for RIGSs in the file
*/
#ifdef PROTOTYPE
do_rigs(char *fname)
#else
do_rigs(fname)
-char *fname;
+char *fname;
#endif
{
int32 count, i, ref, len;
@@ -586,35 +586,35 @@ char *fname;
fprintf(fp, "There is 1 image in this file :\n");
else
fprintf(fp, "There are %d images in this file :\n", count);
-
+
fprintf(fp, "\n");
for(i = 0; i < count; i++) {
status = DFR8getdims(fname, &w, &h, &ip);
if(status == FAIL) return;
-
+
ref = DFR8lastref();
if(ref == FAIL) return;
if(POWER_USER) {
- fprintf(fp, "- Image : [%d by %d]\n",
+ fprintf(fp, "
- Image : [%d by %d]\n",
(int32) DFTAG_RIG, ref, w, h);
-
+
if(w > hdfImageSize || h > hdfImageSize)
fprintf(fp, " (subsampled)");
-
+
if(ip) fprintf(fp, " has a palette\n");
fprintf(fp, ". ");
} else {
- fprintf(fp, "
- This image : has dimensions %d by %d\n",
+ fprintf(fp, "
- This image : has dimensions %d by %d\n",
(int32) DFTAG_RIG, ref, w, h);
-
+
if(w > hdfImageSize || h > hdfImageSize)
fprintf(fp, " (the image has been subsampled for display)");
fprintf(fp, ". ");
-
+
if(ip) fprintf(fp, "There is also a palette associated with this image.\n");
}
@@ -632,16 +632,16 @@ char *fname;
} /* do_rigs */
-/*
+/*
- print out the info for Palettes in the file
+ print out the info for Palettes in the file
*/
#ifdef PROTOTYPE
do_pals(char *fname)
#else
do_pals(fname)
-char *fname;
+char *fname;
#endif
{
int32 count, i, ref, len;
@@ -658,13 +658,13 @@ char *fname;
fprintf(fp, "There is 1 palette in this file :\n");
else
fprintf(fp, "There are %d palettes in this file :\n", count);
-
+
fprintf(fp, "
\n");
for(i = 0; i < count; i++) {
status = DFPgetpal(fname, pal);
if(status == FAIL) return;
-
+
ref = DFPlastref();
if(ref < 1) return;
@@ -700,46 +700,46 @@ int32 ref;
int32 intr, sz, cnt;
int32 nfields, single;
char * p, * q;
-
+
vd = VSattach(fid, ref, "r");
if(vd == FAIL) return;
-
+
VSinquire(vd, &cnt, &intr, fields, &sz, name);
VSgetclass(vd, class);
-
+
nfields = VFnfields(vd);
single = FALSE;
if((cnt == 1) && (nfields == 1))
single = TRUE;
if(name[0] == '\0') sprintf(name, "[no name value]");
-
+
fprintf(fp, "- Vdata %s", name);
if(class[0])
fprintf(fp, " of class %s", class);
if(!single)
fprintf(fp," contains %d record%s", cnt, (cnt == 1 ? "" : "s"));
fprintf(fp,". \n");
-
+
for(p = fields, q = padded_fields; *p; p++, q++) {
*q = *p;
if(*q == ',') *(++q) = ' ';
}
*q = '\0';
-
+
fprintf(fp, "This Vdata contains the field%s %s\n",
(nfields == 1 ? "" : "s"), padded_fields);
-
+
/* if there is a single field with one value print out its values */
if(single) {
-
+
uint8 *tbuff;
-
+
/* Attempted bugfix -- added 1 -- marca, 10:52pm sep 23. */
tbuff = (uint8 *)HDgetspace(VFfieldisize(vd, 0) + 1);
if(tbuff == NULL)
return;
-
+
VSsetfields(vd, fields);
VSread(vd, tbuff, 1, 0);
tbuff = buffer_to_string(tbuff, VFfieldtype(vd, 0), VFfieldorder(vd, 0));
@@ -748,7 +748,7 @@ int32 ref;
fprintf(fp, ": %s", tbuff);
HDfreespace((void *)tbuff);
}
-
+
}
fprintf(fp, ". \n");
@@ -781,22 +781,22 @@ int32 X;
vg = Vattach(fid, ref, "r");
if(vg == FAIL) return;
-
+
Vgetname(vg, name);
Vgetclass(vg, class);
count = Vntagrefs(vg);
-
+
if(name[0] == '\0') sprintf(name, "[no name value]");
if(class[0] == '\0') sprintf(class, "[no class value]");
-
- if(count)
+
+ if(count)
fprintf(fp, "
- Vgroup %s of class %s has %d element%s.\n",
DFTAG_VG, ref, name, class, count, (count == 1 ? "" : "s"));
-
+
else
fprintf(fp, "
- Vgroup %s of class %s is empty.\n",
name, class);
-
+
#ifdef CHOUCK
if(X)
hdfXvgroup(name, class, count);
@@ -807,7 +807,7 @@ int32 X;
} /* dump_vg */
-/*
+/*
print out the info for Vgroups in the file
If where is -1 print out info for the Vgroups we can see at the top level
@@ -837,11 +837,11 @@ int32 where;
int32 tag, ref, myref, intr, sz;
int any;
char name[VSNAMELENMAX], class[VSNAMELENMAX];
-
+
if(where == -1) {
-
+
if(Hnumber(fid, DFTAG_VG) < 1) return;
-
+
any = FALSE;
/* looking for top level VGroups */
@@ -885,18 +885,18 @@ int32 where;
} else {
/* looking for stuff inside a given VGroup */
-
+
vg = Vattach(fid, where, "r");
if(vg == FAIL) return;
Vgetname(vg, name);
Vgetclass(vg, class);
count = Vntagrefs(vg);
-
+
/* set up title and stuff */
fprintf(fp, "Vgroup: %s\n", name);
fprintf(fp, "
Vgroup %s
\n", name);
-
+
fprintf(fp, "This Vgroup is named %s and is of class %s.\n", name, class);
if(count == 0) {
@@ -908,7 +908,7 @@ int32 where;
fprintf(fp, "There is %d element in Vgroup %s : \n", count, name);
else
fprintf(fp, "There are %d elements in Vgroup %s : \n", count, name);
-
+
fprintf(fp, "\n");
for(i = 0; i < count; i++) {
@@ -927,44 +927,44 @@ int32 where;
int32 count, i, len;
int32 status, w, h;
intn ip;
-
+
DFR8readref(fname, (uint16) ref);
status = DFR8getdims(fname, &w, &h, &ip);
if(status == FAIL) return;
-
+
if(POWER_USER) {
- fprintf(fp, "- Image : [%d by %d]\n",
+ fprintf(fp, "
- Image : [%d by %d]\n",
(int32) DFTAG_RIG, ref, w, h);
-
+
if(w > hdfImageSize || h > hdfImageSize)
fprintf(fp, " (subsampled)");
-
+
if(ip) fprintf(fp, " has a palette\n");
-
+
fprintf(fp, ". ");
-
+
} else {
- fprintf(fp, "
- Nested Raster Image : has dimensions %d by %d\n",
+ fprintf(fp, "
- Nested Raster Image : has dimensions %d by %d\n",
(int32) DFTAG_RIG, ref, w, h);
-
+
if(w > hdfImageSize || h > hdfImageSize)
fprintf(fp, " (the image has been subsampled for display)");
fprintf(fp, ". ");
-
+
if(ip) fprintf(fp, "There is also a palette associated with this image.\n");
}
-
+
#ifdef HAVE_DTM
if (mo_dtm_out_active_p ())
fprintf (fp, "(To broadcast this image over DTM, click here.)\n", (int32) DFTAG_RIG, ref);
#endif
-
+
print_desc(fname, DFTAG_RIG, ref, strdup ("image"));
-
+
}
break;
-
+
default:
if(HDgettagsname((uint16)tag))
fprintf(fp, "
- HDF object : %s (Ref = %d)\n", HDgettagsname((uint16)tag), ref);
@@ -983,8 +983,8 @@ int32 where;
/*
-
- Process Vdatas that are visible from the top level
+
+ Process Vdatas that are visible from the top level
(i.e. they are not inside any Vgroups)
*/
@@ -1001,7 +1001,7 @@ int32 fid;
count = VSlone(fid, NULL, 0);
if(count < 1) return;
-
+
ids = (int32 *) HDgetspace(sizeof(int32) * count);
if(ids == NULL) return;
@@ -1011,10 +1011,10 @@ int32 fid;
fprintf(fp, "
Vdatas
\n");
fprintf(fp, "There are %d Vdatas visible at this level of the file.\n", count);
fprintf(fp, "\n");
-
- for(i = 0; i < count; i++)
+
+ for(i = 0; i < count; i++)
dump_vdata(fid, ids[i]);
-
+
fprintf(fp, "\n");
HDfreespace((void *)ids);
@@ -1065,7 +1065,7 @@ char *realname;
if(fid != FAIL) {
Vstart(fid);
-
+
/* Do file annotations */
do_fanns(fid);
@@ -1078,20 +1078,20 @@ char *realname;
/* Do RIGs */
do_rigs(fname);
-
+
/* Do Pals */
do_pals(fname);
-
+
/* Do Vgroups */
do_vgs(fid, fname, -1);
-
+
/* Do lone Vdatas */
do_lone_vds(fid);
-
+
/* close the file */
Vend(fid);
Hclose(fid);
-
+
}
#ifdef CHOUCK
@@ -1123,7 +1123,7 @@ char *realname;
}
return NULL;
-
+
} /* hdfGrokFile */
@@ -1154,12 +1154,12 @@ char *realname;
fprintf (fp, "This file was accessed as URL %s
\n", realname);
if(sscanf(ref, "tag=%d,ref=%d", &t, &r) == 2) {
-
+
switch((uint16) t) {
- case DFTAG_VG :
+ case DFTAG_VG :
fid = Hopen(fname, DFACC_RDONLY, 0);
if(fid == FAIL) return(NULL);
-
+
Vstart(fid);
do_vgs(fid, fname, r);
@@ -1180,7 +1180,7 @@ char *realname;
if(sscanf(ref, "fileImageHit?%d,%d", &x, &y) == 2) {
char *buf;
fprintf(fp, "
File Image Hit
\n");
- fprintf(fp, "We're sorry, but we really have no clue what is at location %d %d\n", x, y);
+ fprintf(fp, "We're sorry, but we really have no clue what is at location %d %d\n", x, y);
buf = malloc(100);
sprintf(buf, "#DataSet%d", 2);
@@ -1189,11 +1189,11 @@ char *realname;
} else {
fprintf(fp, "Sorry, Bad Reference
\n");
- fprintf(fp, "We're sorry, but reference %s is bad and we can't figure out what to do about it.\n",
+ fprintf(fp, "We're sorry, but reference %s is bad and we can't figure out what to do about it.
\n",
ref);
}
- }
-
+ }
+
fclose(fp);
fp = fopen(tmp, "r");
@@ -1217,9 +1217,9 @@ char *realname;
return(data);
}
-
+
return NULL;
-
+
} /* hdfGrokReference */
@@ -1227,7 +1227,7 @@ char *realname;
ImageInfo *hdfGetImage(char *filename, char *reference, int subsample)
returns an ImageInfo struct corresponding to the named reference,
- as in hdfGrokReference. If subsample == TRUE then subsample the
+ as in hdfGrokReference. If subsample == TRUE then subsample the
image to fit within a hdfImageSize X hdfImageSize box
Return the backgroud pixel's index in bg only if the file Image
@@ -1253,7 +1253,7 @@ intn *bg;
int32 status, w, h;
intn isp;
char pal[768];
-
+
Image = NULL;
#ifdef CHOUCK
@@ -1272,7 +1272,7 @@ intn *bg;
#endif
if((uint16)tag == DFTAG_RIG || (uint16)tag == DFTAG_RI8) {
-
+
status = DFR8readref(filename, (uint16) ref);
if(status == FAIL) return NULL;
@@ -1337,19 +1337,19 @@ intn *bg;
skip = max / hdfImageSize;
if(skip) {
-
+
/* allocate space for the data */
int i, j;
int cnt = 0;
- unsigned char * newSpace =
+ unsigned char * newSpace =
(unsigned char *) HDgetspace(max * max * sizeof(unsigned char));
if(newSpace == NULL) return NULL;
skip++;
for(j = 0; j < h; j += skip)
- for(i = 0; i < w; i += skip)
+ for(i = 0; i < w; i += skip)
newSpace[cnt++] = Image->image_data[i + j * w];
-
+
HDfreespace((void *)(Image->image_data));
Image->image_data = newSpace;
Image->height = h / skip;
@@ -1402,17 +1402,17 @@ intn *bg;
Image->reds [i] = (int)pal[i * 3] << 8;
Image->greens[i] = (int)pal[i * 3 + 1] << 8;
Image->blues [i] = (int)pal[i * 3 + 2] << 8;
- for(j = 0; j < h; j++)
+ for(j = 0; j < h; j++)
Image->image_data[i + j * 256] = i;
}
-
+
}
return Image;
}
-
+
} /* hdfGetImage */
@@ -1440,7 +1440,7 @@ int *bg;
} /* hdfGrokImage */
-
+
#ifdef HAVE_DTM
/* Send the referenced image over DTM. This is bad architecture.
But what else is new? */
@@ -1460,7 +1460,7 @@ char *reference;
/* Check for presence of DTM output port. */
if (!mo_dtm_out_active_p ())
return;
-
+
if(sscanf(reference, "tag=%d,ref=%d", &tag, &ref) == 2) {
if((uint16)tag == DFTAG_RIG) {
@@ -1478,7 +1478,7 @@ char *reference;
}
return;
}
-
+
if((uint16)tag == DFTAG_IP8) {
img = hdfGrokImage(filename, reference, NULL);
@@ -1507,19 +1507,19 @@ char *reference;
sds = SDselect(fid, (int32) ref);
if(sds == FAIL) return;
-
+
/* davet what the hell is this about ???? */
- if (!(d = DataNew()))
+ if (!(d = DataNew()))
return;
d->entity = ENT_Internal;
d->dot = DOT_Array;
-
+
/* get all basic meta-data */
sprintf(name, "(no name)");
SDgetinfo(sds, name, &(d->rank), d->dim, &nt, &nattr);
if((d->rank > 3) || (d->rank < 2)) return;
-
+
switch(nt) {
case DFNT_INT8:
case DFNT_UINT8:
@@ -1540,24 +1540,24 @@ char *reference;
d->dost = DOST_Double;
break;
}
-
+
/* set up the region we want to read */
for(i = 0; i < d->rank; i++) {
start[i] = 0;
end[i] = d->dim[i];
}
-
+
/* figger out how much space */
for(i = 0, size = 1; i < d->rank; i++)
size *= d->dim[i];
-
+
/* allocate storage to store the raw numbers */
if (!(d->data = (VOIDP) HDgetspace(size * DFKNTsize(nt))))
return;
/* read that crazy data */
SDreaddata(sds, start, NULL, end, d->data);
-
+
/* set the name */
if (d->label = (char *) MALLOC(strlen(name)+1)){
strcpy(d->label,name);
@@ -1565,14 +1565,14 @@ char *reference;
SDendaccess(sds);
SDend(fid);
-
+
/* swap numbers because Collage was written by a bunch of idiots */
for(i = 0; i < ( d->rank / 2 ); i++) {
tmp = d->dim[i];
d->dim[i] = d->dim[d->rank - i - 1];
d->dim[d->rank - i - 1] = tmp;
}
-
+
mo_dtm_send_dataset(d);
/* free it */
@@ -1621,8 +1621,8 @@ hdfStartImage()
*/
view = current_win->scrolled_win;
- /*
- * Remember the display
+ /*
+ * Remember the display
*/
dsp = XtDisplay(view);
@@ -1630,7 +1630,7 @@ hdfStartImage()
* Create the Graphics Context
*/
scrGC = XCreateGC(dsp, XtWindow(view), 0, NULL);
-
+
/*
* Create a ImSizexImSize pixmap to draw in, and clear it to the background
*/
@@ -1638,7 +1638,7 @@ hdfStartImage()
DefaultDepth(dsp, DefaultScreen(dsp)));
XSetForeground(dsp, scrGC, WhitePixel(dsp, DefaultScreen(dsp)));
XFillRectangle(dsp, scrPix, scrGC, 0, 0, ImSize, ImSize);
-
+
/*
* Prepare to draw our stuff in Black on White
*/
@@ -1654,10 +1654,10 @@ hdfStartImage()
argcnt = 0;
XtSetArg(arg[argcnt], XmNfontList, &font_list); argcnt++;
XtGetValues(view, arg, argcnt);
-
- if (font_list == (XmFontList)NULL)
+
+ if (font_list == (XmFontList)NULL)
return;
-
+
ret = XmFontListInitFontContext(&font_context, font_list);
if(ret == False)
return;
@@ -1676,7 +1676,7 @@ hdfStartImage()
#endif
-
+
} /* hdfStartImage */
@@ -1684,7 +1684,7 @@ hdfStartImage()
* Place drawing calls here.
* XDrawPoint, XDrawLine, XDrawArc, etc.
*/
-
+
#define sdsDepth 5
#define sdsWidth 35
#define sdsSep 20
@@ -1711,7 +1711,7 @@ hdfXsds(char *name, int32 rank)
y = sdsY; /* all SDSs on same line */
x = sdsSep + (sdsWidth + sdsSep) * sds;
- /*
+ /*
* Make sure our box is big enough by seeing how big the rank
* string is going to be
*/
@@ -1742,7 +1742,7 @@ hdfXsds(char *name, int32 rank)
Points[5].y = (short) y - sdsDepth + sz ;
Points[6].x = (short) x + sz;
Points[6].y = (short) y + sz;
-
+
XDrawLines(dsp, scrPix, scrGC, Points, 7, CoordModeOrigin);
XDrawRectangle(dsp, scrPix, scrGC, x, y, sz, sz);
@@ -1773,10 +1773,10 @@ hdfXsds(char *name, int32 rank)
/*
Draw a Vgroup object into our image
-
+
*/
void
-hdfXvgroup(char *name, char *class, int32 count)
+hdfXvgroup(char *name, char *class, int32 count)
{
char classString[512];
char nameString[512];
@@ -1790,14 +1790,14 @@ hdfXvgroup(char *name, char *class, int32 count)
y = vgroupY; /* all Vgroups on same line */
x = sdsSep + (vgroupWidth + sdsSep) * vgroups;
- /*
+ /*
* Make sure our box is big enough by seeing how big the name
* string is going to be
*/
sprintf(nameString, "%s", name);
if(strlen(nameString) > 7)
nameString[7] = '\0';
-
+
XTextExtents(myFont, nameString, strlen(nameString), &dir, &asc, &des, &overall);
height = asc + des;
width = overall.width;
@@ -1846,9 +1846,9 @@ hdfEndImage()
/* XtVaGetValues (view, XtNforeground, &fg_pixel, XtNbackground, &bg_pixel, NULL); */
-
-
+
+
scrImage = XGetImage(dsp, scrPix, 0, 0, ImSize, ImSize,
AllPlanes, ZPixmap);
XFreePixmap(dsp, scrPix);
@@ -1896,7 +1896,7 @@ hdfEndImage()
ImageInfo *
-hdfFetchImage(intn *bg)
+hdfFetchImage(intn *bg)
{
if(bg) *bg = 0;
return (img);
diff --git a/src/hdf-browse.h b/src/hdf-browse.h
index 2012295..3eaf8ed 100644
--- a/src/hdf-browse.h
+++ b/src/hdf-browse.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/history.c b/src/history.c
index 356c448..5deb336 100644
--- a/src/history.c
+++ b/src/history.c
@@ -187,11 +187,11 @@ mo_status mo_add_node_to_history (mo_window *win, mo_node *node)
if (win->history_list)
{
- XmString xmstr =
+ XmString xmstr =
XmxMakeXmstrFromString(
get_pref_boolean(eDISPLAY_URLS_NOT_TITLES) ?
node->url : node->title);
- XmListAddItemUnselected
+ XmListAddItemUnselected
(win->history_list, xmstr, node->position);
XmStringFree (xmstr);
}
@@ -228,14 +228,14 @@ static char *mo_grok_alternate_title (char *url, char *ref)
if (foo2)
{
char *server = (char *) malloc ((foo2 - foo1 + 2));
-
+
/* bcopy (foo1, server, (foo2 - foo1));*/
memcpy(server, foo1, (foo2 - foo1));
server[(foo2 - foo1)] = '\0';
-
+
title = (char *) malloc ((strlen (server) + 32) * sizeof (char));
sprintf (title, "%s %s", "Gopher server at" , server);
-
+
/* OK, we got a title... */
free (server);
@@ -252,7 +252,7 @@ static char *mo_grok_alternate_title (char *url, char *ref)
/* If we got here, assume we should use 'ref' if possible
for the WAIS title. */
- if (!strncmp (url, "wais:", 5) ||
+ if (!strncmp (url, "wais:", 5) ||
!strncmp (url, "http://info.cern.ch:8001/", 25) ||
!strncmp (url, "http://info.cern.ch.:8001/", 26) ||
!strncmp (url, "http://www.ncsa.uiuc.edu:8001/", 30))
@@ -273,14 +273,14 @@ static char *mo_grok_alternate_title (char *url, char *ref)
if (foo2)
{
char *server = (char *) malloc ((foo2 - foo1 + 2));
-
+
/* bcopy (foo1, server, (foo2 - foo1));*/
memcpy(server, foo1, (foo2 - foo1));
server[(foo2 - foo1)] = '\0';
-
+
title = (char *) malloc ((strlen (server) + 32) * sizeof (char));
sprintf (title, "%s %s", "WAIS server at" , server);
-
+
/* OK, we got a title... */
free (server);
@@ -302,7 +302,7 @@ static char *mo_grok_alternate_title (char *url, char *ref)
{
/* It's a news article. */
foo1 = url + 5;
-
+
title = (char *)malloc ((strlen (foo1) + 32) * sizeof (char));
sprintf (title, "%s %s", "USENET article" , foo1);
@@ -312,7 +312,7 @@ static char *mo_grok_alternate_title (char *url, char *ref)
{
/* It's a newsgroup. */
foo1 = url + 5;
-
+
title = (char *)malloc ((strlen (foo1) + 32) * sizeof (char));
sprintf (title, "%s %s", "USENET newsgroup" , foo1);
@@ -327,51 +327,51 @@ static char *mo_grok_alternate_title (char *url, char *ref)
{
/* It's a local file. */
foo1 = url + 7;
-
+
title = (char *)malloc ((strlen (foo1) + 32) * sizeof (char));
sprintf (title, "%s %s", "Local file" , foo1);
-
+
goto done;
}
else if (strncmp (url, "file://localhost/", 17) == 0)
{
/* It's a local file. */
foo1 = url + 16;
-
+
title = (char *)malloc ((strlen (foo1) + 32) * sizeof (char));
sprintf (title, "%s %s", "Local file" , foo1);
-
+
goto done;
}
else
{
/* It's a remote file. */
foo1 = url + 7;
-
+
title = (char *)malloc ((strlen (foo1) + 32) * sizeof (char));
sprintf (title, "%s %s", "Remote file" , foo1);
-
+
goto done;
}
}
-
+
if (!strncmp (url, "ftp:", 4))
{
{
/* It's a remote file. */
foo1 = url + 6;
-
+
title = (char *)malloc ((strlen (foo1) + 32) * sizeof (char));
sprintf (title, "%s %s", "Remote file" , foo1);
-
+
goto done;
}
}
-
+
/* Punt... */
title = (char *) malloc ((strlen (url) + 24) * sizeof (char));
sprintf (title, "%s %s", "Untitled" , url);
-
+
done:
return title;
}
@@ -413,7 +413,7 @@ extern int securityType;
to figure out what the title is, and call mo_node_to_history
to add the new mo_node to both the window's data structures and
to its Motif history list. */
-mo_status mo_record_visit (mo_window *win, char *url, char *newtext,
+mo_status mo_record_visit (mo_window *win, char *url, char *newtext,
char *newtexthead, char *ref,
char *last_modified, char *expires)
{
@@ -483,7 +483,7 @@ mo_status mo_forward_node (mo_window *win)
mo_status mo_visit_position (mo_window *win, int pos)
{
mo_node *node;
-
+
for (node = win->history; node != NULL; node = node->next)
{
if (node->position == pos)
@@ -528,7 +528,7 @@ mo_status mo_dump_history (mo_window *win)
#endif
return mo_succeed;
-}
+}
/* ------------------------------------------------------------------------ */
/* ----------------------------- HISTORY GUI ------------------------------ */
@@ -539,17 +539,17 @@ mo_status mo_dump_history (mo_window *win)
static void mo_load_history_list (mo_window *win, Widget list)
{
mo_node *node;
-
+
for (node = win->history; node != NULL; node = node->next)
{
- XmString xmstr =
+ XmString xmstr =
XmxMakeXmstrFromString (get_pref_boolean(eDISPLAY_URLS_NOT_TITLES) ?
node->url : node->title);
- XmListAddItemUnselected
+ XmListAddItemUnselected
(list, xmstr, 0);
XmStringFree (xmstr);
}
-
+
XmListSetBottomPos (list, 0);
if (win->current_node)
XmListSelectPos (win->history_list, win->current_node->position, False);
@@ -587,20 +587,20 @@ static XmxCallback (mailhist_win_cb)
{
mo_node *node;
-
+
fprintf (fp, "\n");
fprintf (fp, "
History Path From %s
\n",
get_pref_string(eDEFAULT_AUTHOR_NAME));
fprintf (fp, "\n");
for (node = win->history; node != NULL; node = node->next)
{
- fprintf (fp, "- %s\n
- %s\n",
+ fprintf (fp, "
- %s\n
- %s\n",
node->title, node->url, node->url);
}
fprintf (fp, "
\n");
fprintf (fp, "\n");
}
-
+
mo_finish_sending_mail_message ();
oops:
@@ -608,7 +608,7 @@ static XmxCallback (mailhist_win_cb)
free (subj);
mo_not_busy ();
-
+
break;
case 1:
XtUnmanageChild (win->mailhist_win);
@@ -616,8 +616,8 @@ static XmxCallback (mailhist_win_cb)
break;
case 2:
mo_open_another_window
- (win,
- mo_assemble_help_url ("help-on-nested-hotlists.html"),
+ (win,
+ mo_assemble_help_url ("help-on-nested-hotlists.html"),
NULL, NULL);
break;
}
@@ -636,30 +636,30 @@ static mo_status mo_post_mailhist_win (mo_window *win)
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget mailhist_form, to_label, subj_label;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->mailhist_win = XmxMakeFormDialog
+ win->mailhist_win = XmxMakeFormDialog
(win->history_win, "NCSA Mosaic: Mail Window History" );
dialog_frame = XmxMakeFrame (win->mailhist_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
mailhist_form = XmxMakeForm (dialog_frame);
-
+
to_label = XmxMakeLabel (mailhist_form, "Mail To:" );
XmxSetArg (XmNwidth, 335);
win->mailhist_to_text = XmxMakeTextField (mailhist_form);
-
+
subj_label = XmxMakeLabel (mailhist_form, "Subject:" );
win->mailhist_subj_text = XmxMakeTextField (mailhist_form);
dialog_sep = XmxMakeHorizontalSeparator (mailhist_form);
-
+
buttons_form = XmxMakeFormAndThreeButtons
(mailhist_form, mailhist_win_cb, "Mail" ,
"Dismiss" , "Help..." , 0, 1, 2);
@@ -676,28 +676,28 @@ static mo_status mo_post_mailhist_win (mo_window *win)
XmxSetOffsets (subj_label, 14, 0, 10, 0);
XmxSetConstraints
- (subj_label, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
+ (subj_label, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE,
win->mailhist_to_text, NULL, NULL, NULL);
XmxSetOffsets (win->mailhist_subj_text, 10, 0, 5, 10);
XmxSetConstraints
- (win->mailhist_subj_text, XmATTACH_WIDGET, XmATTACH_NONE,
+ (win->mailhist_subj_text, XmATTACH_WIDGET, XmATTACH_NONE,
XmATTACH_WIDGET,
XmATTACH_FORM, win->mailhist_to_text, NULL, subj_label, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
win->mailhist_subj_text, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XtManageChild (win->mailhist_win);
-
+
return mo_succeed;
}
@@ -718,7 +718,7 @@ static XmxCallback (history_win_cb)
break;
case 2:
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("docview-menubar-navigate.html#history"),
NULL, NULL);
break;
@@ -731,7 +731,7 @@ static XmxCallback (history_list_cb)
{
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
XmListCallbackStruct *cs = (XmListCallbackStruct *)call_data;
-
+
mo_visit_position (win, cs->item_position);
return;
@@ -751,18 +751,18 @@ mo_status mo_post_history_win (mo_window *win)
~Shift ~Ctrl ~Meta ~Alt : ListEndSelect() ListKbdActivate()";
listTable = XtParseTranslationTable(listTranslations);
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->history_win = XmxMakeFormDialog
+ win->history_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Window History" );
dialog_frame = XmxMakeFrame (win->history_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
history_form = XmxMakeForm (dialog_frame);
@@ -775,17 +775,17 @@ mo_status mo_post_history_win (mo_window *win)
XmxSetArg (XmNlistSizePolicy, XmCONSTANT);
XmxSetArg (XmNwidth, 380);
XmxSetArg (XmNheight, 184);
- win->history_list = XmxMakeScrolledList
+ win->history_list = XmxMakeScrolledList
(history_form, history_list_cb, 0);
XtAugmentTranslations (win->history_list, listTable);
dialog_sep = XmxMakeHorizontalSeparator (history_form);
-
+
buttons_form = XmxMakeFormAndThreeButtons(history_form,
history_win_cb,
"Mail To...",
- "Dismiss",
- "Help...",
+ "Dismiss",
+ "Help...",
1,
0,
2);
@@ -798,16 +798,16 @@ mo_status mo_post_history_win (mo_window *win)
/* History list is stretchable. */
XmxSetOffsets (XtParent (win->history_list), 0, 10, 10, 10);
XmxSetConstraints
- (XtParent (win->history_list),
- XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
+ (XtParent (win->history_list),
+ XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
history_label, dialog_sep, NULL, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep,
+ XmxSetConstraints
+ (dialog_sep,
XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
NULL, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
@@ -816,6 +816,6 @@ mo_status mo_post_history_win (mo_window *win)
}
XmxManageRemanage (win->history_win);
-
+
return mo_succeed;
}
diff --git a/src/history.h b/src/history.h
index f405613..0576479 100644
--- a/src/history.h
+++ b/src/history.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
@@ -71,7 +71,7 @@ mo_status mo_kill_node (mo_window *, mo_node *);
mo_status mo_kill_node_descendents (mo_window *, mo_node *);
mo_status mo_add_node_to_history (mo_window *, mo_node *);
char *mo_grok_title (mo_window *, char *, char *);
-mo_status mo_record_visit (mo_window *, char *, char *,
+mo_status mo_record_visit (mo_window *, char *, char *,
char *, char *, char *, char *);
mo_status mo_back_node (mo_window *);
mo_status mo_forward_node (mo_window *);
diff --git a/src/hotfile.c b/src/hotfile.c
index 9aefe4c..49826e5 100644
--- a/src/hotfile.c
+++ b/src/hotfile.c
@@ -186,7 +186,7 @@ static void mo_parse_hotlist_list(mo_hotlist *list, struct mark_up **current)
char *url = NULL, *title = NULL, *rbm=NULL;
struct mark_up *mptr;
int done = 0;
-
+
for (mptr = *current; mptr != NULL && !done; mptr && (mptr = mptr->next))
switch (mptr->type)
{
@@ -439,13 +439,13 @@ mo_status mo_write_hotlist (mo_hotlist *list, FILE *fp)
fputs("Hotlist from ", fp);
if (!get_pref_string(eDEFAULT_AUTHOR_NAME)) {
- fputExpanded("Unknown", fp);
+ fputExpanded("Unknown", fp);
}
else {
- fputExpanded(get_pref_string(eDEFAULT_AUTHOR_NAME), fp);
+ fputExpanded(get_pref_string(eDEFAULT_AUTHOR_NAME), fp);
}
fputs("\n", fp);
-
+
mo_write_list_r(list, fp);
fputs("\n", fp);
diff --git a/src/hotfile.h b/src/hotfile.h
index 8876fb2..3c9bebd 100644
--- a/src/hotfile.h
+++ b/src/hotfile.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/hotlist.c b/src/hotlist.c
index c6d8a0d..15cd0fd 100644
--- a/src/hotlist.c
+++ b/src/hotlist.c
@@ -77,11 +77,11 @@ void mo_reinit_hotmenu();
/* This file provides support for hotlists of interesting
documents within the browser.
-
+
Initially there will be a single hotlist, 'Default'.
The old hotlist file format look like this:
-
+
ncsa-mosaic-hotlist-format-1 [identifying string]
Default [title]
url Fri Sep 13 00:00:00 1986 [first word is url;
@@ -90,7 +90,7 @@ void mo_reinit_hotmenu();
document title cached here [cached title for above]
[2-line sequence for single document repeated as necessary]
...
-
+
Turns out this format is bad for two reasons:
(1) Document titles can have embedded carriage returns (usually
on purpose).
@@ -171,14 +171,14 @@ void mo_append_item_to_hotlist (mo_hotlist *list,
node->any.previous = list->nodelist_last;
node->any.next = 0;
node->any.position = node->any.previous->any.position + 1;
-
+
/* Now point forward from previous nodelist_last. */
list->nodelist_last->any.next = node;
-
+
/* Now set up new nodelist_last. */
list->nodelist_last = node;
}
-
+
return;
}
@@ -244,11 +244,11 @@ static void mo_recalculate_hotlist_positions (mo_hotlist *list)
{
mo_hot_item *hotnode;
int count = 1;
-
+
for (hotnode = list->nodelist; hotnode != NULL;
hotnode = hotnode->any.next)
hotnode->any.position = count++;
-
+
return;
}
@@ -397,7 +397,7 @@ static void mo_gui_add_hot_item (mo_hotlist *list, mo_hot_item *item)
(highlight = mo_highlight_hotlist(&item->list)));
if (item->type == mo_t_list && highlight)
free(highlight);
- XmListAddItemUnselected
+ XmListAddItemUnselected
(win->hotlist_list,
xmstr,
item->any.position);
@@ -460,9 +460,9 @@ mo_status mo_add_item_to_hotlist (mo_hotlist *list, mo_item_type type,
mo_insert_item_in_hotlist(list, item, position);
else
mo_append_item_to_hotlist (list, item);
-
+
mo_gui_add_hot_item (list, item);
-
+
return mo_succeed;
}
@@ -476,21 +476,21 @@ mo_status mo_add_item_to_hotlist (mo_hotlist *list, mo_item_type type,
static void mo_load_hotlist_list (mo_window *win, Widget list)
{
mo_hot_item *node;
-
+
if (win->edithot_win && XtIsManaged(win->edithot_win))
XtUnmanageChild (win->edithot_win);
for (node = win->current_hotlist->nodelist; node != NULL;
node = node->any.next)
{
char *highlight = NULL;
- XmString xmstr =
+ XmString xmstr =
XmxMakeXmstrFromString
(node->type == mo_t_url ?
(get_pref_boolean(eDISPLAY_URLS_NOT_TITLES) ? node->hot.url : node->hot.title) :
(highlight = mo_highlight_hotlist(&node->list)));
if (node->type == mo_t_list && highlight)
free(highlight);
- XmListAddItemUnselected
+ XmListAddItemUnselected
(list, xmstr, 0);
XmStringFree (xmstr);
}
@@ -531,7 +531,7 @@ static void mo_visit_hotlist_position (mo_window *win, int position)
static XmxCallback (edit_or_insert_hot_cb)
{
- mo_window *win = mo_fetch_window_by_id
+ mo_window *win = mo_fetch_window_by_id
(XmxExtractUniqid ((int)client_data));
char *title;
edit_or_insert_hot_info *eht_info;
@@ -546,13 +546,13 @@ static XmxCallback (edit_or_insert_hot_cb)
Xmx_n = 0;
XtUnmanageChild (win->edithot_win);
title = XmxTextGetString (eht_info->title_text);
-
+
{
/* OK, now position is still cached in win->edithot_pos. */
mo_hotlist *list = win->current_hotlist;
mo_hot_item *hotnode;
mo_window *w = NULL;
-
+
FindHotFromPos(hotnode, list, eht_info->pos);
if (hotnode == NULL)
@@ -588,17 +588,17 @@ static XmxCallback (edit_or_insert_hot_cb)
hotnode->any.position);
#ifndef DISABLE_TRACE
if (srcTrace) {
- fprintf (stderr,
+ fprintf (stderr,
"w->hotlist_list 0x%08x, xmstr 0x%08x, hotnode->position %d\n",
- w->hotlist_list,
- xmstr,
+ w->hotlist_list,
+ xmstr,
hotnode->any.position);
}
#endif
/* There is what appears to be a Motif UMR here... */
- XmListAddItemUnselected
- (w->hotlist_list,
- xmstr,
+ XmListAddItemUnselected
+ (w->hotlist_list,
+ xmstr,
hotnode->any.position);
XmStringFree (xmstr);
}
@@ -610,7 +610,7 @@ static XmxCallback (edit_or_insert_hot_cb)
free(path);
}
}
-
+
/* That's it! */
}
punt:
@@ -689,8 +689,8 @@ static XmxCallback (edit_or_insert_hot_cb)
case 2: /* Help... (Edit) */
case 5: /* Help... (Insert) */
mo_open_another_window
- (win,
- mo_assemble_help_url ("help-on-hotlist-view.html"),
+ (win,
+ mo_assemble_help_url ("help-on-hotlist-view.html"),
NULL, NULL);
break;
}
@@ -732,12 +732,12 @@ static mo_status mo_create_ed_or_ins_hot_win (mo_window *win, int isInsert)
Widget eht_form, title_label, url_label, url_val, sep2;
edit_or_insert_hot_info *eht_info;
Widget togm, togm2, insert_tog, append_tog;
-
+
XmxSetUniqid (win->id);
eht_info = (edit_or_insert_hot_info *)
malloc(sizeof(edit_or_insert_hot_info));
XmxSetArg (XmNuserData, (XtArgVal)eht_info);
- ed_or_ins_w = XmxMakeFormDialog
+ ed_or_ins_w = XmxMakeFormDialog
(win->hotlist_win, isInsert ? "NCSA Mosaic: Insert Hotlist Entry" :
"NCSA Mosaic: Edit Hotlist Entry" );
XtAddCallback(ed_or_ins_w, XmNdestroyCallback, mo_destroy_hot,
@@ -751,19 +751,19 @@ static mo_status mo_create_ed_or_ins_hot_win (mo_window *win, int isInsert)
dialog_frame = XmxMakeFrame (ed_or_ins_w, XmxShadowOut);
/* Constraints for ed_or_ins_w. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
eht_form = XmxMakeForm (dialog_frame);
-
+
title_label = XmxMakeLabel (eht_form, "Entry Title:" );
XmxSetArg (XmNwidth, 335);
eht_info->title_text = XmxMakeTextField (eht_form);
XmxAddCallbackToText (eht_info->title_text, edit_or_insert_hot_cb,
isInsert*3);
-
+
eht_info->url_lab =
url_label = XmxMakeLabel (eht_form, "URL:" );
@@ -803,12 +803,12 @@ static mo_status mo_create_ed_or_ins_hot_win (mo_window *win, int isInsert)
XmNset, True, NULL);
sep2 = XmxMakeHorizontalSeparator (eht_form);
}
-
+
buttons_form = XmxMakeFormAndThreeButtons
- (eht_form, edit_or_insert_hot_cb, "Save" ,
+ (eht_form, edit_or_insert_hot_cb, "Save" ,
"Dismiss" , "Help..." ,
isInsert*3, isInsert*3+1, isInsert*3+2);
-
+
/* Constraints for eht_form. */
XmxSetOffsets (title_label, 14, 0, 10, 0);
XmxSetConstraints
@@ -818,7 +818,7 @@ static mo_status mo_create_ed_or_ins_hot_win (mo_window *win, int isInsert)
XmxSetConstraints
(eht_info->title_text, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_WIDGET,
XmATTACH_FORM, NULL, NULL, title_label, NULL);
-
+
XmxSetOffsets (url_label, 12, 0, 10, 0);
XmxSetConstraints
(url_label, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_NONE,
@@ -829,8 +829,8 @@ static mo_status mo_create_ed_or_ins_hot_win (mo_window *win, int isInsert)
XmATTACH_FORM, title_label, NULL, url_label, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
url_val, isInsert ? togm : buttons_form, NULL, NULL);
if (isInsert)
@@ -851,15 +851,15 @@ static mo_status mo_create_ed_or_ins_hot_win (mo_window *win, int isInsert)
(sep2, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM, NULL, buttons_form, NULL, NULL);
}
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
-
+
return mo_succeed;
}
-
+
static mo_status mo_do_edit_hotnode_title_win (mo_window *win, mo_hot_item
*item, int position)
{
@@ -868,7 +868,7 @@ static mo_status mo_do_edit_hotnode_title_win (mo_window *win, mo_hot_item
/* This shouldn't happen. */
if (!win->hotlist_win)
return mo_fail;
-
+
if (!win->edithot_win)
mo_create_ed_or_ins_hot_win (win, 0);
@@ -880,7 +880,7 @@ static mo_status mo_do_edit_hotnode_title_win (mo_window *win, mo_hot_item
/* Manage the little sucker. */
XmxManageRemanage (win->edithot_win);
-
+
/* Insert this title as a starting point. */
XmxTextSetString (eht_info->title_text, item->hot.title);
@@ -915,7 +915,7 @@ static mo_status mo_edit_title_in_current_hotlist (mo_window *win,
{
mo_hotlist *list = win->current_hotlist;
mo_hot_item *hotnode;
-
+
FindHotFromPos(hotnode, list, position);
/* OK, now we have hotnode loaded. */
@@ -963,7 +963,7 @@ static mo_status mo_rbm_toggle_in_hotlist(mo_window *win,int position) {
mo_hotlist *list = win->current_hotlist;
mo_hot_item *hotnode;
-
+
FindHotFromPos(hotnode, list, position);
if (!hotnode) { /* How did this happen? */
@@ -1038,7 +1038,7 @@ static void mo_insert_item_in_current_hotlist(mo_window *win)
}
mo_reinit_hotmenu();
-
+
}
@@ -1049,7 +1049,7 @@ static void mo_insert_item_in_current_hotlist(mo_window *win)
static mo_root_hotlist *mo_new_root_hotlist (char *filename, char *title)
{
mo_root_hotlist *list;
-
+
list = (mo_root_hotlist *)malloc (sizeof (mo_root_hotlist));
list->type = mo_t_list;
list->nodelist = list->nodelist_last = 0;
@@ -1194,9 +1194,9 @@ static mo_root_hotlist *mo_read_hotlist (char *filename, char *home)
/* amb - display update message for 2.4 users */
{
- fputs("Your hotlist file has been updated and is now saved as:\n",
+ fputs("Your hotlist file has been updated and is now saved as:\n",
stderr);
- fputs(filename, stderr);
+ fputs(filename, stderr);
putc('\n', stderr);
}
/* Hey, whaddaya know, it is. */
@@ -1206,11 +1206,11 @@ static mo_root_hotlist *mo_read_hotlist (char *filename, char *home)
while (1)
{
mo_hotnode *node;
-
+
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
goto done;
-
+
/* We've got a new node. */
node = (mo_hotnode *)malloc (sizeof (mo_hotnode));
node->type = mo_t_url;
@@ -1237,16 +1237,16 @@ static mo_root_hotlist *mo_read_hotlist (char *filename, char *home)
free (node);
goto done;
}
-
+
node->title = strtok (line, "\n");
if (!node->title)
goto screwed_open_file;
node->title = strdup (node->title);
mo_convert_newlines_to_spaces (node->title);
-
+
mo_append_item_to_hotlist ((mo_hotlist *)list, (mo_hot_item *)node);
}
-
+
done:
fclose (fp);
return list;
@@ -1285,12 +1285,12 @@ mo_status mo_dump_hotlist (mo_hotlist *list)
Upon program startup an attempt will be made to load it out
of its file; if this attempt isn't successful, it just plain
doesn't exist yet. Bummer.
-
+
Upon program exit it will be stored to its file.
*/
/*
- * Called on initialization.
+ * Called on initialization.
* Tries to load the default hotlist.
*/
mo_status mo_setup_default_hotlist (void)
@@ -1299,12 +1299,12 @@ mo_status mo_setup_default_hotlist (void)
char *default_filename = get_pref_string(eDEFAULT_HOTLIST_FILE);
char *hot_filename = get_pref_string(eDEFAULT_HOT_FILE);
char *filename;
-
+
/* This shouldn't happen. */
if (!home)
home = "/tmp";
-
- filename = (char *)malloc
+
+ filename = (char *)malloc
((strlen (home) + strlen (default_filename) + 8) * sizeof (char));
sprintf (filename, "%s/%s", home, default_filename);
@@ -1318,12 +1318,12 @@ mo_status mo_setup_default_hotlist (void)
/* sprintf(filename, "%s/%s.html", home, default_filename); */
/* New hotlist format... SWP */
free(filename);
- filename = (char *)malloc
+ filename = (char *)malloc
((strlen (home) + strlen (hot_filename) + 8) * sizeof (char));
sprintf (filename, "%s/%s", home, hot_filename);
default_hotlist = mo_new_root_hotlist (filename, "Default");
}
-
+
return mo_succeed;
}
@@ -1509,7 +1509,7 @@ static void delete_hot_from_list (mo_hotlist *list, mo_hot_item *hotnode,
free (hotnode);
/* Recalculate positions in this hotlist. */
mo_recalculate_hotlist_positions (list);
-
+
/* Do the GUI stuff. */
while (win = mo_next_window (win))
{
@@ -1519,12 +1519,12 @@ static void delete_hot_from_list (mo_hotlist *list, mo_hot_item *hotnode,
win->hot_cut_buffer = NULL;
}
mo_reinit_hotmenu();
-
+
}
static XmxCallback (remove_confirm_cb)
{
- mo_window *win = mo_fetch_window_by_id
+ mo_window *win = mo_fetch_window_by_id
(XmxExtractUniqid ((int)client_data));
int position = XmxExtractToken ((int)client_data);
@@ -1543,12 +1543,12 @@ static mo_status mo_delete_position_from_current_hotlist (mo_window *win,
{
mo_hotlist *list = win->current_hotlist;
mo_hot_item *hotnode;
-
+
FindHotFromPos(hotnode, list, position);
if (hotnode == NULL)
return mo_fail;
-
+
/* OK, now we have hotnode loaded. */
if (hotnode->type == mo_t_list)
@@ -1586,7 +1586,7 @@ static mo_status mo_delete_position_from_current_hotlist (mo_window *win,
static XmxCallback (mailhot_win_cb)
{
- mo_window *win = mo_fetch_window_by_id
+ mo_window *win = mo_fetch_window_by_id
(XmxExtractUniqid ((int)client_data));
char *to, *subj;
FILE *fp;
@@ -1616,13 +1616,13 @@ static XmxCallback (mailhot_win_cb)
}
mo_finish_sending_mail_message ();
-
+
oops:
free (to);
free (subj);
mo_not_busy ();
-
+
break;
case 1:
XtUnmanageChild (win->mailhot_win);
@@ -1630,8 +1630,8 @@ static XmxCallback (mailhot_win_cb)
break;
case 2:
mo_open_another_window
- (win,
- mo_assemble_help_url ("help-on-hotlist-view.html"),
+ (win,
+ mo_assemble_help_url ("help-on-hotlist-view.html"),
NULL, NULL);
break;
}
@@ -1650,32 +1650,32 @@ static mo_status mo_post_mailhot_win (mo_window *win)
Widget dialog_frame;
Widget dialog_sep, buttons_form;
Widget mailhot_form, to_label, subj_label;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->mailhot_win = XmxMakeFormDialog
+ win->mailhot_win = XmxMakeFormDialog
(win->hotlist_win, "NCSA Mosaic: Mail Hotlist" );
dialog_frame = XmxMakeFrame (win->mailhot_win, XmxShadowOut);
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
mailhot_form = XmxMakeForm (dialog_frame);
-
+
to_label = XmxMakeLabel (mailhot_form, "Mail To:" );
XmxSetArg (XmNwidth, 335);
win->mailhot_to_text = XmxMakeTextField (mailhot_form);
-
+
subj_label = XmxMakeLabel (mailhot_form, "Subject:" );
win->mailhot_subj_text = XmxMakeTextField (mailhot_form);
dialog_sep = XmxMakeHorizontalSeparator (mailhot_form);
-
+
buttons_form = XmxMakeFormAndThreeButtons
- (mailhot_form, mailhot_win_cb, "Mail" ,
+ (mailhot_form, mailhot_win_cb, "Mail" ,
"Dismiss" , "Help..." , 0, 1, 2);
/* Constraints for mailhot_form. */
@@ -1690,28 +1690,28 @@ static mo_status mo_post_mailhot_win (mo_window *win)
XmxSetOffsets (subj_label, 14, 0, 10, 0);
XmxSetConstraints
- (subj_label, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
+ (subj_label, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE,
win->mailhot_to_text, NULL, NULL, NULL);
XmxSetOffsets (win->mailhot_subj_text, 10, 0, 5, 10);
XmxSetConstraints
- (win->mailhot_subj_text, XmATTACH_WIDGET,
+ (win->mailhot_subj_text, XmATTACH_WIDGET,
XmATTACH_NONE, XmATTACH_WIDGET,
XmATTACH_FORM, win->mailhot_to_text, NULL, subj_label, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
win->mailhot_subj_text, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
}
-
+
XtManageChild (win->mailhot_win);
-
+
return mo_succeed;
}
@@ -1769,7 +1769,7 @@ static XmxCallback (hotlist_win_cb)
break;
case 2:
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("help-on-hotlist-view.html"),
NULL, NULL);
break;
@@ -1963,9 +1963,9 @@ static XmxCallback (hotlist_list_cb)
URL_Include_Set(win,0,0);
mo_visit_hotlist_position (win, cs->item_position);
-
+
/* Don't unmanage the list. */
-
+
return;
}
@@ -1993,15 +1993,15 @@ mo_status mo_post_hotlist_win (mo_window *win)
XmxSetUniqid (win->id);
XmxSetArg (XmNwidth, 475);
XmxSetArg (XmNheight, 342);
- win->hotlist_win = XmxMakeFormDialog
+ win->hotlist_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Hotlist View" );
dialog_frame = XmxMakeFrame (win->hotlist_win, XmxShadowOut);
-
+
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
hotlist_form = XmxMakeForm (dialog_frame);
@@ -2013,10 +2013,10 @@ mo_status mo_post_hotlist_win (mo_window *win)
buttons1_form = XmxMakeFormAndFourButtons
(hotlist_form, hotlist_win_cb, "Add Current" ,
- "Goto URL" , "Remove" ,
+ "Goto URL" , "Remove" ,
"Edit" , 3, 4, 5, 6);
buttons2_form = XmxMakeFormAndThreeButtons
- (hotlist_form, hotlist_win_cb, "Copy" ,
+ (hotlist_form, hotlist_win_cb, "Copy" ,
"Insert" , "Up" ,
7, 8, 9);
XmxSetArg (XmNfractionBase, (XtArgVal)4);
@@ -2027,7 +2027,7 @@ mo_status mo_post_hotlist_win (mo_window *win)
XmxSetArg (XmNresizable, False);
XmxSetArg (XmNscrollBarDisplayPolicy, XmSTATIC);
XmxSetArg (XmNlistSizePolicy, XmCONSTANT);
- win->hotlist_list =
+ win->hotlist_list =
XmxMakeScrolledList (hotlist_form, hotlist_list_cb, 0);
XtAugmentTranslations (win->hotlist_list, listTable);
XtAddCallback(win->hotlist_list,
@@ -2041,7 +2041,7 @@ mo_status mo_post_hotlist_win (mo_window *win)
URL_Include_Set(win,0,0);
dialog_sep = XmxMakeHorizontalSeparator (hotlist_form);
-
+
buttons_form = XmxMakeFormAndFiveButtons(hotlist_form,
hotlist_win_cb,
"Mail To...",
@@ -2054,7 +2054,7 @@ mo_status mo_post_hotlist_win (mo_window *win)
11,
0,
2);
-
+
/* Constraints for hotlist_form. */
/* buttons1_form: top to nothing, bottom to hotlist_list,
left to form, right to form. */
@@ -2064,32 +2064,32 @@ mo_status mo_post_hotlist_win (mo_window *win)
XmATTACH_FORM, NULL, NULL, NULL, NULL);
XmxSetOffsets (buttons1_form, 0, 0, 0, 0);
XmxSetConstraints
- (buttons1_form,
- XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ (buttons1_form,
+ XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
win->hotlist_label, NULL, NULL, NULL);
XmxSetOffsets (buttons2_form, 0, 2, 0, 0);
XmxSetConstraints
- (buttons2_form,
- XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ (buttons2_form,
+ XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
buttons1_form, NULL, NULL, NULL);
/* list: top to form, bottom to rbm_toggle,
etc... */
XmxSetOffsets (XtParent (win->hotlist_list), 10, 10, 8, 8);
XmxSetConstraints
- (XtParent (win->hotlist_list),
- XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
+ (XtParent (win->hotlist_list),
+ XmATTACH_WIDGET, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
buttons2_form, win->hotlist_rbm_toggle, NULL, NULL);
XmxSetOffsets (win->hotlist_rbm_toggle, 0, 10, 6, 6);
XmxSetConstraints
- (win->hotlist_rbm_toggle,
- XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_NONE,
+ (win->hotlist_rbm_toggle,
+ XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_NONE,
NULL, dialog_sep, NULL, NULL);
- XmxSetConstraints
- (dialog_sep,
+ XmxSetConstraints
+ (dialog_sep,
XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM, XmATTACH_FORM,
NULL, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM,
NULL, NULL, NULL, NULL);
win->save_hotlist_win = win->load_hotlist_win = NULL;
@@ -2097,9 +2097,9 @@ mo_status mo_post_hotlist_win (mo_window *win)
/* Go get the hotlist up to this point set up... */
mo_load_hotlist_list (win, win->hotlist_list);
}
-
+
XmxManageRemanage (win->hotlist_win);
-
+
return mo_succeed;
}
diff --git a/src/img.c b/src/img.c
index 584830a..e2e5344 100644
--- a/src/img.c
+++ b/src/img.c
@@ -284,17 +284,17 @@ ImageInfo *ImageResolve (Widget w, char *src, int noload, char *wid, char *hei)
while(*src != '\n') src++;
*src='\0';
src++;
-
+
goto stuffcache;
}
-
+
#ifndef DISABLE_TRACE
if (srcTrace)
fprintf (stderr,
"[ImageResolve] I'm entering, src '%s', noload %d!\n",
src, noload);
#endif
-
+
if (!src)
return NULL;
@@ -313,14 +313,14 @@ ImageInfo *ImageResolve (Widget w, char *src, int noload, char *wid, char *hei)
if (win->scrolled_win == w)
{
mo_set_current_cached_win (win);
-
+
cached_url = win->current_node ? win->current_node->url : "lose";
win->cached_url = cached_url;
-
+
goto foundit;
}
}
-
+
/* Shit outta luck. */
#ifndef DISABLE_TRACE
if (srcTrace)
@@ -328,7 +328,7 @@ ImageInfo *ImageResolve (Widget w, char *src, int noload, char *wid, char *hei)
#endif
return NULL;
-
+
foundit:
#ifndef DISABLE_TRACE
if (srcTrace)
@@ -344,7 +344,7 @@ foundit:
if(strstr(cached_url, imagekill_sites[i])) {
extern Widget view; /*hw->html.view*/
Widget swin = current_win->scrolled_win;
-
+
if (!done_fetch_colors){
if (!view)
return NULL;
@@ -354,24 +354,24 @@ foundit:
XtNbackground, &bg_pixel,
NULL);
done_fetch_colors = 1;
- }
+ }
RETURN_IMGINFO_FROM_BITMAP(blank);
}
}
}
}
-
-
+
+
/* Internal images. */
if (strncmp (src, "internal-", 9) == 0)
- {
+ {
if (!done_fetch_colors)
{
if (!view)
return NULL;
-
+
/* First, go fetch the pixels. */
XtVaGetValues(view,
XtNforeground, &fg_pixel,
@@ -476,7 +476,7 @@ stuffcache:
return NULL;
}
-
+
#ifndef DISABLE_TRACE
if (srcTrace)
fprintf (stderr, "GOING ON THROUGH...\n");
@@ -491,14 +491,14 @@ stuffcache:
if (ishdf)
{
img_data =
- (ImageInfo *)hdfGrokImage
- (mo_hdf_fetch_local_filename (src),
+ (ImageInfo *)hdfGrokImage
+ (mo_hdf_fetch_local_filename (src),
hdfref,
&bg);
#ifndef DISABLE_TRACE
if (srcTrace)
- fprintf (stderr, "[ImageResolve] Did hdfGrokImage, got back 0x%08x\n",
+ fprintf (stderr, "[ImageResolve] Did hdfGrokImage, got back 0x%08x\n",
img_data);
#endif
@@ -533,7 +533,7 @@ stuffcache:
/* if w is NULL we're stuffing the cache with our own info...
BJS */
if(w) {
-
+
/* We have to load the image. */
fnam = mo_tmpnam(src);
@@ -550,11 +550,11 @@ stuffcache:
return NULL;
}
-
+
#ifndef DISABLE_TRACE
if (srcTrace)
- fprintf (stderr,
- "[ImageResolve] Got through mo_pull_er_over_virgin, rc %d\n",
+ fprintf (stderr,
+ "[ImageResolve] Got through mo_pull_er_over_virgin, rc %d\n",
rc);
#endif
@@ -575,7 +575,7 @@ stuffcache:
/* Send it through CCI if need be */
MoCCISendBrowserViewFile(src, "unknown", fnam);
}
-
+
data = ReadBitmap(fnam, &width, &height, colrs, &bg);
#ifndef DISABLE_TRACE
@@ -610,13 +610,13 @@ stuffcache:
bg_map = (unsigned char *)malloc(width * height);
}
-
+
/* Now delete the file. */
- unlink(fnam);
+ unlink(fnam);
{
char *hfnam = (char *)malloc ((strlen (fnam) + strlen(".html") + 5) * sizeof (char));
sprintf (hfnam, "%s.html", fnam);
- unlink(hfnam);
+ unlink(hfnam);
free(hfnam);
}
@@ -728,10 +728,10 @@ int found_bg=0;
*/
if ((cnt > get_pref_int(eCOLORS_PER_INLINED_IMAGE))&&(Vclass != TrueColor))
{
- MedianCut(img_data->image_data, &img_data->width,
- &img_data->height, colrs, 256,
+ MedianCut(img_data->image_data, &img_data->width,
+ &img_data->height, colrs, 256,
get_pref_int(eCOLORS_PER_INLINED_IMAGE));
-
+
for (i=0; i < 256; i++)
Used[i] = 0;
cnt = 1;
@@ -770,7 +770,7 @@ int found_bg=0;
for (i=0; i < 256; i++)
{
int indx;
-
+
if (Used[i] != 0)
{
indx = Used[i] - 1;
@@ -796,7 +796,7 @@ int found_bg=0;
img_data->blues[cnt - 1] = bg_blue;
img_data->bg_index=(cnt-1);
}
-
+
bgptr = bg_map;
cptr = img_data->clip_data;
ptr = img_data->image_data;
diff --git a/src/img.h b/src/img.h
index a46e5ad..9f57749 100644
--- a/src/img.h
+++ b/src/img.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/list.h b/src/list.h
index 29c3e0e..43adcb3 100644
--- a/src/list.h
+++ b/src/list.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
diff --git a/src/listP.h b/src/listP.h
index 79871ad..eba14a3 100644
--- a/src/listP.h
+++ b/src/listP.h
@@ -4,9 +4,9 @@
* Permission is granted to copy and distribute source with out fee.
* Commercialization of this product requires prior licensing
* from the National Center for Supercomputing Applications of the
- * University of Illinois. Commercialization includes the integration of this
- * code in part or whole into a product for resale. Free distribution of
- * unmodified source and use of NCSA software is not considered
+ * University of Illinois. Commercialization includes the integration of this
+ * code in part or whole into a product for resale. Free distribution of
+ * unmodified source and use of NCSA software is not considered
* commercialization.
*
*/
@@ -27,7 +27,7 @@ struct LISTINSTANCE {
struct LISTSTRUCT {
struct LISTINSTANCE *head;
struct LISTINSTANCE *tail;
- struct LISTINSTANCE *current;
+ struct LISTINSTANCE *current;
int listCount;
};
diff --git a/src/mailto.c b/src/mailto.c
index 144102c..b00f4c4 100644
--- a/src/mailto.c
+++ b/src/mailto.c
@@ -72,9 +72,9 @@ extern char pre_title[80];
extern mo_window *current_win;
mo_status mo_post_mailto_form_win (char *to_address, char *subject);
-mo_status mo_send_mailto_message (char *text, char *to, char *subj,
+mo_status mo_send_mailto_message (char *text, char *to, char *subj,
char *content_type, char *url);
-void do_mailto_post(mo_window *win, char *to, char *from, char *subject,
+void do_mailto_post(mo_window *win, char *to, char *from, char *subject,
char *body);
/* ----------------------- mo_post_mailto_window ------------------------ */
@@ -91,7 +91,7 @@ static XmxCallback (include_fsb_cb)
XtUnmanageChild (win->mail_fsb_win);
fname = (char *)malloc (128 * sizeof (char));
-
+
XmStringGetLtoR (((XmFileSelectionBoxCallbackStruct *)call_data)->value,
XmSTRING_DEFAULT_CHARSET,
&fname);
@@ -119,8 +119,8 @@ static XmxCallback (include_fsb_cb)
sprintf(final+strlen(final),"\nOpen Error:\n");
sprintf(final+strlen(final)," %s\n",buf);
- XmxMakeErrorDialog (win->mailto_win,
- final,
+ XmxMakeErrorDialog (win->mailto_win,
+ final,
"Open Error");
XtManageChild (Xmx_w);
@@ -130,14 +130,14 @@ static XmxCallback (include_fsb_cb)
}
return;
}
-
+
while (1)
{
long pos;
status = fgets (line, MO_LINE_LENGTH, fp);
if (!status || !(*line))
break;
-
+
XmTextInsert (win->mailto_text,
pos = XmTextGetInsertionPosition (win->mailto_text),
line);
@@ -154,24 +154,24 @@ static XmxCallback (mailto_win_cb)
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
char *msg, *subj, *to;
long pos;
-
-
+
+
switch (XmxExtractToken ((int)client_data))
{
case 0: /* send */
XtUnmanageChild (win->mailto_win);
-
+
msg = XmxTextGetString (win->mailto_text);
if (!msg)
return;
if (msg[0] == '\0')
return;
-
+
to = XmxTextGetString (win->mailto_tofield);
subj = XmxTextGetString (win->mailto_subfield);
- mo_send_mailto_message (msg, to, subj, "text/plain",
+ mo_send_mailto_message (msg, to, subj, "text/plain",
win->current_node->url);
free (msg);
free (to);
@@ -179,16 +179,16 @@ static XmxCallback (mailto_win_cb)
break;
case 1: /* dismiss */
- XtUnmanageChild (win->mailto_win);
+ XtUnmanageChild (win->mailto_win);
/* Do nothing. */
break;
case 2: /* help */
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("help-on-mailto.html"),
NULL, NULL);
break;
-
+
case 3: /* insert file */
if (!win->mail_fsb_win) {
win->mail_fsb_win = XmxMakeFileSBDialog
@@ -199,7 +199,7 @@ static XmxCallback (mailto_win_cb)
} else {
XmFileSelectionDoSearch (win->mail_fsb_win, NULL);
}
-
+
XmxManageRemanage (win->mail_fsb_win);
break;
case 4:
@@ -222,12 +222,12 @@ static XmxCallback (mailto_form_win_cb)
{
mo_window *win = mo_fetch_window_by_id (XmxExtractUniqid ((int)client_data));
char *subj, *to, *namestr;
-
+
switch (XmxExtractToken ((int)client_data))
{
case 0: /* send */
XtUnmanageChild (win->mailto_form_win);
-
+
to = XmxTextGetString (win->mailto_form_tofield);
subj = XmxTextGetString (win->mailto_form_subfield);
namestr = XmxTextGetString(win->mailto_form_fromfield);
@@ -244,7 +244,7 @@ static XmxCallback (mailto_form_win_cb)
break;
case 1: /* dismiss */
- XtUnmanageChild (win->mailto_form_win);
+ XtUnmanageChild (win->mailto_form_win);
/* Do nothing. */
if (win->post_data) {
free (win->post_data);
@@ -254,7 +254,7 @@ static XmxCallback (mailto_form_win_cb)
break;
case 2: /* help */
mo_open_another_window
- (win,
+ (win,
mo_assemble_help_url ("help-on-mailto-form.html"),
NULL, NULL);
break;
@@ -289,21 +289,21 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
Widget dialog_sep, buttons_form;
Widget mailto_form;
Widget tolabel, sublabel, fromlabel;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->mailto_win = XmxMakeFormDialog
+ win->mailto_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Mail To Author");
dialog_frame = XmxMakeFrame (win->mailto_win, XmxShadowOut);
-
+
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
mailto_form = XmxMakeForm (dialog_frame);
-
+
XmxSetArg (XmNscrolledWindowMarginWidth, 10);
XmxSetArg (XmNscrolledWindowMarginHeight, 10);
XmxSetArg (XmNcursorPositionVisible, True);
@@ -314,7 +314,7 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
/* XmxSetArg (XmNwordWrap, True); */
/* XmxSetArg (XmNscrollHorizontal, False); */
win->mailto_text = XmxMakeScrolledText (mailto_form);
-
+
dialog_sep = XmxMakeHorizontalSeparator (mailto_form);
/* create from, to, and subject widgets */
@@ -331,7 +331,7 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
/* constraints for FROM */
XmxSetOffsets(fromlabel, 14, 10, 10, 10);
XmxSetConstraints
- (fromlabel, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM,
+ (fromlabel, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE, NULL, NULL, NULL, NULL);
XmxSetOffsets(win->mailto_fromfield, 10, 10, 10, 10);
XmxSetConstraints
@@ -345,18 +345,18 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
win->mailto_fromfield, NULL, NULL, NULL);
XmxSetOffsets(win->mailto_tofield, 10, 10, 10, 10);
XmxSetConstraints
- (win->mailto_tofield, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_WIDGET,
+ (win->mailto_tofield, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_WIDGET,
XmATTACH_FORM, win->mailto_fromfield, NULL, tolabel, NULL);
/* constraints for SUBJECT */
XmxSetOffsets(sublabel, 14, 10, 10, 10);
XmxSetConstraints
- (sublabel, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
+ (sublabel, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE, win->mailto_tofield, NULL, NULL, NULL);
XmxSetOffsets(win->mailto_subfield, 10, 10, 10, 10);
XmxSetConstraints
- (win->mailto_subfield, XmATTACH_WIDGET, XmATTACH_NONE,
- XmATTACH_WIDGET, XmATTACH_FORM, win->mailto_tofield, NULL,
+ (win->mailto_subfield, XmATTACH_WIDGET, XmATTACH_NONE,
+ XmATTACH_WIDGET, XmATTACH_FORM, win->mailto_tofield, NULL,
sublabel, NULL);
/* create buttons */
@@ -367,17 +367,17 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
XmxSetOffsets (XtParent (win->mailto_text), 3, 0, 3, 3);
XmxSetConstraints
- (XtParent (win->mailto_text), XmATTACH_WIDGET, XmATTACH_WIDGET,
+ (XtParent (win->mailto_text), XmATTACH_WIDGET, XmATTACH_WIDGET,
XmATTACH_FORM, XmATTACH_FORM,
win->mailto_subfield, dialog_sep, NULL, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
NULL, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, NULL, NULL, NULL, NULL);
}
@@ -385,7 +385,7 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
sprintf(namestr, "%s <%s>", get_pref_string(eDEFAULT_AUTHOR_NAME),
get_pref_string(eDEFAULT_AUTHOR_EMAIL));
-
+
XmxTextSetString (win->mailto_fromfield, namestr);
XmxTextSetString (win->mailto_tofield, to_address);
if (!subject || !*subject) {
@@ -399,7 +399,7 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
}
XmxTextSetString (win->mailto_text, "");
-
+
/* tack signature on the end if it exists - code from Martin Hamilton */
if (get_pref_string(eSIGNATURE)) {
XmxTextSetString (win->mailto_text, "\n\n");
@@ -416,10 +416,10 @@ mo_status mo_post_mailto_win (char *to_address, char *subject)
} else {
XmxTextSetString (win->mailto_text, "");
}
-
+
}
XmTextSetInsertionPosition (win->mailto_text, 0);
-
+
XmxManageRemanage (win->mailto_win);
return mo_succeed;
@@ -507,21 +507,21 @@ mo_status mo_post_mailto_form_win (char *to_address, char *subject)
Widget dialog_sep, buttons_form;
Widget mailto_form_form;
Widget tolabel, sublabel, fromlabel;
-
+
/* Create it for the first time. */
XmxSetUniqid (win->id);
- win->mailto_form_win = XmxMakeFormDialog
+ win->mailto_form_win = XmxMakeFormDialog
(win->base, "NCSA Mosaic: Mail Form Results To Author");
dialog_frame = XmxMakeFrame (win->mailto_form_win, XmxShadowOut);
-
+
/* Constraints for base. */
- XmxSetConstraints
- (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_frame, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, XmATTACH_FORM, NULL, NULL, NULL, NULL);
-
+
/* Main form. */
mailto_form_form = XmxMakeForm (dialog_frame);
-
+
XmxSetArg (XmNscrolledWindowMarginWidth, 10);
XmxSetArg (XmNscrolledWindowMarginHeight, 10);
XmxSetArg (XmNcursorPositionVisible, True);
@@ -532,7 +532,7 @@ mo_status mo_post_mailto_form_win (char *to_address, char *subject)
XmxSetArg (XmNwordWrap, True);
XmxSetArg (XmNscrollHorizontal, False);
win->mailto_form_text = XmxMakeScrolledText (mailto_form_form);
-
+
dialog_sep = XmxMakeHorizontalSeparator (mailto_form_form);
/* create from, to, and subject widgets */
@@ -551,7 +551,7 @@ mo_status mo_post_mailto_form_win (char *to_address, char *subject)
/* constraints for FROM */
XmxSetOffsets(fromlabel, 14, 10, 10, 10);
XmxSetConstraints
- (fromlabel, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM,
+ (fromlabel, XmATTACH_FORM, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE, NULL, NULL, NULL, NULL);
XmxSetOffsets(win->mailto_form_fromfield, 10, 10, 10, 10);
XmxSetConstraints
@@ -565,18 +565,18 @@ mo_status mo_post_mailto_form_win (char *to_address, char *subject)
win->mailto_form_fromfield, NULL, NULL, NULL);
XmxSetOffsets(win->mailto_form_tofield, 10, 10, 10, 10);
XmxSetConstraints
- (win->mailto_form_tofield, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_WIDGET,
+ (win->mailto_form_tofield, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_WIDGET,
XmATTACH_FORM, win->mailto_form_fromfield, NULL, tolabel, NULL);
/* constraints for SUBJECT */
XmxSetOffsets(sublabel, 14, 10, 10, 10);
XmxSetConstraints
- (sublabel, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
+ (sublabel, XmATTACH_WIDGET, XmATTACH_NONE, XmATTACH_FORM,
XmATTACH_NONE, win->mailto_form_tofield, NULL, NULL, NULL);
XmxSetOffsets(win->mailto_form_subfield, 10, 10, 10, 10);
XmxSetConstraints
- (win->mailto_form_subfield, XmATTACH_WIDGET, XmATTACH_NONE,
- XmATTACH_WIDGET, XmATTACH_FORM, win->mailto_form_tofield, NULL,
+ (win->mailto_form_subfield, XmATTACH_WIDGET, XmATTACH_NONE,
+ XmATTACH_WIDGET, XmATTACH_FORM, win->mailto_form_tofield, NULL,
sublabel, NULL);
/* create buttons */
@@ -587,17 +587,17 @@ mo_status mo_post_mailto_form_win (char *to_address, char *subject)
XmxSetOffsets (XtParent (win->mailto_form_text), 3, 0, 3, 3);
XmxSetConstraints
- (XtParent (win->mailto_form_text), XmATTACH_WIDGET, XmATTACH_WIDGET,
+ (XtParent (win->mailto_form_text), XmATTACH_WIDGET, XmATTACH_WIDGET,
XmATTACH_FORM, XmATTACH_FORM,
win->mailto_form_subfield, dialog_sep, NULL, NULL);
XmxSetArg (XmNtopOffset, 10);
- XmxSetConstraints
- (dialog_sep, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
+ XmxSetConstraints
+ (dialog_sep, XmATTACH_NONE, XmATTACH_WIDGET, XmATTACH_FORM,
XmATTACH_FORM,
NULL, buttons_form, NULL, NULL);
- XmxSetConstraints
- (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
+ XmxSetConstraints
+ (buttons_form, XmATTACH_NONE, XmATTACH_FORM, XmATTACH_FORM,
XmATTACH_FORM, NULL, NULL, NULL, NULL);
}
@@ -605,7 +605,7 @@ mo_status mo_post_mailto_form_win (char *to_address, char *subject)
sprintf(namestr, "%s <%s>", get_pref_string(eDEFAULT_AUTHOR_NAME),
get_pref_string(eDEFAULT_AUTHOR_EMAIL));
-
+
XmxTextSetString (win->mailto_form_fromfield, namestr);
XmxTextSetString (win->mailto_form_tofield, to_address);
if (subject != NULL)
@@ -650,7 +650,7 @@ void do_mailto_post(mo_window *win, char *to, char *from, char *subject, char *b
}
#endif
- mo_send_mailto_message(buf, to, subject, post_content_type,
+ mo_send_mailto_message(buf, to, subject, post_content_type,
win->current_node->url);
if (buf) {
@@ -664,7 +664,7 @@ void do_mailto_post(mo_window *win, char *to, char *from, char *subject, char *b
}
#endif
- mo_send_mailto_message(body, to, subject, post_content_type,
+ mo_send_mailto_message(body, to, subject, post_content_type,
win->current_node->url);
}
@@ -678,7 +678,7 @@ void do_mailto_post(mo_window *win, char *to, char *from, char *subject, char *b
static FILE *_fp = NULL;
-FILE *mo_start_sending_mailto_message (char *to, char *subj,
+FILE *mo_start_sending_mailto_message (char *to, char *subj,
char *content_type, char *url)
{
char cmd[2048];
@@ -686,10 +686,10 @@ FILE *mo_start_sending_mailto_message (char *to, char *subj,
if (!to)
return NULL;
-
+
if (get_pref_string(eMAIL_FILTER_COMMAND))
{
- sprintf (cmd, "%s | %s", get_pref_string(eMAIL_FILTER_COMMAND),
+ sprintf (cmd, "%s | %s", get_pref_string(eMAIL_FILTER_COMMAND),
get_pref_string(eSENDMAIL_COMMAND));
}
else
@@ -704,15 +704,15 @@ FILE *mo_start_sending_mailto_message (char *to, char *subj,
fprintf (_fp, "Subject: %s\n", subj);
fprintf (_fp, "Content-Type: %s\n", content_type);
fprintf (_fp, "Mime-Version: 1.0\n");
- fprintf (_fp, "X-Mailer: NCSA Mosaic %s on %s\n",
+ fprintf (_fp, "X-Mailer: NCSA Mosaic %s on %s\n",
MO_VERSION_STRING, MO_MACHINE_TYPE);
if (url)
fprintf (_fp, "X-URL: %s\n", url);
fprintf (_fp, "\n");
-
+
/* Stick in BASE tag as appropriate. */
- if (url && content_type &&
+ if (url && content_type &&
strcmp (content_type, "text/x-html") == 0)
fprintf (_fp, "\n", url);
@@ -731,7 +731,7 @@ mo_status mo_finish_sending_mailto_message (void)
/* ------------------------------------------------------------------------ */
-mo_status mo_send_mailto_message (char *text, char *to, char *subj,
+mo_status mo_send_mailto_message (char *text, char *to, char *subj,
char *content_type, char *url)
{
FILE *fp;
@@ -739,7 +739,7 @@ mo_status mo_send_mailto_message (char *text, char *to, char *subj,
fp = mo_start_sending_mailto_message (to, subj, content_type, url);
if (!fp)
return mo_fail;
-
+
fputs (text, fp);
mo_finish_sending_mailto_message ();
diff --git a/src/main.c b/src/main.c
index f69f0cc..770d1dd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -102,7 +102,7 @@ MO_SIGHANDLER_RETURNTYPE ProcessExternalDirective (MO_SIGHANDLER_ARGS)
char filename[64];
char line[MO_LINE_LENGTH], *status, *directive, *url;
FILE *fp;
-
+
signal (SIGUSR1, SIG_IGN);
@@ -127,7 +127,7 @@ MO_SIGHANDLER_RETURNTYPE ProcessExternalDirective (MO_SIGHANDLER_ARGS)
url = strdup ("dummy");
else
url = strdup (line);
-
+
mo_process_external_directive (directive, url);
free (directive);
@@ -138,7 +138,7 @@ MO_SIGHANDLER_RETURNTYPE ProcessExternalDirective (MO_SIGHANDLER_ARGS)
done:
signal (SIGUSR1, (void *)ProcessExternalDirective);
return;
-}
+}
#endif
static void RealFatal (void)
@@ -163,7 +163,7 @@ static MO_SIGHANDLER_RETURNTYPE FatalProblem
#endif /* not __STDC__ */
{
fprintf (stderr, "\nCongratulations, you have found a bug in\n");
- fprintf (stderr, "NCSA Mosaic %s on %s.\n\n", MO_VERSION_STRING,
+ fprintf (stderr, "NCSA Mosaic %s on %s.\n\n", MO_VERSION_STRING,
MO_MACHINE_TYPE);
fprintf (stderr, "If a core file was generated in your directory,\n");
fprintf (stderr, "please do one of the following:\n\n");
@@ -173,7 +173,7 @@ static MO_SIGHANDLER_RETURNTYPE FatalProblem
fprintf (stderr, " %% gdb /path/to/Mosaic /path/to/core\n");
fprintf (stderr, " gdb> where\n\n");
fprintf (stderr, "Mail the results, and a description of what you were doing at the time,\n");
- fprintf (stderr, "(include any URLs involved!) to %s.\n\nWe thank you for your support.\n\n",
+ fprintf (stderr, "(include any URLs involved!) to %s.\n\nWe thank you for your support.\n\n",
MO_DEVELOPER_ADDRESS);
fprintf (stderr, "...exiting NCSA Mosaic now.\n\n");
@@ -200,7 +200,7 @@ main (int argc, char **argv, char **envp)
perror("uname");
}
else {
- if (!strcmp(u.sysname,"SunOS") &&
+ if (!strcmp(u.sysname,"SunOS") &&
(!strcmp(u.release,"5.0")
|| !strcmp(u.release,"5.1")
|| !strcmp(u.release,"5.2")
diff --git a/src/main.h b/src/main.h
index 423ffd4..c8d78e4 100644
--- a/src/main.h
+++ b/src/main.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/md5.c b/src/md5.c
index 09eb19e..b7c1aea 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -318,7 +318,7 @@ unsigned char block[64];
state[1] += b;
state[2] += c;
state[3] += d;
-
+
/* Zeroize sensitive information.*/
MD5_memset ((POINTER)x, 0, sizeof (x));
@@ -378,7 +378,7 @@ int value;
unsigned int len;
{
unsigned int i;
-
+
for (i = 0; i < len; i++)
((char *)output)[i] = (char)value;
}
@@ -402,7 +402,7 @@ void MD5Mem(unsigned char *mem, long len, unsigned char *result) {
MD5Init (&context);
MD5Update (&context, mem, len);
MD5Final (digest, &context);
-
+
memcpy(result, digest, 16);
}
@@ -420,7 +420,7 @@ void MD5File(char *filename, unsigned char *result) {
MD5_CTX context;
int len;
unsigned char buffer[1024], digest[16];
-
+
if ((file = fopen (filename, "rb")) == NULL)
printf ("%s can't be opened\n", filename);
@@ -431,7 +431,7 @@ void MD5File(char *filename, unsigned char *result) {
MD5Final (digest, &context);
fclose (file);
-
+
memcpy(result, digest, 16);
}
diff --git a/src/md5.h b/src/md5.h
index 461396c..cb69f17 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -54,7 +54,7 @@
/* Author: DXP */
-/* most of this stuff was taken from the original code from RSA Data Security, Inc.
+/* most of this stuff was taken from the original code from RSA Data Security, Inc.
The appropriate header comments will be included where appropriate */
/**************************************************/
diff --git a/src/medcut.c b/src/medcut.c
index 6d7e0ad..6757a17 100644
--- a/src/medcut.c
+++ b/src/medcut.c
@@ -350,7 +350,7 @@ int boxnum, color_indx;
} /* end while med_cnt */
C_boxes[Lesser].count = Low_cnt;
C_boxes[Greater].count = High_cnt;
-
+
}
@@ -379,7 +379,7 @@ int e_cnt;
while (BoxCount < e_cnt)
{
int target, color_indx;
-
+
target = 0;
color_indx = 0;
color_indx = FindTarget(&target);
diff --git a/src/medcut.h b/src/medcut.h
index 2012295..3eaf8ed 100644
--- a/src/medcut.h
+++ b/src/medcut.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/mo-dtm.c b/src/mo-dtm.c
index 4bf9584..8e86731 100644
--- a/src/mo-dtm.c
+++ b/src/mo-dtm.c
@@ -64,7 +64,7 @@
#include "libhtmlw/HTML.h" /* for ImageInfo */
/* Creation of an input port implies done_init and done_register
- as well as done_inport. Creation of an output port implies
+ as well as done_inport. Creation of an output port implies
all of these (since an input port is always created prior to
creating an output port). */
static int done_init = 0; /* called NetInit?? */
@@ -77,13 +77,13 @@ static int done_inport = 0; /* called NetCreateInPort?? */
mo_status mo_dtm_in (char *path)
{
NetPort *inport;
-
+
if (!done_init)
{
NetInit ("Mosaic");
done_init = 1;
}
-
+
if (!done_register)
{
#if 0
@@ -95,7 +95,7 @@ mo_status mo_dtm_in (char *path)
#endif
done_register = 1;
}
-
+
if (!done_inport)
{
inport = NetCreateInPort (path);
@@ -103,7 +103,7 @@ mo_status mo_dtm_in (char *path)
}
mo_register_dtm_blip ();
-
+
return mo_succeed;
}
@@ -127,13 +127,13 @@ mo_status mo_dtm_out (char *port)
if (!done_outport)
{
mo_dtm_in (":0");
-
+
/* Make the output port. */
NetCreateOutPort (port);
done_outport = 1;
}
-
+
return mo_succeed;
}
@@ -153,7 +153,7 @@ mo_status mo_dtm_poll_and_read ()
{
if (done_inport)
NetClientPollAndRead ();
-
+
return mo_succeed;
}
@@ -209,7 +209,7 @@ mo_status mo_dtm_send_image (void *data)
}
}
- rv = NetSendRaster8Group
+ rv = NetSendRaster8Group
(NULL, "Mosaic Image", img->image_data,
img->width, img->height, palette, TRUE, FALSE, NULL);
@@ -254,10 +254,10 @@ mo_status mo_dtm_send_dataset (void *spanker)
Data *d = (Data *) spanker;
int rv, i;
char palette[768];
-
+
if (!mo_dtm_out_active_p ())
return mo_fail;
-
+
/*
for (i = 0; i < 256; i++)
@@ -276,8 +276,8 @@ mo_status mo_dtm_send_dataset (void *spanker)
}
}
*/
-
-#define COLLAGE_SUCKS
+
+#define COLLAGE_SUCKS
#ifdef COLLAGE_SUCKS
rv = NetSendArray
(NULL, d, TRUE, FALSE, NULL, (d->rank == 3 ? TRUE : FALSE));
@@ -285,7 +285,7 @@ mo_status mo_dtm_send_dataset (void *spanker)
rv = NetSendArray
(NULL, d, TRUE, FALSE, NULL, TRUE);
#endif
-
+
return mo_succeed;
}
diff --git a/src/mo-dtm.h b/src/mo-dtm.h
index e24e02d..20ec71c 100644
--- a/src/mo-dtm.h
+++ b/src/mo-dtm.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/mo-hdf.c b/src/mo-hdf.c
index 7542adc..2e93c0c 100644
--- a/src/mo-hdf.c
+++ b/src/mo-hdf.c
@@ -81,19 +81,19 @@ static char *pull_guts_from_hdfref (char *target)
return NULL;
}
-
+
/****************************************************************************
* name: mo_hdf_fetch_local_filename
* purpose: Given an HDF URL (we will canonicalize it), return the
* filename of the local cached copy of the file.
- * inputs:
+ * inputs:
* - char *url: The URL to use.
- * returns:
+ * returns:
* The local filename (char *).
- * remarks:
- *
+ * remarks:
+ *
****************************************************************************/
char *mo_hdf_fetch_local_filename (char *url)
{
@@ -112,14 +112,14 @@ char *mo_hdf_fetch_local_filename (char *url)
* ), and a target anchor (can be NULL), pull the filename out
* of the internal HTML reference and do the right thing
* with the resulting HDF file.
- * inputs:
+ * inputs:
* - char *url: The URL we're visiting.
* - char *newtext: The block of HTML containing the internal
* HTML reference.
* - char *target: The target anchor in the URL, or NULL.
- * returns:
+ * returns:
* HTML (char *)
- * remarks:
+ * remarks:
* When we're called, we've already pulled over something from the net.
* So no matter what, nuke any existing file and cache the current
* file.
@@ -142,7 +142,7 @@ char *mo_decode_internal_reference (char *url, char *newtext, char *target)
system (cmd);
free (cmd);
*/
- unlink(fname);
+ unlink(fname);
}
/* Now go get the new filename. */
@@ -174,21 +174,21 @@ char *mo_decode_internal_reference (char *url, char *newtext, char *target)
return text;
}
-
+
/****************************************************************************
* name: mo_decode_hdfref
* purpose: Given a URL (canonicalized with or without target still
* attached) and a target anchor which is an hdfref,
* look up the cached local file and decode the href.
- * inputs:
+ * inputs:
* - char *url: URL for the data file on the net.
* - char *target: Target anchor (hdfref).
- * returns:
+ * returns:
* HTML for the hdfref.
- * remarks:
+ * remarks:
* The URL is canonicalized (target anchor stripped out) for the call
- * to mo_fetch_cached_data(), so it can return the appropriate local
+ * to mo_fetch_cached_data(), so it can return the appropriate local
* filename for all internal references.
* --> We assume the file is already stored locally. ???
****************************************************************************/
@@ -251,7 +251,7 @@ mo_status mo_do_hdf_dtm_thang (char *url, char *hdfdtmref)
free (cache_url);
}
}
-
+
hdfDtmThang (fname, hdfdtmref);
return mo_succeed;
diff --git a/src/mo-hdf.h b/src/mo-hdf.h
index c705610..790a973 100644
--- a/src/mo-hdf.h
+++ b/src/mo-hdf.h
@@ -52,7 +52,7 @@
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
-/*
+/*
* Created: Wed Apr 10 17:41:00 CDT 1996
* Author: Dan Pape
*
diff --git a/src/mo-www.c b/src/mo-www.c
index eb4bd08..0667180 100644
--- a/src/mo-www.c
+++ b/src/mo-www.c
@@ -189,11 +189,11 @@ static void frame_hack()
}
/*
start = strstr(HTMainText->htmlSrc, "