X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Fao-edit-telem%2Fao-edit-telem.c;h=92cde3dc73ee88be3532550bff301a6bd5e241ee;hb=c411c7ec71be0263a958c0803772cd6068e6bdad;hp=3f6830e7518377520732b93ff379973e012e06df;hpb=72c5b1429bdfd6e9d2185bad7d0adb281fdf659a;p=fw%2Faltos diff --git a/ao-tools/ao-edit-telem/ao-edit-telem.c b/ao-tools/ao-edit-telem/ao-edit-telem.c index 3f6830e7..92cde3dc 100644 --- a/ao-tools/ao-edit-telem/ao-edit-telem.c +++ b/ao-tools/ao-edit-telem/ao-edit-telem.c @@ -3,7 +3,8 @@ * * 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; version 2 of the License. + * 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 @@ -72,7 +73,7 @@ int pending = 1; static void dump_saved(void); -void +static void doit(union ao_telemetry_all *telem) { double lat, lon; @@ -141,10 +142,9 @@ int main (int argc, char **argv) { char line[80]; - int c, i, ret; - char *s; + int c, i, ret = 0; FILE *file; - int serial; + while ((c = getopt_long(argc, argv, "l:L:", options, NULL)) != -1) { switch (c) { case 'L': @@ -165,11 +165,6 @@ main (int argc, char **argv) ret++; continue; } - s = strstr(argv[i], "-serial-"); - if (s) - serial = atoi(s + 8); - else - serial = 0; while (fgets(line, sizeof (line), file)) { union ao_telemetry_all telem;