[tuxdroid-svn] r691 - firmware/tuxup/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-11-13 08:40:39
|
Author: jaguarondi Date: 2007-11-13 09:40:35 +0100 (Tue, 13 Nov 2007) New Revision: 691 Modified: firmware/tuxup/trunk/main.c Log: * Consistency with the 'const' keyword. Modified: firmware/tuxup/trunk/main.c =================================================================== --- firmware/tuxup/trunk/main.c 2007-11-12 14:45:38 UTC (rev 690) +++ firmware/tuxup/trunk/main.c 2007-11-13 08:40:35 UTC (rev 691) @@ -34,7 +34,7 @@ #define countof(X) ( (size_t) ( sizeof(X)/sizeof*(X) ) ) /* Messages. */ -static const char *msg_old_firmware = +static char const *msg_old_firmware = "\nERROR: Your dongle firmware is too old to support switching to bootloader" "\nmode automatically.\n" "\n To enter bootloading mode manually, you need to unplug the dongle, press" @@ -48,7 +48,7 @@ "\nCheck http://www.tuxisalive.com/documentation/how-to/updating-the-firmware" "\nfor more details.\n"; -static const char *msg_dfu_programmer_not_installed = +static char const *msg_dfu_programmer_not_installed = "\nERROR: dfu-programmer is not installed or is not in your path, tuxup uses" "\nit to reprogram the USB cpu so installing dfu-programmer is mandatory.\n"; @@ -56,10 +56,10 @@ enum program_modes_t { NONE, ALL, MAIN, INPUTFILES }; /* The name of this program. */ -static const char *program_name = "tuxup"; +static char const *program_name = "tuxup"; /* The version defined in version.h */ -static const char *program_version = VERSION; +static char const *program_version = VERSION; /* Whether to display verbose messages. */ int verbose = 0; @@ -176,7 +176,7 @@ * from the hex file and returns 0 if the hex file has a cpu and version * numbers, 1 otherwise. */ -static int check_hex_file(const char *filename, version_bf_t * version) +static int check_hex_file(char const *filename, version_bf_t * version) { FILE *fs = NULL; char word[80]; @@ -209,7 +209,7 @@ return 1; } -static int prog_flash(const char *filename) +static int prog_flash(char const *filename) { version_bf_t version; uint8_t cpu_i2c_addr; @@ -267,7 +267,7 @@ return 1; } -static int prog_eeprom(uint8_t cpu_nbr, const char *filename) +static int prog_eeprom(uint8_t cpu_nbr, char const *filename) { uint8_t cpu_i2c_addr; @@ -305,7 +305,7 @@ return 1; } -static int prog_usb(const char *filename) +static int prog_usb(char const *filename) { /* XXX include those as defines in commands.h */ uint8_t send_data[5] = { 0x01, 0x01, 0x00, 0x00, 0xFF }; @@ -477,7 +477,7 @@ int next_option; /* A string listing valid short options letters. */ - const char *const short_options = "maphvV"; + char const *const short_options = "maphvV"; /* An array describing valid long options. */ const struct option long_options[] = { @@ -591,18 +591,18 @@ break; case MAIN: { - const char *s[]={"tuxcore.hex", "tuxcore.eep", "tuxaudio.hex", + char const *s[]={"tuxcore.hex", "tuxcore.eep", "tuxaudio.hex", "tuxaudio.eep"}; - const char **p; + char const **p; for (p = s; p < &s[countof(s)] && !ret ; p++) ret = program(*p, path); } break; case ALL: { - const char *s[]={"fuxusb.hex", "tuxcore.hex", "tuxcore.eep", + char const *s[]={"fuxusb.hex", "tuxcore.hex", "tuxcore.eep", "tuxaudio.hex", "tuxaudio.eep", "fuxrf.hex", "tuxrf.hex"}; - const char **p; + char const **p; for (p = s; p < &s[countof(s)] && !ret ; p++) ret = program(*p, path); } |