[PATCH libXaw3d 07/18] TextAction: Fix old-style function definitions
Yaakov (Cygwin/X)
yselkowitz at users.sourceforge.net
Sun Aug 28 00:20:17 PDT 2011
From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
src/TextAction.c | 482 +++++++++++++-----------------------------------------
1 files changed, 114 insertions(+), 368 deletions(-)
diff --git a/src/TextAction.c b/src/TextAction.c
index 287c0bd..14cc961 100644
--- a/src/TextAction.c
+++ b/src/TextAction.c
@@ -56,25 +56,42 @@ in this Software without prior written authorization from the X Consortium.
* These are defined in TextPop.c
*/
-void _XawTextInsertFileAction(), _XawTextInsertFile(), _XawTextSearch();
-void _XawTextSearch(), _XawTextDoSearchAction(), _XawTextDoReplaceAction();
-void _XawTextSetField(), _XawTextPopdownSearchAction();
+extern void _XawTextInsertFileAction(Widget, XEvent *, String *, Cardinal *);
+extern void _XawTextInsertFile(Widget, XEvent *, String *, Cardinal *);
+extern void _XawTextSearch(Widget, XEvent *, String *, Cardinal *);
+extern void _XawTextSearch(Widget, XEvent *, String *, Cardinal *);
+extern void _XawTextDoSearchAction(Widget, XEvent *, String *, Cardinal *);
+extern void _XawTextDoReplaceAction(Widget, XEvent *, String *, Cardinal *);
+extern void _XawTextSetField(Widget, XEvent *, String *, Cardinal *);
+extern void _XawTextPopdownSearchAction(Widget, XEvent *, String *, Cardinal *);
/*
* These are defined in Text.c
*/
-char * _XawTextGetText();
-void _XawTextAlterSelection(), _XawTextVScroll();
-void _XawTextSetSelection(), _XawTextCheckResize(), _XawTextExecuteUpdate();
-void _XawTextSetScrollBars(), _XawTextClearAndCenterDisplay();
-Atom * _XawTextSelectionList();
-void _XawTextPrepareToUpdate();
-int _XawTextReplace();
+extern char * _XawTextGetText(TextWidget, XawTextPosition, XawTextPosition);
+extern void _XawTextAlterSelection(TextWidget, XawTextSelectionMode,
+ XawTextSelectionAction, String *, Cardinal *);
+extern void _XawTextVScroll(TextWidget, int);
+extern void _XawTextSetSelection(TextWidget, XawTextPosition, XawTextPosition,
+ String *, Cardinal);
+extern void _XawTextCheckResize(TextWidget);
+extern void _XawTextExecuteUpdate(TextWidget);
+extern void _XawTextSetScrollBars(TextWidget);
+extern void _XawTextClearAndCenterDisplay(TextWidget);
+extern Atom * _XawTextSelectionList(TextWidget, String *, Cardinal);
+extern void _XawTextPrepareToUpdate(TextWidget);
+extern int _XawTextReplace(TextWidget, XawTextPosition, XawTextPosition, XawTextBlock *);
-static void ParameterError(w, param)
- Widget w;
- String param;
+/*
+ * These are defined here
+ */
+
+static void GetSelection(Widget, Time, String *, Cardinal);
+void _XawTextZapSelection(TextWidget, XEvent *, Boolean);
+
+static void
+ParameterError(Widget w, String param)
{
String params[2];
Cardinal num_params = 2;
@@ -89,9 +106,7 @@ static void ParameterError(w, param)
}
static void
-StartAction(ctx, event)
-TextWidget ctx;
-XEvent *event;
+StartAction(TextWidget ctx, XEvent *event)
{
_XawTextPrepareToUpdate(ctx);
if (event != NULL) {
@@ -115,9 +130,7 @@ XEvent *event;
}
static void
-NotePosition(ctx, event)
-TextWidget ctx;
-XEvent* event;
+NotePosition(TextWidget ctx, XEvent* event)
{
switch (event->type) {
case ButtonPress:
@@ -146,8 +159,7 @@ XEvent* event;
}
static void
-EndAction(ctx)
-TextWidget ctx;
+EndAction(TextWidget ctx)
{
_XawTextCheckResize(ctx);
_XawTextExecuteUpdate(ctx);
@@ -163,8 +175,8 @@ struct _SelectionList {
Atom selection; /* selection atom when asking XA_COMPOUND_TEXT */
};
-static int ProbablyMB(s)
- char* s;
+static int
+ProbablyMB(char *s)
{
int escapes = 0;
int has_hi_bit = False;
@@ -182,17 +194,11 @@ static int ProbablyMB(s)
}
return( has_hi_bit );
}
-static void GetSelection();
/* ARGSUSED */
static void
-_SelectionReceived(w, client_data, selection, type, value, length, format)
-Widget w;
-XtPointer client_data;
-Atom *selection, *type;
-XtPointer value;
-unsigned long *length;
-int* format;
+_SelectionReceived(Widget w, XtPointer client_data, Atom *selection, Atom *type,
+ XtPointer value, unsigned long *length, int* format)
{
TextWidget ctx = (TextWidget)w;
XawTextBlock text;
@@ -289,11 +295,7 @@ we are, and convert it. I also warn the user that the other client is evil. */
}
static void
-GetSelection(w, time, params, num_params)
-Widget w;
-Time time;
-String* params; /* selections in precedence order */
-Cardinal num_params;
+GetSelection(Widget w, Time time, String *params, Cardinal num_params)
{
Atom selection;
int buffer;
@@ -338,11 +340,7 @@ Cardinal num_params;
}
static void
-InsertSelection(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params; /* precedence list of selections to try */
-Cardinal* num_params;
+InsertSelection(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
StartAction((TextWidget)w, event); /* Get Time. */
GetSelection(w, ((TextWidget)w)->text.time, params, *num_params);
@@ -356,12 +354,8 @@ Cardinal* num_params;
************************************************************/
static void
-Move(ctx, event, dir, type, include)
-TextWidget ctx;
-XEvent* event;
-XawTextScanDirection dir;
-XawTextScanType type;
-Boolean include;
+Move(TextWidget ctx, XEvent *event, XawTextScanDirection dir,
+ XawTextScanType type, Boolean include)
{
StartAction(ctx, event);
ctx->text.insertPos = SrcScan(ctx->text.source, ctx->text.insertPos,
@@ -371,96 +365,63 @@ Boolean include;
/*ARGSUSED*/
static void
-MoveForwardChar(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveForwardChar(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdRight, XawstPositions, TRUE);
}
/*ARGSUSED*/
static void
-MoveBackwardChar(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveBackwardChar(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdLeft, XawstPositions, TRUE);
}
/*ARGSUSED*/
static void
-MoveForwardWord(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveForwardWord(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdRight, XawstWhiteSpace, FALSE);
}
/*ARGSUSED*/
static void
-MoveBackwardWord(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveBackwardWord(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdLeft, XawstWhiteSpace, FALSE);
}
/*ARGSUSED*/
-static void MoveForwardParagraph(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+static void
+MoveForwardParagraph(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdRight, XawstParagraph, FALSE);
}
/*ARGSUSED*/
-static void MoveBackwardParagraph(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+static void
+MoveBackwardParagraph(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdLeft, XawstParagraph, FALSE);
}
/*ARGSUSED*/
static void
-MoveToLineEnd(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveToLineEnd(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdRight, XawstEOL, FALSE);
}
/*ARGSUSED*/
static void
-MoveToLineStart(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveToLineStart(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdLeft, XawstEOL, FALSE);
}
static void
-MoveLine(ctx, event, dir)
-TextWidget ctx;
-XEvent* event;
-XawTextScanDirection dir;
+MoveLine(TextWidget ctx, XEvent *event, XawTextScanDirection dir)
{
XawTextPosition new, next_line, junk;
int from_left, garbage;
@@ -492,53 +453,34 @@ XawTextScanDirection dir;
/*ARGSUSED*/
static void
-MoveNextLine(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveNextLine(Widget w, XEvent *event, String *p, Cardinal *n)
{
MoveLine( (TextWidget) w, event, XawsdRight);
}
/*ARGSUSED*/
static void
-MovePreviousLine(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MovePreviousLine(Widget w, XEvent *event, String *p, Cardinal *n)
{
MoveLine( (TextWidget) w, event, XawsdLeft);
}
/*ARGSUSED*/
static void
-MoveBeginningOfFile(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveBeginningOfFile(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdLeft, XawstAll, TRUE);
}
/*ARGSUSED*/
static void
-MoveEndOfFile(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveEndOfFile(Widget w, XEvent *event, String *p, Cardinal *n)
{
Move((TextWidget) w, event, XawsdRight, XawstAll, TRUE);
}
static void
-Scroll(ctx, event, dir)
-TextWidget ctx;
-XEvent* event;
-XawTextScanDirection dir;
+Scroll(TextWidget ctx, XEvent *event, XawTextScanDirection dir)
{
StartAction(ctx, event);
@@ -552,31 +494,20 @@ XawTextScanDirection dir;
/*ARGSUSED*/
static void
-ScrollOneLineUp(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+ScrollOneLineUp(Widget w, XEvent *event, String *p, Cardinal *n)
{
Scroll( (TextWidget) w, event, XawsdLeft);
}
/*ARGSUSED*/
static void
-ScrollOneLineDown(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+ScrollOneLineDown(Widget w, XEvent *event, String *p, Cardinal *n)
{
Scroll( (TextWidget) w, event, XawsdRight);
}
static void
-MovePage(ctx, event, dir)
-TextWidget ctx;
-XEvent* event;
-XawTextScanDirection dir;
+MovePage(TextWidget ctx, XEvent *event, XawTextScanDirection dir)
{
int scroll_val = Max(1, ctx->text.lt.lines - 2);
@@ -591,22 +522,14 @@ XawTextScanDirection dir;
/*ARGSUSED*/
static void
-MoveNextPage(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MoveNextPage(Widget w, XEvent *event, String *p, Cardinal *n)
{
MovePage((TextWidget) w, event, XawsdRight);
}
/*ARGSUSED*/
static void
-MovePreviousPage(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+MovePreviousPage(Widget w, XEvent *event, String *p, Cardinal *n)
{
MovePage((TextWidget) w, event, XawsdLeft);
}
@@ -618,9 +541,7 @@ Cardinal* n;
************************************************************/
static Boolean
-MatchSelection(selection, s)
- Atom selection;
- XawTextSelection* s;
+MatchSelection(Atom selection, XawTextSelection *s)
{
Atom *match;
int count;
@@ -634,12 +555,8 @@ MatchSelection(selection, s)
#define SrcCvtSel XawTextSourceConvertSelection
static Boolean
-ConvertSelection(w, selection, target, type, value, length, format)
- Widget w;
- Atom *selection, *target, *type;
- XtPointer* value;
- unsigned long* length;
- int* format;
+ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type,
+ XtPointer* value, unsigned long *length, int *format)
{
Display* d = XtDisplay(w);
TextWidget ctx = (TextWidget)w;
@@ -797,8 +714,6 @@ ConvertSelection(w, selection, target, type, value, length, format)
}
if (*target == XA_DELETE(d)) {
- void _XawTextZapSelection(); /* From TextAction.c */
-
if (!salt)
_XawTextZapSelection( ctx, (XEvent *) NULL, TRUE);
*value = NULL;
@@ -817,9 +732,7 @@ ConvertSelection(w, selection, target, type, value, length, format)
}
static void
-LoseSelection(w, selection)
- Widget w;
- Atom* selection;
+LoseSelection(Widget w, Atom *selection)
{
TextWidget ctx = (TextWidget) w;
Atom* atomP;
@@ -873,10 +786,7 @@ LoseSelection(w, selection)
}
static void
-_DeleteOrKill(ctx, from, to, kill)
-TextWidget ctx;
-XawTextPosition from, to;
-Boolean kill;
+_DeleteOrKill(TextWidget ctx, XawTextPosition from, XawTextPosition to, Boolean kill)
{
XawTextBlock text;
@@ -939,12 +849,8 @@ Boolean kill;
}
static void
-DeleteOrKill(ctx, event, dir, type, include, kill)
-TextWidget ctx;
-XEvent* event;
-XawTextScanDirection dir;
-XawTextScanType type;
-Boolean include, kill;
+DeleteOrKill(TextWidget ctx, XEvent *event, XawTextScanDirection dir,
+ XawTextScanType type, Boolean include, Boolean kill)
{
XawTextPosition from, to;
@@ -976,33 +882,21 @@ Boolean include, kill;
/*ARGSUSED*/
static void
-DeleteForwardChar(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+DeleteForwardChar(Widget w, XEvent *event, String *p, Cardinal *n)
{
DeleteOrKill((TextWidget) w, event, XawsdRight, XawstPositions, TRUE, FALSE);
}
/*ARGSUSED*/
static void
-DeleteBackwardChar(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+DeleteBackwardChar(Widget w, XEvent *event, String *p, Cardinal *n)
{
DeleteOrKill((TextWidget) w, event, XawsdLeft, XawstPositions, TRUE, FALSE);
}
/*ARGSUSED*/
static void
-DeleteForwardWord(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+DeleteForwardWord(Widget w, XEvent *event, String *p, Cardinal *n)
{
DeleteOrKill((TextWidget) w, event,
XawsdRight, XawstWhiteSpace, FALSE, FALSE);
@@ -1010,11 +904,7 @@ Cardinal* n;
/*ARGSUSED*/
static void
-DeleteBackwardWord(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+DeleteBackwardWord(Widget w, XEvent *event, String *p, Cardinal *n)
{
DeleteOrKill((TextWidget) w, event,
XawsdLeft, XawstWhiteSpace, FALSE, FALSE);
@@ -1022,11 +912,7 @@ Cardinal* n;
/*ARGSUSED*/
static void
-KillForwardWord(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+KillForwardWord(Widget w, XEvent *event, String *p, Cardinal *n)
{
DeleteOrKill((TextWidget) w, event,
XawsdRight, XawstWhiteSpace, FALSE, TRUE);
@@ -1034,11 +920,7 @@ Cardinal* n;
/*ARGSUSED*/
static void
-KillBackwardWord(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+KillBackwardWord(Widget w, XEvent *event, String *p, Cardinal *n)
{
DeleteOrKill((TextWidget) w, event,
XawsdLeft, XawstWhiteSpace, FALSE, TRUE);
@@ -1046,11 +928,7 @@ Cardinal* n;
/*ARGSUSED*/
static void
-KillToEndOfLine(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+KillToEndOfLine(Widget w, XEvent *event, String *p, Cardinal *n)
{
TextWidget ctx = (TextWidget) w;
XawTextPosition end_of_line;
@@ -1069,20 +947,13 @@ Cardinal* n;
/*ARGSUSED*/
static void
-KillToEndOfParagraph(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+KillToEndOfParagraph(Widget w, XEvent *event, String *p, Cardinal *n)
{
DeleteOrKill((TextWidget) w, event, XawsdRight, XawstParagraph, FALSE, TRUE);
}
void
-_XawTextZapSelection(ctx, event, kill)
-TextWidget ctx;
-XEvent* event;
-Boolean kill;
+_XawTextZapSelection(TextWidget ctx, XEvent *event, Boolean kill)
{
StartAction(ctx, event);
_DeleteOrKill(ctx, ctx->text.s.left, ctx->text.s.right, kill);
@@ -1092,22 +963,14 @@ Boolean kill;
/*ARGSUSED*/
static void
-KillCurrentSelection(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+KillCurrentSelection(Widget w, XEvent *event, String *p, Cardinal *n)
{
_XawTextZapSelection( (TextWidget) w, event, TRUE);
}
/*ARGSUSED*/
static void
-DeleteCurrentSelection(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+DeleteCurrentSelection(Widget w, XEvent *event, String *p, Cardinal *n)
{
_XawTextZapSelection( (TextWidget) w, event, FALSE);
}
@@ -1119,8 +982,7 @@ Cardinal* n;
************************************************************/
static int
-InsertNewLineAndBackupInternal(ctx)
-TextWidget ctx;
+InsertNewLineAndBackupInternal(TextWidget ctx)
{
int count, error = XawEditDone;
XawTextBlock text;
@@ -1158,11 +1020,7 @@ TextWidget ctx;
/*ARGSUSED*/
static void
-InsertNewLineAndBackup(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+InsertNewLineAndBackup(Widget w, XEvent *event, String *p, Cardinal *n)
{
StartAction( (TextWidget) w, event );
(void) InsertNewLineAndBackupInternal( (TextWidget) w );
@@ -1171,9 +1029,7 @@ Cardinal* n;
}
static int
-LocalInsertNewLine(ctx, event)
- TextWidget ctx;
- XEvent* event;
+LocalInsertNewLine(TextWidget ctx, XEvent *event)
{
StartAction(ctx, event);
if (InsertNewLineAndBackupInternal(ctx) == XawEditError)
@@ -1187,22 +1043,14 @@ LocalInsertNewLine(ctx, event)
/*ARGSUSED*/
static void
-InsertNewLine(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+InsertNewLine(Widget w, XEvent *event, String *p, Cardinal *n)
{
(void) LocalInsertNewLine( (TextWidget) w, event);
}
/*ARGSUSED*/
static void
-InsertNewLineAndIndent(w, event, p, n)
-Widget w;
-XEvent *event;
-String *p;
-Cardinal *n;
+InsertNewLineAndIndent(Widget w, XEvent *event, String *p, Cardinal *n)
{
XawTextBlock text;
XawTextPosition pos1;
@@ -1281,11 +1129,7 @@ Cardinal *n;
*************************************************************/
static void
-SelectWord(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+SelectWord(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
XawTextPosition l, r;
@@ -1299,11 +1143,7 @@ Cardinal* num_params;
}
static void
-SelectAll(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+SelectAll(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
@@ -1313,13 +1153,8 @@ Cardinal* num_params;
}
static void
-ModifySelection(ctx, event, mode, action, params, num_params)
-TextWidget ctx;
-XEvent* event;
-XawTextSelectionMode mode;
-XawTextSelectionAction action;
-String* params; /* unused */
-Cardinal* num_params; /* unused */
+ModifySelection(TextWidget ctx, XEvent *event, XawTextSelectionMode mode,
+ XawTextSelectionAction action, String *params, Cardinal *num_params)
{
StartAction(ctx, event);
NotePosition(ctx, event);
@@ -1329,11 +1164,7 @@ Cardinal* num_params; /* unused */
/* ARGSUSED */
static void
-SelectStart(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params; /* unused */
-Cardinal* num_params; /* unused */
+SelectStart(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ModifySelection((TextWidget) w, event,
XawsmTextSelect, XawactionStart, params, num_params);
@@ -1341,22 +1172,14 @@ Cardinal* num_params; /* unused */
/* ARGSUSED */
static void
-SelectAdjust(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params; /* unused */
-Cardinal* num_params; /* unused */
+SelectAdjust(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ModifySelection((TextWidget) w, event,
XawsmTextSelect, XawactionAdjust, params, num_params);
}
static void
-SelectEnd(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+SelectEnd(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ModifySelection((TextWidget) w, event,
XawsmTextSelect, XawactionEnd, params, num_params);
@@ -1364,11 +1187,7 @@ Cardinal* num_params;
/* ARGSUSED */
static void
-ExtendStart(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params; /* unused */
-Cardinal* num_params; /* unused */
+ExtendStart(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ModifySelection((TextWidget) w, event,
XawsmTextExtend, XawactionStart, params, num_params);
@@ -1376,33 +1195,21 @@ Cardinal* num_params; /* unused */
/* ARGSUSED */
static void
-ExtendAdjust(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params; /* unused */
-Cardinal* num_params; /* unused */
+ExtendAdjust(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ModifySelection((TextWidget) w, event,
XawsmTextExtend, XawactionAdjust, params, num_params);
}
static void
-ExtendEnd(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+ExtendEnd(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ModifySelection((TextWidget) w, event,
XawsmTextExtend, XawactionEnd, params, num_params);
}
static void
-SelectSave(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+SelectSave(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
int num_atoms;
Atom* sel;
@@ -1428,11 +1235,7 @@ Cardinal* num_params;
/* ARGSUSED */
static void
-RedrawDisplay(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+RedrawDisplay(Widget w, XEvent *event, String *p, Cardinal *n)
{
StartAction( (TextWidget) w, event);
_XawTextClearAndCenterDisplay((TextWidget) w);
@@ -1441,11 +1244,7 @@ Cardinal* n;
/*ARGSUSED*/
static void
-TextFocusIn (w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+TextFocusIn (Widget w, XEvent *event, String *p, Cardinal *n)
{
TextWidget ctx = (TextWidget) w;
@@ -1460,11 +1259,7 @@ Cardinal* n;
/*ARGSUSED*/
static void
-TextFocusOut(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+TextFocusOut(Widget w, XEvent *event, String *p, Cardinal *n)
{
TextWidget ctx = (TextWidget) w;
@@ -1478,11 +1273,7 @@ Cardinal* n;
/*ARGSUSED*/
static void
-TextEnterWindow( w, event, params, num_params )
- Widget w;
- XEvent* event;
- String* params;
- Cardinal* num_params;
+TextEnterWindow(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
@@ -1496,11 +1287,7 @@ TextEnterWindow( w, event, params, num_params )
/*ARGSUSED*/
static void
-TextLeaveWindow( w, event, params, num_params )
- Widget w;
- XEvent* event;
- String* params;
- Cardinal* num_params;
+TextLeaveWindow(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
@@ -1522,8 +1309,7 @@ static XComposeStatus compose_status = {NULL, 0};
*/
static void
-AutoFill(ctx)
-TextWidget ctx;
+AutoFill(TextWidget ctx)
{
int width, height, x, line_num, max_width;
XawTextPosition ret_pos;
@@ -1565,11 +1351,7 @@ TextWidget ctx;
/*ARGSUSED*/
static void
-InsertChar(w, event, p, n)
-Widget w;
-XEvent* event;
-String* p;
-Cardinal* n;
+InsertChar(Widget w, XEvent *event, String *p, Cardinal *n)
{
TextWidget ctx = (TextWidget) w;
char *ptr, strbuf[BUFSIZ];
@@ -1647,9 +1429,7 @@ Cardinal* n;
* NOTE: In neither case will there be strings to free. */
static char*
-IfHexConvertHexElseReturnParam(param, len_return)
- char* param;
- int* len_return;
+IfHexConvertHexElseReturnParam(char *param, int *len_return)
{
char *p; /* steps through param char by char */
char c; /* holds the character pointed to by p */
@@ -1723,11 +1503,7 @@ IfHexConvertHexElseReturnParam(param, len_return)
/*ARGSUSED*/
static void
-InsertString(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+InsertString(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
XtAppContext app_con = XtWidgetToApplicationContext(w);
@@ -1801,11 +1577,7 @@ Cardinal* num_params;
* is only affected if the focus member of the event is true. */
static void
-DisplayCaret(w, event, params, num_params)
-Widget w;
-XEvent* event; /* CrossingNotify special-cased */
-String* params; /* Off, False, No, On, True, Yes, etc. */
-Cardinal* num_params; /* 0, 1 or 2 */
+DisplayCaret(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget)w;
Boolean display_caret = True;
@@ -1843,11 +1615,7 @@ Cardinal* num_params; /* 0, 1 or 2 */
/* ARGSUSED */
static void
-Multiply(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+Multiply(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
int mult;
@@ -1886,9 +1654,7 @@ Cardinal* num_params;
* or XawReplaceError if the widget can't be written to. */
static XawTextPosition
-StripOutOldCRs(ctx, from, to)
-TextWidget ctx;
-XawTextPosition from, to;
+StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to)
{
XawTextPosition startPos, endPos, eop_begin, eop_end, temp;
Widget src = ctx->text.source;
@@ -1986,9 +1752,7 @@ XawTextPosition from, to;
* inserts new CRs for FormRegion, thus for FormParagraph action */
static void
-InsertNewCRs(ctx, from, to)
-TextWidget ctx;
-XawTextPosition from, to;
+InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to)
{
XawTextPosition startPos, endPos, space, eol;
XawTextBlock text;
@@ -2060,9 +1824,7 @@ XawTextPosition from, to;
* RETURNS: XawEditDone if successful, or XawReplaceError. */
static int
-FormRegion(ctx, from, to)
-TextWidget ctx;
-XawTextPosition from, to;
+FormRegion(TextWidget ctx, XawTextPosition from, XawTextPosition to)
{
if ( from >= to ) return XawEditDone;
@@ -2086,11 +1848,7 @@ XawTextPosition from, to;
/* ARGSUSED */
static void
-FormParagraph(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
XawTextPosition from, to;
@@ -2116,11 +1874,7 @@ Cardinal* num_params;
/* ARGSUSED */
static void
-TransposeCharacters(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+TransposeCharacters(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
TextWidget ctx = (TextWidget) w;
XawTextPosition start, end;
@@ -2198,11 +1952,7 @@ Cardinal* num_params;
/*ARGSUSED*/
static void
-NoOp(w, event, params, num_params)
-Widget w;
-XEvent* event;
-String* params;
-Cardinal* num_params;
+NoOp(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
if (*num_params != 1)
return;
@@ -2225,11 +1975,7 @@ Cardinal* num_params;
#ifdef XAW_INTERNATIONALIZATION
/*ARGSUSED*/
static void
-Reconnect( w, event, params, num_params )
- Widget w;
- XEvent* event;
- String* params;
- Cardinal* num_params;
+Reconnect(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
_XawImReconnect( w );
}
--
1.7.5.1
More information about the xorg-devel
mailing list