diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-28 20:28:31 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-09-28 20:28:31 -0700 |
commit | 1e885381028c2e94a7f83a6489f11ed00f18b530 (patch) | |
tree | bf3e400bad54c628273f09ac11ddf541a020370a | |
parent | cad47868c99d4eac0ae2ad305399143a9aed3b2d (diff) |
Strip trailing whitespace
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | actions.c | 32 | ||||
-rw-r--r-- | app-defaults/XCalc | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | math.c | 38 | ||||
-rw-r--r-- | xcalc.c | 16 |
6 files changed, 49 insertions, 49 deletions
diff --git a/Makefile.am b/Makefile.am index 72ca878..52d2721 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ -# +# # Copyright 2005 Red Hat, Inc. -# +# # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that @@ -10,7 +10,7 @@ # specific, written prior permission. Red Hat makes no # representations about the suitability of this software for any purpose. It # is provided "as is" without express or implied warranty. -# +# # RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO # EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR @@ -167,7 +167,7 @@ static void clearit(Widget w, XEvent *e, String *vector, Cardinal *count) clearf(); post_op(); } - + /*ARGSUSED*/ static void cosine(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -258,7 +258,7 @@ static void exchange(Widget w, XEvent *e, String *vector, Cardinal *count) oneop(kEXC); post_op(); } - + /*ARGSUSED*/ static void factorial(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -274,7 +274,7 @@ static void inverse(Widget w, XEvent *e, String *vector, Cardinal *count) invf(); post_op(); } - + /*ARGSUSED*/ static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -282,7 +282,7 @@ static void leftParen(Widget w, XEvent *e, String *vector, Cardinal *count) lparf(); post_op(); } - + /*ARGSUSED*/ static void logarithm(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -298,7 +298,7 @@ static void multiply(Widget w, XEvent *e, String *vector, Cardinal *count) rpn ? twof(kMUL) : twoop(kMUL); post_op(); } - + /*ARGSUSED*/ static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -306,7 +306,7 @@ static void naturalLog(Widget w, XEvent *e, String *vector, Cardinal *count) oneop(kLN); post_op(); } - + /*ARGSUSED*/ static void negate(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -328,7 +328,7 @@ static void off(Widget w, XEvent *e, String *vector, Cardinal *count) offf(); post_op(); } - + /*ARGSUSED*/ static void pi(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -336,7 +336,7 @@ static void pi(Widget w, XEvent *e, String *vector, Cardinal *count) oneop(kPI); post_op(); } - + /*ARGSUSED*/ static void power(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -361,7 +361,7 @@ static void recall(Widget w, XEvent *e, String *vector, Cardinal *count) rpn ? memf(kRCL) : oneop(kRCL); post_op(); } - + /*ARGSUSED*/ static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -369,7 +369,7 @@ static void reciprocal(Widget w, XEvent *e, String *vector, Cardinal *count) oneop(kRECIP); post_op(); } - + /*ARGSUSED*/ static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -377,7 +377,7 @@ static void rightParen(Widget w, XEvent *e, String *vector, Cardinal *count) rparf(); post_op(); } - + /*ARGSUSED*/ static void roll(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -423,7 +423,7 @@ static void squareRoot(Widget w, XEvent *e, String *vector, Cardinal *count) oneop(kSQRT); post_op(); } - + /*ARGSUSED*/ static void store(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -439,7 +439,7 @@ static void subtract(Widget w, XEvent *e, String *vector, Cardinal *count) rpn ? twof(kSUB) : twoop(kSUB); post_op(); } - + /*ARGSUSED*/ static void sum(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -447,7 +447,7 @@ static void sum(Widget w, XEvent *e, String *vector, Cardinal *count) rpn ? memf(kSUM) : oneop(kSUM); post_op(); } - + /*ARGSUSED*/ static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -455,7 +455,7 @@ static void tangent(Widget w, XEvent *e, String *vector, Cardinal *count) oneop(kTAN); post_op(); } - + /*ARGSUSED*/ static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count) { @@ -463,7 +463,7 @@ static void tenpower(Widget w, XEvent *e, String *vector, Cardinal *count) oneop(k10X); post_op(); } - + /*ARGSUSED*/ static void XexchangeY(Widget w, XEvent *e, String *vector, Cardinal *count) { diff --git a/app-defaults/XCalc b/app-defaults/XCalc index ab114b8..540df58 100644 --- a/app-defaults/XCalc +++ b/app-defaults/XCalc @@ -197,7 +197,7 @@ XCalc*ti.button39.translations: #override<Btn1Down>,<Btn1Up>:negate()unset() XCalc*ti.button40.label: = XCalc*ti.button40.translations: #override<Btn1Down>,<Btn1Up>:equal()unset() -XCalc*ti.button1.horizDistance: 4 +XCalc*ti.button1.horizDistance: 4 XCalc*ti.button1.vertDistance: 12 XCalc*ti.button1.fromVert: bevel XCalc*ti.button2.fromHoriz: button1 diff --git a/configure.ac b/configure.ac index 202373e..ba73af4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Copyright 2005 Red Hat, Inc. -dnl +dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that @@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without dnl specific, written prior permission. Red Hat makes no dnl representations about the suitability of this software for any purpose. It dnl is provided "as is" without express or implied warranty. -dnl +dnl dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR @@ -8,9 +8,9 @@ * RPN mode added and port to X11 by Mark Rosenstein, MIT Project Athena * * Modified to be a client of the Xt toolkit and the Athena widget set by - * Donna Converse, MIT X Consortium. This is all that remains of the + * Donna Converse, MIT X Consortium. This is all that remains of the * original calculator, and it still needs to be rewritten. The HP - * functionality should be separated from the TI functionality. + * functionality should be separated from the TI functionality. * Beware the HP functions: there are still errors here. * * Geoffrey Coram fixed most of the HP mode bugs. @@ -62,7 +62,7 @@ double (*pow_p)() = pow; jmp_buf env; #endif - + /* This section is all of the state machine that implements the calculator * functions. Much of it is shared between the infix and rpn modes. */ @@ -73,7 +73,7 @@ static double drg2rad=PI/180.0; /* Conversion factors for trig funcs */ static double rad2drg=180.0/PI; static int entered=1; /* true if display contains a valid number. if==2, then use 'dnum', rather than the string - stored in the display. (for accuracy) + stored in the display. (for accuracy) if==3, then error occurred, only CLR & AC work */ /* entered seems to be overloaded - dmc */ static int lift_enabled = 0; /* for rpn mode only */ @@ -104,7 +104,7 @@ static int priority(int op); /* * The following is to deal with the unfortunate assumption that if errno - * is non-zero then an error has occurred. On some systems (e.g. Ultrix), + * is non-zero then an error has occurred. On some systems (e.g. Ultrix), * sscanf will call lower level routines that will set errno. */ @@ -123,7 +123,7 @@ parse_double (const char *src, const char *fmt, double *dp) int pre_op(int keynum) { if (keynum==-1) return(0); - + errno = 0; /* for non-IEEE machines */ if ( (entered==3) && !(keynum==kCLR || keynum==kOFF)) { @@ -203,7 +203,7 @@ DrawDisplay(void) char *estr = index(dispstr,'e'); /* search for exponent part */ if (!estr) dispstr[12]='\0'; /* no exp, just trunc. */ else { - if ((int) strlen(estr) <= 4) + if ((int) strlen(estr) <= 4) sprintf(tmp,"%.8s",dispstr); /* leftmost 8 chars */ else sprintf(tmp,"%.7s",dispstr); /* leftmost 7 chars */ @@ -280,7 +280,7 @@ numeric(int keynum) } if ((int) strlen(dispstr) >= MAXDISP) return; - + switch (keynum){ case kONE: st[0] = '1'; break; case kTWO: st[0] = '2'; break; @@ -328,7 +328,7 @@ bkspf(void) #else if (dispstr[strlen(dispstr)-1] == '.') Dpoint=0; -#endif +#endif dispstr[strlen(dispstr)-1] = 0; } if (strlen(dispstr) == 0) { @@ -444,7 +444,7 @@ twoop(int keynum) PushOp(keynum); /* with the new one */ return; } - + if (entered==1) parse_double(dispstr,"%lf",&dnum); @@ -463,9 +463,9 @@ twoop(int keynum) /* now, if the current op (keynum) is of higher priority than the lastop, the current - op and number are just pushed on top + op and number are just pushed on top Priorities: (Y^X) > *,/ > +,- */ - + if (priority(keynum) > priority(lastop)) { PushNum(dnum); PushOp(lastop); @@ -490,8 +490,8 @@ twoop(int keynum) else { /* op stack is empty, push op and num */ PushOp(keynum); PushNum(dnum); - } -} + } +} /* Two operand functions for rpn calc */ void @@ -583,7 +583,7 @@ equf(void) sprintf(dispstr,"%.8g",dnum); DrawDisplay(); } - + void lparf(void) { @@ -618,7 +618,7 @@ rparf(void) if (!flagPAREN) return; - + clrdisp++; Dpoint=exponent=0; @@ -669,7 +669,7 @@ drgf(void) flagINV=0; sprintf(dispstr,"%.8g",dnum); } - + flagINV=0; drgmode = (drgmode + 1) % 3; switch (drgmode) { @@ -751,11 +751,11 @@ oneop(int keynum) break; } dtmp = floor(dnum); i = dtmp; - for (j=1,dnum=1.0; j<=i; j++) + for (j=1,dnum=1.0; j<=i; j++) dnum*=(float) j; break; } - + if (entered==3) { /* error */ DrawDisplay(); return; @@ -68,7 +68,7 @@ char dispstr[LCD_STR_LEN]; /* string to show up in the LCD */ Atom wm_delete_window; /* see ICCCM section 5.2.2 */ /* - * local data + * local data */ static Display *dpy = NULL; /* connection to the X server */ static Widget toplevel=NULL; /* top level shell widget */ @@ -120,7 +120,7 @@ main(int argc, char **argv) toplevel = XtAppInitialize(&xtcontext, "XCalc", Options, XtNumber(Options), &argc, argv, NULL, NULL, 0); if (argc != 1) Syntax(argc, argv); - + XtSetArg(args[0], XtNinput, True); XtSetValues(toplevel, args, ONE); @@ -131,7 +131,7 @@ main(int argc, char **argv) XtAppAddActions(xtcontext, Actions, ActionsCount); - XtOverrideTranslations(toplevel, + XtOverrideTranslations(toplevel, XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()\n")); XtRealizeWidget(toplevel); @@ -203,7 +203,7 @@ static void create_display(Widget parent) XtNumber(args)); /* INV - the inverse function indicator */ - ind[XCalc_INVERSE] = XtCreateManagedWidget("INV", labelWidgetClass, + ind[XCalc_INVERSE] = XtCreateManagedWidget("INV", labelWidgetClass, screen, args, XtNumber(args)); /* DEG - the degrees switch indicator */ @@ -225,8 +225,8 @@ static void create_display(Widget parent) /* * Do all the buttons. The application defaults file will give the - * default button placement, default button labels, and default - * actions connected to the buttons. The user can change any of + * default button placement, default button labels, and default + * actions connected to the buttons. The user can change any of * these defaults in an environment-specific resource file. */ @@ -292,7 +292,7 @@ void Quit(void) exit(0); } -/* +/* * recite and die. */ static void Syntax(int argc, char **argv) @@ -311,7 +311,7 @@ static void Syntax(int argc, char **argv) exit(1); } -/* +/* * I use actions on the toggle widget to support selections. This * means that the user may not do a partial selection of the number * displayed in the `liquid crystal display.' Copying numbers into |