mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Refactor
This commit is contained in:
committed by
Robin Stuart
parent
1882d76b70
commit
4963a772db
@ -1150,14 +1150,13 @@ getopt (int argc, char *const *argv, const char *optstring)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
int this_option_optind = optind ? optind : 1;
|
||||
|
||||
c = getopt (argc, argv, "abc:d:0123456789");
|
||||
int c = getopt (argc, argv, "abc:d:0123456789");
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
|
@ -99,7 +99,6 @@ libc_hidden_def (getopt_long_only)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
@ -117,7 +116,7 @@ main (int argc, char **argv)
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
int c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
|
@ -151,10 +151,10 @@ void show_eci(void) {
|
||||
|
||||
/* Verifies that a string only uses valid characters */
|
||||
int validator(char test_string[], char source[]) {
|
||||
unsigned int i, j, latch;
|
||||
unsigned int i, j;
|
||||
|
||||
for (i = 0; i < strlen(source); i++) {
|
||||
latch = 0;
|
||||
unsigned int latch = 0;
|
||||
for (j = 0; j < strlen(test_string); j++) {
|
||||
if (source[i] == test_string[j]) {
|
||||
latch = 1;
|
||||
@ -434,7 +434,6 @@ int batch_process(struct zint_symbol *symbol, char *filename, int mirror_mode, c
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
struct zint_symbol *my_symbol;
|
||||
int c;
|
||||
int error_number;
|
||||
int rotate_angle;
|
||||
int generated;
|
||||
@ -504,7 +503,7 @@ int main(int argc, char **argv) {
|
||||
{"verbose", 0, 0, 0}, // Currently undocumented, output some debug info
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
c = getopt_long(argc, argv, "htb:w:d:o:i:rcmpe", long_options, &option_index);
|
||||
int c = getopt_long(argc, argv, "htb:w:d:o:i:rcmpe", long_options, &option_index);
|
||||
if (c == -1) break;
|
||||
|
||||
switch (c) {
|
||||
|
Reference in New Issue
Block a user