From ebfd6225a88fc2c5d3ec038778a498f94a00bb8a Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Thu, 30 Nov 2023 21:51:43 +0530 Subject: [PATCH] delete some unwanted files --- Makefile | 1 - main.c | 1 - meter.c | 1 - update.c | 67 ------------------------------------------------------- update.h | 4 ---- version.c | 40 --------------------------------- version.h | 27 ---------------------- 7 files changed, 141 deletions(-) delete mode 100644 update.c delete mode 100644 update.h delete mode 100644 version.c delete mode 100644 version.h diff --git a/Makefile b/Makefile index bfd927e..e86acbd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ UNAME_S := $(shell uname -s) # Get git commit version and date -GIT_DATE := $(firstword $(shell git --no-pager show --date=short --format="%ai" --name-only)) GIT_VERSION := $(shell git describe --abbrev=0 --tags --always) # uncomment the following line to force 480x320 screen diff --git a/main.c b/main.c index 3ecf892..af57a9e 100644 --- a/main.c +++ b/main.c @@ -50,7 +50,6 @@ #include "button_text.h" #include "new_menu.h" #include "radio.h" -#include "version.h" #include "wdsp.h" #ifdef I2C #include "i2c.h" diff --git a/meter.c b/meter.c index ed9a6b6..667927f 100644 --- a/meter.c +++ b/meter.c @@ -30,7 +30,6 @@ #include "radio.h" #include "wdsp.h" #include "radio.h" -#include "version.h" #include "mode.h" #include "vox.h" #include "new_menu.h" diff --git a/update.c b/update.c deleted file mode 100644 index 8f1cc17..0000000 --- a/update.c +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include "update.h" -#include "version.h" - -char new_version[128]; - -int check_update() { - - int rc=system("/usr/bin/wget -N https://github.com/g0orx/pihpsdr/raw/master/release/pihpsdr/latest"); - fprintf(stderr,"rc=%d\n", rc); - if(rc==-1) { - fprintf(stderr,"wget: errno=%d\n", errno); - } - - fprintf(stderr,"check_version: current version is %s\n",version); - strcpy(new_version,""); - - FILE* f=fopen("latest","r"); - if(f) { - char *c=fgets(new_version,sizeof(new_version),f); - if (c == NULL) { - return -1; - } - fclose(f); - } else { - fprintf(stderr,"check_update: could not read latest version\n"); - return -1; - } - - if(strlen(new_version)==0) { - return -2; - } - - if(strlen(new_version)>0) { - if(new_version[strlen(new_version)-1]=='\n') { - new_version[strlen(new_version)-1]='\0'; - } - } - - fprintf(stderr,"check_version: latest version is %s\n",new_version); - - fprintf(stderr,"check_version: length of version=%ld length of new_version=%ld\n", (long)strlen(version), (long)strlen(new_version)); - rc=strcmp(version,new_version); - - return rc; -} - -int load_update() { - char command[1024]; - sprintf(command,"cd ..; /usr/bin/wget -N https://github.com/g0orx/pihpsdr/raw/master/release/pihpsdr_%s.tar",new_version); - -fprintf(stderr,"load_update: %s\n",command); - int rc=system(command); - fprintf(stderr,"rc=%d\n", rc); - if(rc==-1) { - fprintf(stderr,"wget: errnoc=%d\n", errno); - } else { - fprintf(stderr,"load_update: %s loaded\n", new_version); - } - return rc; -} diff --git a/update.h b/update.h deleted file mode 100644 index 444a7ab..0000000 --- a/update.h +++ /dev/null @@ -1,4 +0,0 @@ -extern char new_version[]; - -extern int check_update(); -extern int load_update(); diff --git a/version.c b/version.c deleted file mode 100644 index 78e7eec..0000000 --- a/version.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) -* 2015 - John Melton, G0ORX/N6LYT -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -*/ - -char build_date[]=GIT_DATE; -char build_version[]=GIT_VERSION; - -char version[]=GIT_VERSION -#if defined(GPIO) || defined(PURESIGNAL) || defined(MIDI) -" includes" -#endif -#ifdef GPIO -" GPIO" -#endif -#ifdef PURESIGNAL -" PURESIGNAL" -#endif -#ifdef MIDI -" MIDI" -#endif -#ifdef LOCALCW -" LOCALCW" -#endif - -; diff --git a/version.h b/version.h deleted file mode 100644 index 714f98a..0000000 --- a/version.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) -* 2015 - John Melton, G0ORX/N6LYT -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -*/ - -#ifndef _VERSION_H -#define _VERSION_H - -extern char build_version[]; -extern char build_date[]; -extern char version[]; - -#endif -- 2.45.2