aboutsummaryrefslogtreecommitdiff
path: root/apps/xcalc/actions.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-02-22 21:39:56 +0100
committermarha <marha@users.sourceforge.net>2015-02-22 21:39:56 +0100
commit462f18c7b25fe3e467f837647d07ab0a78aa8d2b (patch)
treefc8013c0a1bac05a1945846c1697e973f4c35013 /apps/xcalc/actions.c
parent36f711ee12b6dd5184198abed3aa551efb585587 (diff)
downloadvcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.gz
vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.tar.bz2
vcxsrv-462f18c7b25fe3e467f837647d07ab0a78aa8d2b.zip
Merged origin/release (checked in because wanted to merge new stuff)
Diffstat (limited to 'apps/xcalc/actions.c')
-rw-r--r--apps/xcalc/actions.c169
1 files changed, 84 insertions, 85 deletions
diff --git a/apps/xcalc/actions.c b/apps/xcalc/actions.c
index 69bed4cc2..50bf7b476 100644
--- a/apps/xcalc/actions.c
+++ b/apps/xcalc/actions.c
@@ -45,48 +45,47 @@ from the X Consortium.
#define XCALC_PRE_OP(keynum) if (pre_op(keynum)) return;
#endif
-static void add(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void back(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void bell(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void decimal(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void degree(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void digit(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void divide(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void e(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void enter(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void epower(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void equal(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void negate(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void nop(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void off(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void pi(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void power(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void quit(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void recall(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void roll(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void scientific(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void selection(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void sine(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void square(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void store(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void sum(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count);
-static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count);
+static void add(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void back(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void bell(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void clearit(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void cosine(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void decimal(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void degree(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void digit(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void divide(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void e(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void enter(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void epower(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void equal(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void exchange(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void factorial(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void inverse(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void leftParen(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void logarithm(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void multiply(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void naturalLog(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void negate(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void nop(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void off(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void pi(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void power(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void quit(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void recall(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void reciprocal(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void rightParen(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void roll(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void scientific(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void selection(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void sine(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void square(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void squareRoot(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void store(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void subtract(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void sum(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void tangent(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void tenpower(Widget w, XEvent *ev, String *vector, Cardinal *count);
+static void XexchangeY(Widget w, XEvent *ev, String *vector, Cardinal *count);
/*
* calculator action table
@@ -139,7 +138,7 @@ XtActionsRec Actions[] = {
int ActionsCount = XtNumber(Actions);
/*ARGSUSED*/
-static void add(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void add(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kADD);
rpn ? twof(kADD) : twoop(kADD);
@@ -147,7 +146,7 @@ static void add(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void back(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void back(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kBKSP);
bkspf();
@@ -155,13 +154,13 @@ static void back(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void bell(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void bell(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
ringbell();
}
/*ARGSUSED*/
-static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void clearit(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kCLR);
clearf();
@@ -169,7 +168,7 @@ static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void cosine(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kCOS);
oneop(kCOS);
@@ -177,7 +176,7 @@ static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void decimal(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void decimal(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kDEC);
decf();
@@ -185,7 +184,7 @@ static void decimal(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void degree(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void degree(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kDRG);
drgf();
@@ -193,7 +192,7 @@ static void degree(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void digit(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void digit(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
switch (vector[0][0])
{
@@ -212,7 +211,7 @@ static void digit(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void divide(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void divide(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kDIV);
rpn ? twof(kDIV) : twoop(kDIV);
@@ -220,7 +219,7 @@ static void divide(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void e(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void e(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kE);
oneop(kE);
@@ -228,7 +227,7 @@ static void e(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void enter(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void enter(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kENTR);
entrf();
@@ -236,7 +235,7 @@ static void enter(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void epower(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void epower(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kEXP);
oneop(kEXP);
@@ -244,7 +243,7 @@ static void epower(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void equal(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void equal(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kEQU);
equf();
@@ -252,7 +251,7 @@ static void equal(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void exchange(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kEXC);
oneop(kEXC);
@@ -260,7 +259,7 @@ static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void factorial(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kFACT);
oneop(kFACT);
@@ -268,7 +267,7 @@ static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void inverse(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kINV);
invf();
@@ -276,7 +275,7 @@ static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void leftParen(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kLPAR);
lparf();
@@ -284,7 +283,7 @@ static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void logarithm(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kLOG);
oneop(kLOG);
@@ -292,7 +291,7 @@ static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void multiply(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kMUL);
rpn ? twof(kMUL) : twoop(kMUL);
@@ -300,7 +299,7 @@ static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void naturalLog(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kLN);
oneop(kLN);
@@ -308,7 +307,7 @@ static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void negate(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void negate(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kNEG);
negf();
@@ -316,13 +315,13 @@ static void negate(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void nop(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void nop(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
ringbell();
}
/*ARGSUSED*/
-static void off(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void off(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kOFF);
offf();
@@ -330,7 +329,7 @@ static void off(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void pi(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void pi(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kPI);
oneop(kPI);
@@ -338,7 +337,7 @@ static void pi(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void power(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void power(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kPOW);
rpn ? twof(kPOW) : twoop(kPOW);
@@ -346,16 +345,16 @@ static void power(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void quit(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void quit(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
- if (e->type == ClientMessage && e->xclient.data.l[0] != wm_delete_window)
+ if (ev->type == ClientMessage && ev->xclient.data.l[0] != wm_delete_window)
ringbell();
else
Quit();
}
/*ARGSUSED*/
-static void recall(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void recall(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kRCL);
rpn ? memf(kRCL) : oneop(kRCL);
@@ -363,7 +362,7 @@ static void recall(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void reciprocal(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kRECIP);
oneop(kRECIP);
@@ -371,7 +370,7 @@ static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void rightParen(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kRPAR);
rparf();
@@ -379,7 +378,7 @@ static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void roll(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void roll(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kROLL);
rollf();
@@ -387,7 +386,7 @@ static void roll(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void scientific(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void scientific(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kEE);
eef();
@@ -395,13 +394,13 @@ static void scientific(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void selection(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void selection(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
- do_select(((XButtonReleasedEvent *)e)->time);
+ do_select(((XButtonReleasedEvent *)ev)->time);
}
/*ARGSUSED*/
-static void sine(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void sine(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kSIN);
oneop(kSIN);
@@ -409,7 +408,7 @@ static void sine(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void square(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void square(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kSQR);
oneop(kSQR);
@@ -417,7 +416,7 @@ static void square(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void squareRoot(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kSQRT);
oneop(kSQRT);
@@ -425,7 +424,7 @@ static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void store(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void store(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kSTO);
rpn ? memf(kSTO) : oneop(kSTO);
@@ -433,7 +432,7 @@ static void store(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void subtract(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kSUB);
rpn ? twof(kSUB) : twoop(kSUB);
@@ -441,7 +440,7 @@ static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void sum(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void sum(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kSUM);
rpn ? memf(kSUM) : oneop(kSUM);
@@ -449,7 +448,7 @@ static void sum(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void tangent(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kTAN);
oneop(kTAN);
@@ -457,7 +456,7 @@ static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void tenpower(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(k10X);
oneop(k10X);
@@ -465,7 +464,7 @@ static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count)
}
/*ARGSUSED*/
-static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count)
+static void XexchangeY(Widget w, XEvent *ev, String *vector, Cardinal *count)
{
XCALC_PRE_OP(kXXY);
twof(kXXY);