OSDN Git Service

Small changes 6
authorwifiextender <router@archlinux.info>
Thu, 30 Jul 2015 08:20:16 +0000 (08:20 +0000)
committerwifiextender <router@archlinux.info>
Thu, 30 Jul 2015 08:20:16 +0000 (08:20 +0000)
bootstrap
src/constants1.h [new file with mode: 0644]
src/constants2.h [moved from src/constants.h with 72% similarity]
src/functions.c
src/main.c

index 1649473..3e9aa24 100644 (file)
--- a/bootstrap
+++ b/bootstrap
@@ -70,7 +70,8 @@ then
       'main.c'
       'functions.c'
       'functions.h'
-      'constants.h'
+      'constants1.h'
+      'constants2.h'
   )
 
   src_makefile=('AM_CPPFLAGS = \
diff --git a/src/constants1.h b/src/constants1.h
new file mode 100644 (file)
index 0000000..38d431c
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+   Copyright 07/29/2015 Aaron Caffrey https://github.com/wifiextender
+
+   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., 51 Franklin Street, Fifth Floor, Boston,
+   MA 02110-1301, USA.
+*/
+
+#ifndef CONSTANTS_H_
+#define CONSTANTS_H_
+
+#define VLA 100
+
+/* main.c constants */
+#define FMT       "\x0a%s \x0b%s%%%c "
+#define FMT_TIME  "\x0a%s \x0b%s"
+#define TEMP      "\x09%sC\x0b%c "
+#define FMT_MOBO  FMT_TIME" "TEMP
+#define FMT_CPU   FMT_TIME"%% "TEMP
+#define FMT_RAM   FMT
+#define FMT_SSD   FMT
+#define FMT_PKGS  FMT_TIME"%c "
+#define FMT_VOLT  FMT_PKGS
+#define FMT_FANS  FMT_TIME
+#define FMT_KERN  "\x09%s%c "
+#define FMT_VOL   FMT
+#define COMMA     ','
+#define WHOLE_MAIN_ARR_LEN VLA*14
+
+#endif /* CONSTANTS_H_ */
similarity index 72%
rename from src/constants.h
rename to src/constants2.h
index 216012c..9a1d4b1 100644 (file)
    MA 02110-1301, USA.
 */
 
-#ifndef CONSTANTS_H_
-#define CONSTANTS_H_
-
-/* main.c constants */
-#define FMT       "\x0a%s \x0b%s%%%c "
-#define FMT_TIME  "\x0a%s \x0b%s"
-#define TEMP      "\x09%sC\x0b%c "
-#define FMT_MOBO  FMT_TIME" "TEMP
-#define FMT_CPU   FMT_TIME"%% "TEMP
-#define FMT_RAM   FMT
-#define FMT_SSD   FMT
-#define FMT_PKGS  FMT_TIME"%c "
-#define FMT_VOLT  FMT_PKGS
-#define FMT_FANS  FMT_TIME
-#define FMT_KERN  "\x09%s%c "
-#define FMT_VOL   FMT
-#define COMMA     ','
-#define WHOLE_MAIN_ARR_LEN VLA*14
+#ifndef CONSTANTS2_H_
+#define CONSTANTS2_H_
 
 #define MB 1048576
 #define GB 1073741824
-#define VLA 100
 
 #define FMT_UINT "%"PRIuMAX
 #define UFINT "%"PRIuFAST16
@@ -55,4 +38,4 @@
 #define MOBO_NAME DMI_DIR"board_name"
 #define MOBO_VENDOR DMI_DIR"board_vendor"
 
-#endif /* CONSTANTS_H_ */
+#endif /* CONSTANTS2_H_ */
index bee82c8..5e908c8 100644 (file)
@@ -33,7 +33,8 @@
 #include <X11/Xlib.h>
 #include <alsa/asoundlib.h>
 
-#include "constants.h"
+#include "constants1.h"
+#include "constants2.h"
 
 void get_temp(char *, char *);
 static uint_fast16_t glob_packages(char *);
index e71771e..2f9542a 100644 (file)
 
 #include <time.h>
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
-#include <inttypes.h>
 
-#include "constants.h"
+#include "constants1.h"
 #include "functions.h"
 
 int main(void)