From 1245fbd2a8d60bab7b16b8a1d3c0122fee72f53f Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 00:57:38 +0200 Subject: Nuke trailing whitespace. Signed-off-by: Ralf Baechle --- hdlcutil/fl/xfsmdiag_main.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'hdlcutil/fl/xfsmdiag_main.cxx') diff --git a/hdlcutil/fl/xfsmdiag_main.cxx b/hdlcutil/fl/xfsmdiag_main.cxx index 695d98f..1fd0dd8 100644 --- a/hdlcutil/fl/xfsmdiag_main.cxx +++ b/hdlcutil/fl/xfsmdiag_main.cxx @@ -58,7 +58,7 @@ static unsigned int drawflags = 0; /* ---------------------------------------------------------------------- */ scope::scope(int x, int y, int w, int h, const char *l) - : Fl_Box(x, y, w, h, l) + : Fl_Box(x, y, w, h, l) { box(FL_DOWN_FRAME); X = x+3; @@ -205,8 +205,8 @@ void scope::drawdata(short data[], int len, int xm) XGCValues gcv; mode(); - if (!pixmalloc || (drawmode != HDRVC_DIAGMODE_CONSTELLATION && - drawmode != HDRVC_DIAGMODE_INPUT && + if (!pixmalloc || (drawmode != HDRVC_DIAGMODE_CONSTELLATION && + drawmode != HDRVC_DIAGMODE_INPUT && drawmode != HDRVC_DIAGMODE_DEMOD)) return; gcv.line_width = 1; @@ -268,7 +268,7 @@ void cb_mode(Fl_Check_Button *, long which) case 256: drawflags ^= HDRVC_DIAGFLAG_DCDGATE; break; - + case 0: scdisp->mode(HDRVC_DIAGMODE_OFF); drawflags = 0; @@ -298,7 +298,7 @@ void cb_quit(Fl_Button *, long) { struct sm_diag_data diag; short data; - + diag.mode = HDRVC_DIAGMODE_OFF; diag.flags = 0; diag.datalen = 1; @@ -330,7 +330,7 @@ void cb_timer(void *) /* * draw scope */ - if ((ret = hdrvc_diag2(scdisp->mode(), drawflags, data, sizeof(data) / sizeof(short), + if ((ret = hdrvc_diag2(scdisp->mode(), drawflags, data, sizeof(data) / sizeof(short), &samplesperbit)) < 0) { perror("hdrvc_diag2"); exit(1); @@ -341,7 +341,7 @@ void cb_timer(void *) /* ---------------------------------------------------------------------- */ -static const char *usage_str = +static const char *usage_str = "[-i smif]\n" " -i: specify the name of the baycom kernel driver interface\n\n"; @@ -396,13 +396,13 @@ int main(int argc, char *argv[]) if (ret < 0) { perror("hdrvc_get_mode_name"); modename->hide(); - } else + } else modename->value(name); ret = hdrvc_get_driver_name(name, sizeof(name)); if (ret < 0) { perror("hdrvc_get_driver_name"); drivername->hide(); - } else + } else drivername->value(name); Fl::add_timeout(0.1, cb_timer); scopewindow->show(); -- cgit v1.2.3 From 5feb3d651dbd1b096a26963bd1dffcfe0a5f9eea Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 01:42:05 +0200 Subject: Remove useless initializations to 0 or NULL. They only inflate the .data section of the binary. Initializations to FALSE are still left to do. Signed-off-by: Ralf Baechle --- hdlcutil/fl/xfsmdiag_main.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hdlcutil/fl/xfsmdiag_main.cxx') diff --git a/hdlcutil/fl/xfsmdiag_main.cxx b/hdlcutil/fl/xfsmdiag_main.cxx index 1fd0dd8..2e05c29 100644 --- a/hdlcutil/fl/xfsmdiag_main.cxx +++ b/hdlcutil/fl/xfsmdiag_main.cxx @@ -53,7 +53,7 @@ /* ---------------------------------------------------------------------- */ static char *progname; -static unsigned int drawflags = 0; +static unsigned int drawflags; /* ---------------------------------------------------------------------- */ -- cgit v1.2.3 From 90f6ab2eceada8987fc6e5017ae415eade165c00 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 5 Jun 2013 01:47:40 +0200 Subject: Use tabs for indentation, not spaces. Signed-off-by: Ralf Baechle --- hdlcutil/fl/xfsmdiag_main.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'hdlcutil/fl/xfsmdiag_main.cxx') diff --git a/hdlcutil/fl/xfsmdiag_main.cxx b/hdlcutil/fl/xfsmdiag_main.cxx index 2e05c29..dce7029 100644 --- a/hdlcutil/fl/xfsmdiag_main.cxx +++ b/hdlcutil/fl/xfsmdiag_main.cxx @@ -94,7 +94,7 @@ void scope::resize(int xx, int yy, int ww, int hh) void scope::draw() { GC gc; - XGCValues gcv; + XGCValues gcv; /* cannot use draw_box(); as it clears the whole window -> flicker */ /* from fl_boxtype.C, fl_down_frame */ @@ -178,17 +178,17 @@ void scope::mode(int dmode) void scope::clear(void) { GC gc; - XGCValues gcv; + XGCValues gcv; if (!pixmalloc) return; gcv.line_width = 1; - gcv.line_style = LineSolid; + gcv.line_style = LineSolid; gcv.fill_style = FillSolid; - gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle | GCFillStyle, &gcv); - XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes); + gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle | GCFillStyle, &gcv); + XSetState(fl_display, gc, col_background, col_background, GXcopy, AllPlanes); XFillRectangle(fl_display, pixmap, gc, 0, 0, W, H); - XFreeGC(fl_display, gc); + XFreeGC(fl_display, gc); redraw(); } @@ -201,8 +201,8 @@ void scope::clear(void) void scope::drawdata(short data[], int len, int xm) { int cnt; - GC gc; - XGCValues gcv; + GC gc; + XGCValues gcv; mode(); if (!pixmalloc || (drawmode != HDRVC_DIAGMODE_CONSTELLATION && @@ -210,8 +210,8 @@ void scope::drawdata(short data[], int len, int xm) drawmode != HDRVC_DIAGMODE_DEMOD)) return; gcv.line_width = 1; - gcv.line_style = LineSolid; - gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle, &gcv); + gcv.line_style = LineSolid; + gc = XCreateGC(fl_display, pixmap, GCLineWidth | GCLineStyle, &gcv); if (drawmode == HDRVC_DIAGMODE_CONSTELLATION) { #define XCOORD(x) ((SHRT_MAX - (int)(x)) * W / USHRT_MAX) #define YCOORD(y) ((SHRT_MAX - (int)(y)) * H / USHRT_MAX) @@ -241,7 +241,7 @@ void scope::drawdata(short data[], int len, int xm) #undef XCOORD #undef YCOORD } - XFreeGC(fl_display, gc); + XFreeGC(fl_display, gc); redraw(); } @@ -349,7 +349,7 @@ static const char *usage_str = int main(int argc, char *argv[]) { - int c, i; + int c, i; int ret; unsigned int ifflags; char name[64]; -- cgit v1.2.3