]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
refactor some header files
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Thu, 30 Nov 2023 16:18:47 +0000 (21:48 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Thu, 30 Nov 2023 16:19:15 +0000 (21:49 +0530)
63 files changed:
Makefile
about_menu.c
actions.c
adc.h
agc_menu.c
ant_menu.c
band.c
band.h
band_menu.c
bandstack_menu.c
configure.c
cw_menu.c
dac.h
discovery.c
display_menu.c
diversity_menu.c
dsp_menu.c
encoder_menu.c
equalizer_menu.c
error_handler.c
exit_menu.c
ext.c
fft_menu.c
filter.c
filter.h
filter_menu.c
i2c.c
iambic.c
main.c
main.h
meter.c
meter_menu.c
mode_menu.c
nb_menu.c
new_menu.c
new_protocol.c
noise_menu.c
oc_menu.c
old_protocol.c
pa_menu.c
pulseaudio.c
radio.c
radio_menu.c
receiver.c
rx_menu.c
rx_panadapter.c
sliders.c
step_menu.c
store.c
store_menu.c
switch_menu.c
toolbar.c
toolbar_menu.c
transmitter.c
tx_menu.c
tx_panadapter.c
vfo.c
vfo_menu.c
vox.c
vox_menu.c
waterfall.c
xvtr_menu.c
zoompan.c

index d0e5ef1e57d89aa0a73175aa1cbbe49edb00999d..bfd927e63dc317cf6b28f00dab0c591ea92b304f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -167,7 +167,7 @@ OPTIONS=$(SMALL_SCREEN_OPTIONS) $(MIDI_OPTIONS) $(LEVEL_OPTIONS) $(PURESIGNAL_OP
         $(PTT_OPTIONS) \
        $(SERVER_OPTIONS) \
        $(AUDIO_OPTIONS) \
-       -D GIT_DATE='"$(GIT_DATE)"' -D GIT_VERSION='"$(GIT_VERSION)"' $(DEBUG_OPTION)
+       $(DEBUG_OPTION)
 
 
 ifeq ($(UNAME_S), Linux)
@@ -217,7 +217,6 @@ fft_menu.c \
 diversity_menu.c \
 tx_menu.c \
 vfo_menu.c \
-test_menu.c \
 meter.c \
 mode.c \
 old_discovery.c \
@@ -236,12 +235,10 @@ toolbar.c \
 transmitter.c \
 zoompan.c \
 sliders.c \
-version.c \
 vfo.c \
 waterfall.c \
 button_text.c \
 vox.c \
-update.c \
 store.c \
 store_menu.c \
 memory.c \
@@ -297,7 +294,6 @@ fft_menu.h \
 diversity_menu.h \
 tx_menu.h \
 vfo_menu.h \
-test_menu.h \
 meter.h \
 mode.h \
 old_discovery.h \
@@ -315,12 +311,10 @@ toolbar.h \
 transmitter.h \
 zoompan.h \
 sliders.h \
-version.h \
 vfo.h \
 waterfall.h \
 button_text.h \
 vox.h \
-update.h \
 store.h \
 store_menu.h \
 memory.h \
@@ -344,7 +338,6 @@ band.o \
 discovered.o \
 discovery.o \
 filter.o \
-version.o \
 main.o \
 new_menu.o \
 about_menu.o \
@@ -373,7 +366,6 @@ fft_menu.o \
 diversity_menu.o \
 tx_menu.o \
 vfo_menu.o \
-test_menu.o \
 meter.o \
 mode.o \
 old_discovery.o \
@@ -396,7 +388,6 @@ vfo.o \
 waterfall.o \
 button_text.o \
 vox.o \
-update.o \
 store.o \
 store_menu.o \
 memory.o \
@@ -424,18 +415,14 @@ $(PROGRAM):  $(OBJS) $(AUDIO_OBJS) $(REMOTE_OBJS) $(USBOZY_OBJS) \
                $(MIDI_OBJS) $(SERVER_OBJS) $(LIBS)
 
 .PHONY:        all
-all:   prebuild  $(PROGRAM) $(HEADERS) $(AUDIO_HEADERS) $(USBOZY_HEADERS) \
+all:   $(PROGRAM) $(HEADERS) $(AUDIO_HEADERS) $(USBOZY_HEADERS) \
        $(LOCALCW_HEADERS) \
        $(PURESIGNAL_HEADERS) $(MIDI_HEADERS) $(SERVER_HEADERS) \
        $(AUDIO_SOURCES) $(SOURCES) \
        $(USBOZY_SOURCES) $(LOCALCW_SOURCE) \
        $(PURESIGNAL_SOURCES) $(MIDI_SOURCES) $(SERVER_SOURCES)
 
-.PHONY:        prebuild
-prebuild:
-       rm -f version.o
 
-#
 # On some platforms, INCLUDES contains "-pthread"  (from a pkg-config output)
 # which is not a valid cppcheck option
 # Therefore, correct this here. Furthermore, we can add additional options to CPP
index 1d33ff10e3eee9ba6e745a37cff5d79c3018454b..984b74290708d2d4ddaba3996c5b68b21ddbc012 100644 (file)
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <stdbool.h>
 #include <wdsp.h>
 
 #include "new_menu.h"
 #include "about_menu.h"
 #include "discovered.h"
 #include "radio.h"
-#include "version.h"
 
 static GtkWidget *parent_window=NULL;
 static GtkWidget *dialog=NULL;
@@ -83,9 +83,7 @@ void about_menu(GtkWidget *parent) {
   GtkWidget *grid=gtk_grid_new();
 
   gtk_grid_set_column_homogeneous(GTK_GRID(grid),TRUE);
-  //gtk_grid_set_row_homogeneous(GTK_GRID(grid),TRUE);
   gtk_grid_set_column_spacing (GTK_GRID(grid),4);
-  //gtk_grid_set_row_spacing (GTK_GRID(grid),4);
 
   int row=0;
 
@@ -103,12 +101,6 @@ void about_menu(GtkWidget *parent) {
   strcat(text,"\n    Ken Hopper, N9VV: Testing and Documentation");
   strcat(text,"\n    Christoph van Wüllen, DL1YCF: CW, Pure Signal, Diversity, MIDI ");
 
-  sprintf(line,"\n\nBuild date: %s", build_date);
-  strcat(text,line);
-
-  sprintf(line,"\nBuild version: %s", build_version);
-  strcat(text,line);
-
   sprintf(line,"\nWDSP version: %d.%02d", GetWDSPVersion()/100, GetWDSPVersion()%100);
   strcat(text,line);
 
index db8618efbf957b13ea0245bd4db3c4c8dce6ea3f..276caf5a3d33480717a7d718520c6e5ac5db7b34 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1,4 +1,5 @@
 #include <gtk/gtk.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "discovery.h"
diff --git a/adc.h b/adc.h
index 7a1b5cae963b76409d476807de2e3a4df9b2cc67..9cedcbbaceff6d98603864657b2b184d9f0fd167 100644 (file)
--- a/adc.h
+++ b/adc.h
@@ -20,8 +20,6 @@
 #ifndef ADC_H
 #define ADC_H
 
-#include <gtk/gtk.h>
-
 enum {
   AUTOMATIC=0,
   MANUAL
@@ -56,18 +54,18 @@ enum {
 };
 
 typedef struct _adc {
-  gint filters;
-  gint hpf;
-  gint lpf;
-  gint antenna;
-  gboolean dither;
-  gboolean random;
-  gboolean preamp;
-  gint attenuation;
-  gboolean enable_step_attenuation;
-  gdouble gain;
-  gdouble min_gain;
-  gdouble max_gain;
+  int filters;
+  int hpf;
+  int lpf;
+  int antenna;
+  bool dither;
+  bool random;
+  bool preamp;
+  int attenuation;
+  bool enable_step_attenuation;
+  double gain;
+  double min_gain;
+  double max_gain;
 } ADC;
 
 #endif
index 36e2caaf096430885e2b0427161712a09e20d90f..16bdbf9990c8c8d9df61f2c3ff81eaa020093ae2 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "agc_menu.h"
index e839ed476ca7f89e39dd2139b8d6c8f235b8b7ee..914e078c6c59e94db81c4b736177b34991e4c36e 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "ant_menu.h"
diff --git a/band.c b/band.c
index 9ba026132a835528468b2060d3b7ec8d55080476..2581d9771a1e34cef08111b0587b2b542dc0ab78 100644 (file)
--- a/band.c
+++ b/band.c
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "bandstack.h"
 #include "band.h"
diff --git a/band.h b/band.h
index 5fa15dfa072319854384e4fa6099f2e350f18ed5..dfb51d1deefcbc2e002a828d9d5650657afc9514 100644 (file)
--- a/band.h
+++ b/band.h
@@ -20,7 +20,6 @@
 #ifndef _BAND_H
 #define _BAND_H
 
-#include <gtk/gtk.h>
 #include "bandstack.h"
 
 enum {
@@ -77,7 +76,7 @@ typedef struct _CHANNEL CHANNEL;
 
 
 extern int band;
-extern gboolean displayHF;
+extern bool displayHF;
 
 #define UK_CHANNEL_ENTRIES 11
 #define OTHER_CHANNEL_ENTRIES 5
index 7bbb4720715fe2eeb53580466ce4b8c1da857a2d..73de7112ccaca117eb475dbe722d978c2b05d5c7 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "band_menu.h"
index 19152df9e6cc0e54182aa7b45beabd30abc081ec..5f58e3ff72a3cbf8ccb148688bd03d0e3c9033d9 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "bandstack_menu.h"
index f03e0410bdc8c89e9f2451191b7fd62714942148..0d8b08b32204f25487b0edc7ec8d89e22b3e0079 100644 (file)
@@ -28,6 +28,8 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <stdbool.h>
+
 #include "main.h"
 #include "channel.h"
 #include "discovered.h"
index d183b29cf89b6f4bd0c5bab919d53d12c8c730e2..58748b61ac5509528029b4749a85023717eea8de 100644 (file)
--- a/cw_menu.c
+++ b/cw_menu.c
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "pa_menu.h"
diff --git a/dac.h b/dac.h
index a08135f6bec3ad18ed00723054668ba2b659492b..a98cb066b230dc45c948a02c49511b9b0c1fbc56 100644 (file)
--- a/dac.h
+++ b/dac.h
@@ -21,8 +21,8 @@
 #define DAC_H
 
 typedef struct _dac {
-  gint antenna;
-  gdouble gain;
+  int antenna;
+  double gain;
 } DAC;
 
 #endif
index 64b99a5cce3829c0d2142f911cbe13793c96403c..c0dd5cd917ccc045562966d25c76d26a3a8540f1 100644 (file)
@@ -27,6 +27,8 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <stdbool.h>
+
 #ifdef MIDI
 #include <sys/types.h>
 #include <sys/stat.h>
index 38aab90700d5869a83955a011e362d92770739ab..eae3c2b0471502251e4fb5e18805b7b270b0fb47 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "new_menu.h"
index 8df76c8261645088fc7f6e4acaa18f973fa26c75..04a8cd5a3e4e57b6bb8d93a55f2ab564c3a67d2f 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <pthread.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "diversity_menu.h"
index ef710d55fa666d40d23da49a6371e8f3d59050a9..452c68d4310338f8e5b3459a0d707d4c8d80938d 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "dsp_menu.h"
index 66b6b2fa2bc64925d19dc6e5744af6928d4e4196..e81c754b09c71f7128c73b66935f0a7a39a690da 100644 (file)
@@ -21,6 +21,7 @@
 #include <glib/gprintf.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "new_menu.h"
index 1d6faa32b924b80d6693acac6312e350af2df141..c0ca3ac191b163db99f3b4e3b92b75ea0dc9b616 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index 4c1877364020ee44af2ab7d7450b438d534f3c73..40f65fec342f2a2411d95ac3e6136fcce2a657d9 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <gtk/gtk.h>
+#include <stdbool.h>
 
 #include "error_handler.h"
 #include "main.h"
index 9beeb28ca083417f1acb712b634eba4aeb22d19b..9496cf03a9e2c3b2065405b5f908546d454d1702 100644 (file)
@@ -21,6 +21,7 @@
 #include <semaphore.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "new_menu.h"
diff --git a/ext.c b/ext.c
index d94efa2fcfe14d91fe1bd646d43569e909e083d0..06f52c0fe8c4a04a578688530d65bc58cbdb92bd 100644 (file)
--- a/ext.c
+++ b/ext.c
@@ -22,6 +22,8 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <gtk/gtk.h>
+#include <stdbool.h>
+
 #include "main.h"
 #include "discovery.h"
 #include "receiver.h"
index 85e6f39d8f699ff9d273c703ed5af5982bac22f5..815b33421067194d420ab7cdadcf74fa0729ef1f 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "fft_menu.h"
index af0160a9e77e8a2c3429bb7d36a859609bbebb21..6bfba8a7560ee6e0d50602525a2154ee84928f64 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -19,6 +19,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdbool.h>
 
 #include "sliders.h"
 #include "filter.h"
index 97c2f8b845ae0b9042ff69f642393055aece102d..a86679cab9f01c5cd3ac0d373a6f788a3c2b0b17 100644 (file)
--- a/filter.h
+++ b/filter.h
@@ -57,7 +57,7 @@ extern int txFilterHighCut;
 
 extern FILTER *filters[MODES];
 
-extern gint filter_step;
+extern int filter_step;
 
 extern void filterSaveState();
 extern void filterRestoreState();
index f4ffab0cf6a0ac825bca11cb904535f514535d77..7c7b6df408481529a0fff981fbb6a579bcdfad73 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "filter_menu.h"
diff --git a/i2c.c b/i2c.c
index d2e4b1f6b735e5f6ef7da91963e76c4fc2ba5c5a..5c8353abb253a2932bfe68f4bb90547e9142962e 100644 (file)
--- a/i2c.c
+++ b/i2c.c
@@ -8,8 +8,9 @@
 #include <i2c/smbus.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
-
+#include <stdbool.h>
 #include <gtk/gtk.h>
+
 #include "i2c.h"
 #include "actions.h"
 #include "gpio.h"
index 9751e3f48643db19d91c398967300321fedd8c9e..6c5f99e660b1a7cc86bf2370479c52763a9d4814 100644 (file)
--- a/iambic.c
+++ b/iambic.c
 #include <semaphore.h>
 #include <time.h>
 #include <sys/mman.h>
+#include <stdbool.h>
 
 #ifdef LOCALCW
 #include "gpio.h"
diff --git a/main.c b/main.c
index b427f82c74ccba28be839e45a7d7bfbfeb024471..3ecf8920a985d8f89b5a2a9be782b15a204c4d63 100644 (file)
--- a/main.c
+++ b/main.c
@@ -34,6 +34,7 @@
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <stdbool.h>
 
 #include "actions.h"
 #include "audio.h"
@@ -67,18 +68,12 @@ gint display_width;
 gint display_height;
 gint full_screen = 1;
 
-static GtkWidget *discovery_dialog;
-
 static GdkCursor *cursor_arrow;
 static GdkCursor *cursor_watch;
 
-static GtkWidget *splash;
-
 GtkWidget *top_window;
 GtkWidget *grid;
 
-static DISCOVERED *d;
-
 static GtkWidget *status;
 
 void status_text(char *text) {
@@ -89,11 +84,6 @@ void status_text(char *text) {
     gtk_main_iteration();
 }
 
-static gint save_cb(gpointer data) {
-  radioSaveState();
-  return TRUE;
-}
-
 static pthread_t wisdom_thread_id;
 static int wisdom_running = 0;
 
@@ -109,7 +99,7 @@ static void *wisdom_thread(void *arg) {
 // code to switch mox copied from mox_cb() in toolbar.c,
 // but added the correct return values.
 //
-gboolean keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) {
+bool keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) {
 
   if (radio != NULL) {
     if (event->keyval == GDK_KEY_space) {
@@ -189,6 +179,9 @@ static int init(void *data) {
   // sem_trywait() is not elegant, replaced this with wisdom_running variable.
   //
   char *c = getcwd(wisdom_directory, sizeof(wisdom_directory));
+  if (c == NULL) {
+      perror("getcwd");
+  }
   strcpy(&wisdom_directory[strlen(wisdom_directory)], "/");
   fprintf(stderr, "Securing wisdom file in directory: %s\n", wisdom_directory);
   status_text("Checking FFTW Wisdom file ...");
@@ -212,8 +205,6 @@ static void activate_pihpsdr(GtkApplication *app, gpointer data) {
 
   // gtk_init (&argc, &argv);
 
-  fprintf(stderr, "Build: %s %s\n", build_date, version);
-
   fprintf(stderr, "GTK+ version %ud.%ud.%ud\n", gtk_major_version,
           gtk_minor_version, gtk_micro_version);
   uname(&unameData);
@@ -305,22 +296,6 @@ static void activate_pihpsdr(GtkApplication *app, gpointer data) {
   fprintf(stderr, "add image to grid\n");
   gtk_grid_attach(GTK_GRID(grid), image, 0, 0, 1, 4);
 
-  fprintf(stderr, "create pi label\n");
-  char build[128];
-  sprintf(build, "build: %s %s", build_date, version);
-  GtkWidget *pi_label = gtk_label_new("Verdure RF Technologies");
-  gtk_label_set_justify(GTK_LABEL(pi_label), GTK_JUSTIFY_LEFT);
-  gtk_widget_show(pi_label);
-  fprintf(stderr, "add pi label to grid\n");
-  gtk_grid_attach(GTK_GRID(grid), pi_label, 1, 0, 1, 1);
-
-  fprintf(stderr, "create build label\n");
-  GtkWidget *build_date_label = gtk_label_new(build);
-  gtk_label_set_justify(GTK_LABEL(build_date_label), GTK_JUSTIFY_LEFT);
-  gtk_widget_show(build_date_label);
-  fprintf(stderr, "add build label to grid\n");
-  gtk_grid_attach(GTK_GRID(grid), build_date_label, 1, 1, 1, 1);
-
   fprintf(stderr, "create status\n");
   status = gtk_label_new("");
   gtk_label_set_justify(GTK_LABEL(status), GTK_JUSTIFY_LEFT);
diff --git a/main.h b/main.h
index bf1e33fda8d82bf17df14b88d21cfb2b62270e59..5b540ddee4dba8c07df886e09266f25411b3e507 100644 (file)
--- a/main.h
+++ b/main.h
@@ -30,14 +30,13 @@ enum {
   CONTROLLER2_V2
 };
 
-extern gint controller;
-
-extern gint display_width;
-extern gint display_height;
-extern gint full_screen;
+extern int controller;
+extern int display_width;
+extern int display_height;
+extern int full_screen;
 extern GtkWidget *top_window;
 extern GtkWidget *grid;
 extern void status_text(char *text);
 
-extern gboolean keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
+extern bool keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data);
 #endif
diff --git a/meter.c b/meter.c
index 5784904dab47bac81d2e32de7b6933e3dfb9bbdd..ed9a6b6230863dcd342d09d1c8fe2edc6888a72c 100644 (file)
--- a/meter.c
+++ b/meter.c
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <math.h>
+#include <stdbool.h>
 
 #include "receiver.h"
 #include "meter.h"
index 3a9667d4a2f58c3fbd9e8fa7b481c0e40670ed95..f01803143cae9ce0610df8d85ee08a9f6e50e992 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index b992d82ef65ef7f53159a13314f06e53c7e6f82f..bd78dae634fde5063456fc8c59fab9fd3efb8171 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "band_menu.h"
index c7f6f99cd4b04248c1ef675579fc93c914161881..3325f5b4cffc124777a246f98fd0f575ac048c62 100644 (file)
--- a/nb_menu.c
+++ b/nb_menu.c
@@ -24,6 +24,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "noise_menu.h"
index 9ab912974a3e45f69d5f81e027451dc22f5e3d7d..edb14cb4861a4497cf2e504d4a06eb811951e58a 100644 (file)
@@ -21,6 +21,7 @@
 #include <semaphore.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "audio.h"
 #include "new_menu.h"
@@ -377,11 +378,6 @@ static gboolean ps_cb (GtkWidget *widget, GdkEventButton *event, gpointer data)
 }
 #endif
 
-void start_test() {
-  cleanup();
-  test_menu(top_window);
-}
-
 #ifdef CLIENT_SERVER
 void start_server() {
   cleanup();
@@ -454,7 +450,7 @@ void new_menu()
 
     GtkWidget *exit_b=gtk_button_new_with_label("Exit piHPSDR");
     g_signal_connect (exit_b, "button-press-event", G_CALLBACK(exit_cb), NULL);
-    gtk_grid_attach(GTK_GRID(grid),exit_b,4,0,2,1);
+    gtk_grid_attach(GTK_GRID(grid),exit_b,3,0,2,1);
 
     i=5;
 
index 84a3842e3ebd1ca3312304cfcc1bf6d386daad87..755874ffbca0bff39d326535d3832e8c237d636d 100644 (file)
@@ -40,6 +40,7 @@
 #include <semaphore.h>
 #include <math.h>
 #include <sys/select.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index 7b1f93c44521f02052828282f5da16c5a98e36d5..d15f424cc78212b4f3da6a3aadd19e971c919826 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index 545315eb43eaab0ad15b58d036df5fabb7464cd7..aa91f4b3fe5870283c843515c762925a6d4af08e 100644 (file)
--- a/oc_menu.c
+++ b/oc_menu.c
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "oc_menu.h"
index ffef50dbe320d618e6034c3ccad4f4b871cfbe0b..85a3ba7d1bd036bce5b530f0a28eac5004297743 100644 (file)
@@ -34,6 +34,8 @@
 #include <string.h>
 #include <errno.h>
 #include <math.h>
+#include <stdbool.h>
+
 #include <wdsp.h>
 
 #include "audio.h"
index 29df28fd9450da2011daa0768ed4ff09aa4930e0..fc9c8d2d70fc9c40473414fe06bd3dcce64c7e83 100644 (file)
--- a/pa_menu.c
+++ b/pa_menu.c
@@ -21,6 +21,7 @@
 #include <semaphore.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "pa_menu.h"
index 18f2d25310615fe5f82bb012b71feb2f346d88d0..d915ad1e4bc7d6ce1142be299d11395b217d0c38 100644 (file)
@@ -2,6 +2,7 @@
 #include <pulse/glib-mainloop.h>
 #include <pulse/pulseaudio.h>
 #include <pulse/simple.h>
+#include <stdbool.h>
 
 #include "audio.h"
 #include "mode.h"
diff --git a/radio.c b/radio.c
index 556efbf1d7e23f8f0617415d77ea9cc88d453eaf..9baad7af51a2ac7bb8ef0c17780dc3da6cb450f5 100644 (file)
--- a/radio.c
+++ b/radio.c
@@ -29,6 +29,7 @@
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index 929d5635679e8acfbf3b214c6033232fd5ccff9c..0a70f4c97edf4da9241f0445cb37c9af99a20414 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "discovered.h"
index db9b4985172ba46524d80b46aa3672915bf15d64..fda9c0ff3e6ba409f61fd939775efb4e3694bfbd 100644 (file)
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index b6d0c870fb99ababab8c8a16556681ea1746945b..b53e846b1cee35f6779652bd57d1085c4788a6aa 100644 (file)
--- a/rx_menu.c
+++ b/rx_menu.c
@@ -22,6 +22,7 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "audio.h"
 #include "band.h"
index d150c2c47e5bafe255615af2cfcfc76d92e27a3b..78b3988bc11abca931ddca7ca541dcfff2528da8 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <semaphore.h>
 #include <arpa/inet.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index 4c43fbbc7f61fc76965fce878dfb03142f334ba7..8194f17c88ffe38333242f1c25091d888c176647 100644 (file)
--- a/sliders.c
+++ b/sliders.c
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
+#include <stdbool.h>
 
 #include "receiver.h"
 #include "sliders.h"
index 8670e3aa828b5f05743720b677180ef0191d8e93..711bc2101f4d1930beaf85f783004c5750f0019b 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "radio.h"
diff --git a/store.c b/store.c
index 3eb332df89549bdf253c8a6e9f31215b426c2000..a2bbc358aa4454d08e14f510dfa6ca761ea48454 100644 (file)
--- a/store.c
+++ b/store.c
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "bandstack.h"
 #include "band.h"
index 29f8808802de14322fded814435b095228fcb63b..81402794ec76b3e5a2fb26898d6c9d032e16cc52 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "store_menu.h"
index 94bee0dd9b33ac30b06b195aaa9fa052a8609351..7b1e1ff941f40e1cb6b391f15ad97fcd884c9dd6 100644 (file)
@@ -21,6 +21,7 @@
 #include <glib/gprintf.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "new_menu.h"
index 82d81d612882cc43e20eb63eee1245fd42920f21..80ad8924976210abab8abbc3882c18c7f8e9de51 100644 (file)
--- a/toolbar.c
+++ b/toolbar.c
@@ -23,6 +23,8 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
+
 #include "actions.h"
 #include "gpio.h"
 #include "toolbar.h"
index 4e8bdba51f1cd9a26179756c0ae6ea8d83543e7a..d0637e6cacc0f719611ff457170a3c3252b5d23b 100644 (file)
@@ -22,6 +22,7 @@
 #include <glib/gprintf.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "new_menu.h"
index 50d58449c29eaffefbeb965e94c0926be47bcbf7..c573a528542ae79aee415fb45c4051de2a3c844a 100644 (file)
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdbool.h>
 
 #include <wdsp.h>
 
index e628959f779dbaf4a86148784f81a1980bba3970..de2e19a2ec08c063a3a018a882eca83a594233cc 100644 (file)
--- a/tx_menu.c
+++ b/tx_menu.c
@@ -18,6 +18,7 @@
 #include <gtk/gtk.h>
 #include <stdio.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "audio.h"
 #include "new_menu.h"
index 8fb179be2d828a13dcd4f67626b8bfd5aaa07c26..2859e8f8fe3357d2585b1dcdb999c3f70e300d30 100644 (file)
@@ -24,7 +24,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <semaphore.h>
+#include <stdbool.h>
 #include <wdsp.h>
+
 #include "agc.h"
 #include "band.h"
 #include "channel.h"
diff --git a/vfo.c b/vfo.c
index 1ad35b93f8d8521f8030e1f72359b6ef76907e51..35459a3e675d63d2dfd1dbc9749c628d18f22fb3 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -18,8 +18,6 @@
  */
 
 #include <arpa/inet.h>
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
 #include <ifaddrs.h>
 #include <math.h>
 #include <net/if.h>
@@ -30,6 +28,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdbool.h>
+#include <gtk/gtk.h>
 
 #include "agc.h"
 #include "band.h"
index 2cc78320d7796b80c4cc00474a7a78161d86a9ef..012307f19dc68a65213275deb7141d77400235c0 100644 (file)
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <wdsp.h>
+#include <stdbool.h>
 
 #include "new_menu.h"
 #include "band.h"
diff --git a/vox.c b/vox.c
index e6ac5a37e2c67a54a478e897e3f0a4ec01a8576d..d2b40d259b3dda79ea3d17eb3b915d793843f126 100644 (file)
--- a/vox.c
+++ b/vox.c
@@ -18,6 +18,7 @@
 */
 
 #include <gtk/gtk.h>
+#include <stdbool.h>
 
 #include "radio.h"
 #include "transmitter.h"
index d47160f2067300f80b1b92061d288d7211c3036b..580464eab1ecdc56698eecf54e4349df6bb907b0 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "led.h"
 #include "new_menu.h"
index 46932aa6aa9e54f0bbf6487397e3d325201ebdcc..fd85804b0e2fda59e1f8a9a92b3980a40371fe30 100644 (file)
@@ -23,6 +23,7 @@
 #include <semaphore.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdbool.h>
 
 #include "radio.h"
 #include "vfo.h"
index afb2c1f092ffe0c72e9b219a005b9f0c17c4bfb6..7bd28dc362f7975bd6f0a240f6920e8056ba73e5 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdbool.h>
 
 #include "band.h"
 #include "filter.h"
index 29eb754f2140ef80e47efbc881886e9bd57387a2..ec92a878c6809772d9db7f4c17c626e74b6688e9 100644 (file)
--- a/zoompan.c
+++ b/zoompan.c
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
+#include <stdbool.h>
 
 #include "main.h"
 #include "receiver.h"