source: trunk/dports/sysutils/sunwait/files/patch-main.c.diff @ 128061

Last change on this file since 128061 was 124149, checked in by khindenburg@…, 6 years ago

sunwait: add patch to allow eastern longitude to work #27936

File size: 451 bytes
RevLine 
[124149]1--- main.c.org  2004-12-09 02:48:49.000000000 +0100
2+++ main.c      2011-02-12 21:50:31.000000000 +0100
3@@ -151,7 +151,7 @@
4     }
5     /* this looks different from the others because 77E
6        parses as scientific notation */
7-    if (1 == sscanf(argv[i], "%lf%", &temp, &hemisphere)
8+    if (2 == sscanf(argv[i], "%lf%1[Ee]", &temp, &hemisphere)
9        && (argv[i][strlen(argv[i])-1] == 'E' ||
10            argv[i][strlen(argv[i])-1] == 'e')) {
11       lon = temp;
Note: See TracBrowser for help on using the repository browser.