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/xfhdlcchpar_main.cxx | 2 +- hdlcutil/fl/xfhdlcst_main.cxx | 2 +- hdlcutil/fl/xfsmdiag.cxx | 40 ++++---- hdlcutil/fl/xfsmdiag_main.cxx | 24 ++--- hdlcutil/fl/xfsmmixer.cxx | 202 +++++++++++++++++++-------------------- hdlcutil/fl/xfsmmixer_main.cxx | 4 +- hdlcutil/hdlcdrv.9 | 26 ++--- hdlcutil/hdrvcomm.c | 2 +- hdlcutil/hdrvcomm.h | 26 ++--- hdlcutil/sethdlc.c | 2 +- hdlcutil/smdiag.c | 172 ++++++++++++++++----------------- hdlcutil/smmixer.c | 20 ++-- 12 files changed, 261 insertions(+), 261 deletions(-) (limited to 'hdlcutil') diff --git a/hdlcutil/fl/xfhdlcchpar_main.cxx b/hdlcutil/fl/xfhdlcchpar_main.cxx index 7078d36..4b01138 100644 --- a/hdlcutil/fl/xfhdlcchpar_main.cxx +++ b/hdlcutil/fl/xfhdlcchpar_main.cxx @@ -79,7 +79,7 @@ static const char *usage_str = int main(int argc, char *argv[]) { - int c, i; + int c, i; int ret; struct hdrvc_channel_params cp; diff --git a/hdlcutil/fl/xfhdlcst_main.cxx b/hdlcutil/fl/xfhdlcst_main.cxx index 4542fe1..85a66db 100644 --- a/hdlcutil/fl/xfhdlcst_main.cxx +++ b/hdlcutil/fl/xfhdlcst_main.cxx @@ -70,7 +70,7 @@ static const char *usage_str = int main(int argc, char *argv[]) { - int c, i; + int c, i; int ret; struct hdrvc_channel_state cs; #ifdef HDRVC_KERNEL diff --git a/hdlcutil/fl/xfsmdiag.cxx b/hdlcutil/fl/xfsmdiag.cxx index 84c4bac..7232cfa 100644 --- a/hdlcutil/fl/xfsmdiag.cxx +++ b/hdlcutil/fl/xfsmdiag.cxx @@ -52,36 +52,36 @@ Fl_Window* create_the_forms() { { Fl_Group* o = scopemode = new Fl_Group(550, 10, 140, 130); o->align(FL_ALIGN_CENTER); { Fl_Box* o = new Fl_Box(550, 10, 140, 130); - o->box(FL_DOWN_BOX); + o->box(FL_DOWN_BOX); } { Fl_Check_Button* o = sm_off = new Fl_Check_Button(560, 20, 120, 20, "Off"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)cb_mode, (void*)(0)); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)cb_mode, (void*)(0)); } { Fl_Check_Button* o = sm_input = new Fl_Check_Button(560, 40, 120, 20, "Input"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)cb_mode, (void*)(1)); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)cb_mode, (void*)(1)); } { Fl_Check_Button* o = sm_demod = new Fl_Check_Button(560, 60, 120, 20, "Demodulator"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)cb_mode, (void*)(2)); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)cb_mode, (void*)(2)); } { Fl_Check_Button* o = sm_constell = new Fl_Check_Button(560, 80, 120, 20, "Constellation"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)cb_mode, (void*)(3)); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)cb_mode, (void*)(3)); } { Fl_Check_Button* o = sm_dcd = new Fl_Check_Button(560, 110, 120, 20, "Gated with DCD"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)cb_mode, (void*)(256)); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)cb_mode, (void*)(256)); } o->end(); } 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]; diff --git a/hdlcutil/fl/xfsmmixer.cxx b/hdlcutil/fl/xfsmmixer.cxx index 57b5306..b5ba9b1 100644 --- a/hdlcutil/fl/xfsmmixer.cxx +++ b/hdlcutil/fl/xfsmmixer.cxx @@ -71,70 +71,70 @@ Fl_Window* create_form_ad1848() { { Fl_Group* o = ad1848_srcr = new Fl_Group(180, 150, 100, 120); o->align(FL_ALIGN_CENTER); { Fl_Box* o = new Fl_Box(180, 150, 100, 120); - o->box(FL_DOWN_BOX); + o->box(FL_DOWN_BOX); } { Fl_Check_Button* o = ad1848_srcr_line = new Fl_Check_Button(190, 180, 60, 20, "Line"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } { Fl_Check_Button* o = ad1848_srcr_aux1 = new Fl_Check_Button(190, 200, 60, 20, "Aux1"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } { Fl_Check_Button* o = ad1848_srcr_mic = new Fl_Check_Button(190, 220, 60, 20, "Mic"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } { Fl_Check_Button* o = ad1848_srcr_dac = new Fl_Check_Button(190, 240, 60, 20, "DAC"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } { Fl_Box* o = new Fl_Box(190, 160, 60, 20, "Right source"); - o->box(FL_FLAT_BOX); - o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + o->box(FL_FLAT_BOX); + o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); } o->end(); } { Fl_Group* o = ad1848_srcl = new Fl_Group(180, 20, 100, 120); o->align(FL_ALIGN_CENTER); { Fl_Box* o = new Fl_Box(180, 20, 100, 120); - o->box(FL_DOWN_BOX); + o->box(FL_DOWN_BOX); } { Fl_Box* o = new Fl_Box(190, 30, 60, 20, "Left source"); - o->box(FL_FLAT_BOX); - o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + o->box(FL_FLAT_BOX); + o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); } { Fl_Check_Button* o = ad1848_srcl_line = new Fl_Check_Button(190, 50, 60, 20, "Line"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } { Fl_Check_Button* o = ad1848_srcl_aux1 = new Fl_Check_Button(190, 70, 60, 20, "Aux1"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } { Fl_Check_Button* o = ad1848_srcl_mic = new Fl_Check_Button(190, 90, 60, 20, "Mic"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } { Fl_Check_Button* o = ad1848_srcl_dac = new Fl_Check_Button(190, 110, 60, 20, "DAC"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ad1848); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ad1848); } o->end(); } @@ -216,29 +216,29 @@ Fl_Window* create_form_ct1345() { { Fl_Group* o = ct1345_src = new Fl_Group(100, 20, 70, 100); o->align(FL_ALIGN_CENTER); { Fl_Box* o = new Fl_Box(100, 20, 70, 100); - o->box(FL_DOWN_BOX); + o->box(FL_DOWN_BOX); } { Fl_Check_Button* o = ct1345_src_mic = new Fl_Check_Button(110, 50, 50, 20, "Mic"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1345); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1345); } { Fl_Check_Button* o = ct1345_src_cd = new Fl_Check_Button(110, 70, 50, 20, "CD"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1345); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1345); } { Fl_Check_Button* o = ct1345_src_line = new Fl_Check_Button(110, 90, 50, 20, "Line"); - o->type(102); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1345); + o->type(102); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1345); } { Fl_Box* o = new Fl_Box(110, 30, 50, 20, "Source"); - o->box(FL_FLAT_BOX); - o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + o->box(FL_FLAT_BOX); + o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); } o->end(); } @@ -342,92 +342,92 @@ Fl_Window* create_form_ct1745() { { Fl_Group* o = ct1745_srcl = new Fl_Group(180, 20, 110, 180); o->align(FL_ALIGN_CENTER); { Fl_Box* o = new Fl_Box(180, 20, 110, 180); - o->box(FL_DOWN_BOX); + o->box(FL_DOWN_BOX); } { Fl_Box* o = new Fl_Box(191, 29, 89, 18, "Left source"); - o->box(FL_FLAT_BOX); - o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + o->box(FL_FLAT_BOX); + o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); } { Fl_Check_Button* o = ct1745_srcl_mic = new Fl_Check_Button(190, 50, 90, 20, "Mic"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcl_cdl = new Fl_Check_Button(190, 70, 90, 20, "CD left"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcl_cdr = new Fl_Check_Button(190, 90, 90, 20, "CD right"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcl_linel = new Fl_Check_Button(190, 110, 90, 20, "Line left"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcl_midil = new Fl_Check_Button(190, 150, 90, 20, "MIDI left"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcl_midir = new Fl_Check_Button(190, 170, 90, 20, "MIDI right"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcl_liner = new Fl_Check_Button(190, 130, 90, 20, "Line right"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } o->end(); } { Fl_Group* o = ct1745_srcr = new Fl_Group(300, 20, 110, 180); o->align(FL_ALIGN_CENTER); { Fl_Box* o = new Fl_Box(300, 20, 110, 180); - o->box(FL_DOWN_BOX); + o->box(FL_DOWN_BOX); } { Fl_Box* o = new Fl_Box(311, 29, 89, 18, "Right source"); - o->box(FL_FLAT_BOX); - o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + o->box(FL_FLAT_BOX); + o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); } { Fl_Check_Button* o = ct1745_srcr_mic = new Fl_Check_Button(310, 50, 90, 20, "Mic"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcr_cdl = new Fl_Check_Button(310, 70, 90, 20, "CD left"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcr_cdr = new Fl_Check_Button(310, 90, 90, 20, "CD right"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcr_linel = new Fl_Check_Button(310, 110, 90, 20, "Line left"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcr_midil = new Fl_Check_Button(310, 150, 90, 20, "MIDI left"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcr_midir = new Fl_Check_Button(310, 170, 90, 20, "MIDI right"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } { Fl_Check_Button* o = ct1745_srcr_liner = new Fl_Check_Button(310, 130, 90, 20, "Line right"); - o->down_box(FL_DIAMOND_DOWN_BOX); - o->selection_color(3); - o->callback((Fl_Callback*)update_ct1745); + o->down_box(FL_DIAMOND_DOWN_BOX); + o->selection_color(3); + o->callback((Fl_Callback*)update_ct1745); } o->end(); } diff --git a/hdlcutil/fl/xfsmmixer_main.cxx b/hdlcutil/fl/xfsmmixer_main.cxx index 83774a0..b33533f 100644 --- a/hdlcutil/fl/xfsmmixer_main.cxx +++ b/hdlcutil/fl/xfsmmixer_main.cxx @@ -50,7 +50,7 @@ static unsigned int mixdevice; static int do_mix_ioctl(int cmd, struct sm_mixer_data *mixdat) { - struct sm_ioctl par; + struct sm_ioctl par; int i; par.cmd = cmd; @@ -309,7 +309,7 @@ static const char *usage_str = int main(int argc, char *argv[]) { - int c, i; + int c, i; struct sm_mixer_data mixdat; unsigned char mdata; diff --git a/hdlcutil/hdlcdrv.9 b/hdlcutil/hdlcdrv.9 index 31b0e7e..e76c391 100644 --- a/hdlcutil/hdlcdrv.9 +++ b/hdlcutil/hdlcdrv.9 @@ -118,11 +118,11 @@ the HDLC driver: .nf struct hdlcdrv_ops { - const char *\fIdrvname\fP; - const char *\fIdrvinfo\fP; - int (*\fIopen\fP)(struct device *); - int (*\fIclose\fP)(struct device *); - int (*\fIioctl\fP)(struct device *, struct ifreq *, int); + const char *\fIdrvname\fP; + const char *\fIdrvinfo\fP; + int (*\fIopen\fP)(struct device *); + int (*\fIclose\fP)(struct device *); + int (*\fIioctl\fP)(struct device *, struct ifreq *, int); }; .fi @@ -149,14 +149,14 @@ from and to the driver using the following struct: .nf struct hdlcdrv_ioctl { - int cmd; - union { - struct hdlcdrv_params mp; - struct hdlcdrv_channel_params cp; - struct hdlcdrv_channel_state cs; - unsigned int calibrate; - unsigned char bits; - } data; + int cmd; + union { + struct hdlcdrv_params mp; + struct hdlcdrv_channel_params cp; + struct hdlcdrv_channel_state cs; + unsigned int calibrate; + unsigned char bits; + } data; }; .fi diff --git a/hdlcutil/hdrvcomm.c b/hdlcutil/hdrvcomm.c index d27a37f..c362c1b 100644 --- a/hdlcutil/hdrvcomm.c +++ b/hdlcutil/hdrvcomm.c @@ -244,7 +244,7 @@ void hdrvc_init(void) fprintf(stderr, "%s: Error %s (%i), cannot ioctl SIOCGIFHWADDR %s\n", prg_name, strerror(errno), errno, if_name); exit(-1); - } + } if (ifr.ifr_hwaddr.sa_family != ARPHRD_AX25) { fprintf(stderr, "%s: Error, interface %s not AX25 (%i)\n", prg_name, if_name, ifr.ifr_hwaddr.sa_family); diff --git a/hdlcutil/hdrvcomm.h b/hdlcutil/hdrvcomm.h index fbb4965..520f2d9 100644 --- a/hdlcutil/hdrvcomm.h +++ b/hdlcutil/hdrvcomm.h @@ -49,22 +49,22 @@ extern "C" { /* ---------------------------------------------------------------------- */ struct hdrvc_channel_params { - int tx_delay; /* the transmitter keyup delay in 10ms units */ - int tx_tail; /* the transmitter keyoff delay in 10ms units */ - int slottime; /* the slottime in 10ms; usually 10 = 100ms */ - int ppersist; /* the p-persistence 0..255 */ - int fulldup; /* some driver do not support full duplex, setting */ - /* this just makes them send even if DCD is on */ + int tx_delay; /* the transmitter keyup delay in 10ms units */ + int tx_tail; /* the transmitter keyoff delay in 10ms units */ + int slottime; /* the slottime in 10ms; usually 10 = 100ms */ + int ppersist; /* the p-persistence 0..255 */ + int fulldup; /* some driver do not support full duplex, setting */ + /* this just makes them send even if DCD is on */ }; struct hdrvc_channel_state { - int ptt; - int dcd; - int ptt_keyed; - unsigned long tx_packets; - unsigned long tx_errors; - unsigned long rx_packets; - unsigned long rx_errors; + int ptt; + int dcd; + int ptt_keyed; + unsigned long tx_packets; + unsigned long tx_errors; + unsigned long rx_packets; + unsigned long rx_errors; }; /* ---------------------------------------------------------------------- */ diff --git a/hdlcutil/sethdlc.c b/hdlcutil/sethdlc.c index 3389a9e..a9f16b3 100644 --- a/hdlcutil/sethdlc.c +++ b/hdlcutil/sethdlc.c @@ -222,7 +222,7 @@ static void print_bits(int (*bitproc)(void)) if (errno == EAGAIN) return; fprintf(stderr, "%s: Error %s (%i), cannot ioctl\n", - progname, strerror(errno), errno); + progname, strerror(errno), errno); return; } strcpy(cp = str, "00000000"); diff --git a/hdlcutil/smdiag.c b/hdlcutil/smdiag.c index 6f9a79b..16d34f0 100644 --- a/hdlcutil/smdiag.c +++ b/hdlcutil/smdiag.c @@ -86,21 +86,21 @@ static int x_error_handler(Display *disp, XErrorEvent *evt) static int openwindow(char *disp, int constell, int samplesperbit) { - XSetWindowAttributes attr; - XGCValues gr_values; - XColor color, dummy; - XSizeHints sizehints; - - if (!(display = XOpenDisplay(NULL))) - return -1; - XSetErrorHandler(x_error_handler); - XAllocNamedColor(display, DefaultColormap(display, 0), "red", - &color, &dummy); + XSetWindowAttributes attr; + XGCValues gr_values; + XColor color, dummy; + XSizeHints sizehints; + + if (!(display = XOpenDisplay(NULL))) + return -1; + XSetErrorHandler(x_error_handler); + XAllocNamedColor(display, DefaultColormap(display, 0), "red", + &color, &dummy); col_zeroline = color.pixel; col_background = WhitePixel(display, 0); col_trace = BlackPixel(display, 0); - attr.background_pixel = col_background; - if (!(window = XCreateWindow(display, XRootWindow(display, 0), + attr.background_pixel = col_background; + if (!(window = XCreateWindow(display, XRootWindow(display, 0), 200, 200, WIDTH, HEIGHT, 5, DefaultDepth(display, 0), InputOutput, DefaultVisual(display, 0), @@ -113,28 +113,28 @@ static int openwindow(char *disp, int constell, int samplesperbit) fprintf(stderr, "smdiag: unable to open offscreen pixmap\n"); exit(1); } - xmul = WIDTH / (2*(samplesperbit > 0 ? samplesperbit : 1)); - XSelectInput(display, window, KeyPressMask | StructureNotifyMask + xmul = WIDTH / (2*(samplesperbit > 0 ? samplesperbit : 1)); + XSelectInput(display, window, KeyPressMask | StructureNotifyMask | ExposureMask) ; - XAllocNamedColor(display, DefaultColormap(display, 0), "red", - &color, &dummy); - gr_values.foreground = col_trace; - gr_values.line_width = 1; - gr_values.line_style = LineSolid; - gr_context = XCreateGC(display, window, GCForeground | GCLineWidth | - GCLineStyle, &gr_values); - XStoreName(display, window, "diagnostics"); - /* - * Do not allow the window to be resized - */ - memset(&sizehints, 0, sizeof(sizehints)); - sizehints.min_width = sizehints.max_width = WIDTH; - sizehints.min_height = sizehints.max_height = HEIGHT; - sizehints.flags = PMinSize | PMaxSize; - XSetWMNormalHints(display, window, &sizehints); - XMapWindow(display, window); - XSynchronize(display, 1); - return 0; + XAllocNamedColor(display, DefaultColormap(display, 0), "red", + &color, &dummy); + gr_values.foreground = col_trace; + gr_values.line_width = 1; + gr_values.line_style = LineSolid; + gr_context = XCreateGC(display, window, GCForeground | GCLineWidth | + GCLineStyle, &gr_values); + XStoreName(display, window, "diagnostics"); + /* + * Do not allow the window to be resized + */ + memset(&sizehints, 0, sizeof(sizehints)); + sizehints.min_width = sizehints.max_width = WIDTH; + sizehints.min_height = sizehints.max_height = HEIGHT; + sizehints.flags = PMinSize | PMaxSize; + XSetWMNormalHints(display, window, &sizehints); + XMapWindow(display, window); + XSynchronize(display, 1); + return 0; } #undef WIDTH @@ -144,11 +144,11 @@ static int openwindow(char *disp, int constell, int samplesperbit) static void closewindow(void) { - if (!display) - return; - XDestroyWindow(display, window); - XCloseDisplay(display); - display = NULL; + if (!display) + return; + XDestroyWindow(display, window); + XCloseDisplay(display); + display = NULL; } /* ---------------------------------------------------------------------- */ @@ -159,17 +159,17 @@ static void closewindow(void) static void drawdata(short *data, int len, int replace, int xm) { int cnt; - GC gc; - XGCValues gcv; - XWindowAttributes winattrs; + GC gc; + XGCValues gcv; + XWindowAttributes winattrs; - if (!display || !pixmap) - return; - XGetWindowAttributes(display, window, &winattrs); + if (!display || !pixmap) + return; + XGetWindowAttributes(display, window, &winattrs); gcv.line_width = 1; - gcv.line_style = LineSolid; - gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv); - XSetState(display, gc, col_background, col_background, GXcopy, + gcv.line_style = LineSolid; + gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv); + XSetState(display, gc, col_background, col_background, GXcopy, AllPlanes); if (replace) XFillRectangle(display, pixmap, gc, 0, 0, @@ -177,16 +177,16 @@ static void drawdata(short *data, int len, int replace, int xm) else XCopyArea(display, window, pixmap, gr_context, 0, 0, winattrs.width, winattrs.height, 0, 0); - XSetForeground(display, gc, col_trace); + XSetForeground(display, gc, col_trace); for (cnt = 0; cnt < len-1; cnt++) XDrawLine(display, pixmap, gc, XCOORD(cnt), YCOORD(data[cnt]), XCOORD(cnt+1), YCOORD(data[cnt+1])); - XSetForeground(display, gc, col_zeroline); + XSetForeground(display, gc, col_zeroline); XDrawLine(display, pixmap, gc, 0, YCOORD(0), winattrs.width, YCOORD(0)); XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width, - winattrs.height, 0, 0); - XFreeGC(display, gc); + winattrs.height, 0, 0); + XFreeGC(display, gc); XSync(display, 0); } @@ -201,30 +201,30 @@ static void drawdata(short *data, int len, int replace, int xm) static void drawconstell(short *data, int len) { int cnt; - GC gc; - XGCValues gcv; - XWindowAttributes winattrs; + GC gc; + XGCValues gcv; + XWindowAttributes winattrs; - if (!display || !pixmap) - return; - XGetWindowAttributes(display, window, &winattrs); + if (!display || !pixmap) + return; + XGetWindowAttributes(display, window, &winattrs); gcv.line_width = 1; - gcv.line_style = LineSolid; - gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv); - XSetState(display, gc, col_background, col_background, GXcopy, + gcv.line_style = LineSolid; + gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv); + XSetState(display, gc, col_background, col_background, GXcopy, AllPlanes); XCopyArea(display, window, pixmap, gr_context, 0, 0, winattrs.width, winattrs.height, 0, 0); - XSetForeground(display, gc, col_trace); + XSetForeground(display, gc, col_trace); for (cnt = 0; cnt < len-1; cnt += 2) XDrawPoint(display, pixmap, gc, XCOORD(data[cnt]), YCOORD(data[cnt+1])); - XSetForeground(display, gc, col_zeroline); + XSetForeground(display, gc, col_zeroline); XDrawLine(display, pixmap, gc, 0, YCOORD(0), winattrs.width, YCOORD(0)); XDrawLine(display, pixmap, gc, XCOORD(0), 0, XCOORD(0), winattrs.height); XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width, - winattrs.height, 0, 0); - XFreeGC(display, gc); + winattrs.height, 0, 0); + XFreeGC(display, gc); XSync(display, 0); } @@ -235,47 +235,47 @@ static void drawconstell(short *data, int len) static void clearwindow(void) { - XWindowAttributes winattrs; + XWindowAttributes winattrs; GC gc; - XGCValues gcv; + XGCValues gcv; - if (!display || !pixmap) - return; - XGetWindowAttributes(display, window, &winattrs); + if (!display || !pixmap) + return; + XGetWindowAttributes(display, window, &winattrs); gcv.line_width = 1; - gcv.line_style = LineSolid; - gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv); - XSetState(display, gc, col_background, col_background, GXcopy, + gcv.line_style = LineSolid; + gc = XCreateGC(display, pixmap, GCLineWidth | GCLineStyle, &gcv); + XSetState(display, gc, col_background, col_background, GXcopy, AllPlanes); XFillRectangle(display, pixmap, gc, 0, 0, winattrs.width, winattrs.height); - XSetForeground(display, gc, col_zeroline); - XClearArea(display, window, 0, 0, 0, 0, False); + XSetForeground(display, gc, col_zeroline); + XClearArea(display, window, 0, 0, 0, 0, False); XCopyArea(display, pixmap, window, gr_context, 0, 0, winattrs.width, - winattrs.height, 0, 0); - XFreeGC(display, gc); + winattrs.height, 0, 0); + XFreeGC(display, gc); } /* ---------------------------------------------------------------------- */ static Bool predicate(Display *display, XEvent *event, char *arg) { - return True; + return True; } /* ---------------------------------------------------------------------- */ static char *getkey(void) { - XWindowAttributes winattrs; - XEvent evt; - static char kbuf[32]; - int i; + XWindowAttributes winattrs; + XEvent evt; + static char kbuf[32]; + int i; - if (!display) - return NULL; + if (!display) + return NULL; XSync(display, 0); - while (XCheckIfEvent(display, &evt, predicate, NULL)) { + while (XCheckIfEvent(display, &evt, predicate, NULL)) { switch (evt.type) { case KeyPress: i = XLookupString((XKeyEvent *)&evt, kbuf, sizeof(kbuf)-1, @@ -296,8 +296,8 @@ static char *getkey(void) default: break; } - } - return NULL; + } + return NULL; } /* ---------------------------------------------------------------------- */ diff --git a/hdlcutil/smmixer.c b/hdlcutil/smmixer.c index 473b3a6..8efeac8 100644 --- a/hdlcutil/smmixer.c +++ b/hdlcutil/smmixer.c @@ -159,7 +159,7 @@ static void display_mixer_cs423x(void) (data & 0x40) ? "output muted, " : "", (data & 0x20) ? "bypass, " : "", (int)(data & 0xf) * (-3)); - data = get_mixer_reg(27); + data = get_mixer_reg(27); if (data & 0x80) printf("Left output: muted\n"); else @@ -314,15 +314,15 @@ static void display_mixer_ct1745(void) static int parse_ad_src(const char *cp) { - if (!strcasecmp(cp, "line")) - return 0; - if (!strcasecmp(cp, "aux1")) - return 1; - if (!strcasecmp(cp, "mic")) - return 2; - if (!strcasecmp(cp, "dac")) - return 3; - return -1; + if (!strcasecmp(cp, "line")) + return 0; + if (!strcasecmp(cp, "aux1")) + return 1; + if (!strcasecmp(cp, "mic")) + return 2; + if (!strcasecmp(cp, "dac")) + return 3; + return -1; } /* ---------------------------------------------------------------------- */ -- cgit v1.2.3