From: Alexandru C. <cs...@us...> - 2005-01-29 15:49:30
|
Update of /cvsroot/groundstation/gpredict/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4447 Modified Files: satloc-tree.c Log Message: Deactivate unused code and initialise pointers. Index: satloc-tree.c =================================================================== RCS file: /cvsroot/groundstation/gpredict/src/satloc-tree.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** satloc-tree.c 11 Jan 2005 18:04:22 -0000 1.11 --- satloc-tree.c 29 Jan 2005 15:49:21 -0000 1.12 *************** *** 47,52 **** ! static gchar *satloc_conv_lat (const gchar *lat); ! static gchar *satloc_conv_lon (const gchar *lon); --- 47,52 ---- ! /* static gchar *satloc_conv_lat (const gchar *lat); */ ! /* static gchar *satloc_conv_lon (const gchar *lon); */ *************** *** 58,62 **** */ GtkWidget *tree; ! GtkCTreeNode *reg,*state; FILE *locfile; gchar *msg,**vbuff,**vvbf,*buff,line[100]; --- 58,62 ---- */ GtkWidget *tree; ! GtkCTreeNode *reg = NULL, *state = NULL; FILE *locfile; gchar *msg,**vbuff,**vvbf,*buff,line[100]; *************** *** 102,105 **** --- 102,106 ---- /* Create a new Region node if necessary */ if (g_strcasecmp (curreg, vbuff[0])) { + g_free (curreg); curreg = g_strdup (vbuff [0]); *************** *** 208,287 **** ! static gchar *satloc_conv_lat (const gchar *lat) ! { ! gchar *tmp,**buff; ! gfloat deg,min,sec; ! gint sign; ! tmp = g_strdup (lat); ! /* get sign */ ! switch (lat[strlen(lat) - 1]) { ! case 'N': ! sign = 1; ! break; ! case 'S': ! sign = -1; ! break; ! default: ! sign = 1; ! g_print ("**** UNKNOWN SIGN!!!! (%s) ****\n", lat); ! } ! /* Remove N/S */ ! g_strdelimit (tmp, "NS", '\0'); ! buff = g_strsplit (tmp, ":", 0); ! deg = g_strtod (buff[0], NULL); ! min = g_strtod (buff[1], NULL); ! if (buff[2]) ! sec = g_strtod (buff[2], NULL); ! else ! sec = 0.00; ! g_free (tmp); ! g_strfreev (buff); ! return (g_strdup_printf ("%.4f", sign*(deg+min/60))); ! } ! static gchar *satloc_conv_lon (const gchar *lon) ! { ! gchar *tmp,**buff; ! gfloat deg,min,sec; ! gint sign; ! tmp = g_strdup (lon); ! /* get sign */ ! switch (lon[strlen(lon) - 1]) { ! case 'W': ! sign = 1; ! break; ! case 'E': ! sign = -1; ! break; ! default: ! sign = 1; ! g_print ("**** UNKNOWN SIGN!!!! (%s) ****\n", lon); ! } ! /* Remove N/S */ ! g_strdelimit (tmp, "EW", '\0'); ! buff = g_strsplit (tmp, ":", 0); ! deg = g_strtod (buff[0], NULL); ! min = g_strtod (buff[1], NULL); ! if (buff[2]) ! sec = g_strtod (buff[2], NULL); ! else ! sec = 0.00; ! g_free (tmp); ! g_strfreev (buff); ! return (g_strdup_printf ("%.4f", sign*(deg+min/60+sec/3600))); ! } --- 209,288 ---- ! /* static gchar *satloc_conv_lat (const gchar *lat) */ ! /* { */ ! /* gchar *tmp,**buff; */ ! /* gfloat deg,min,sec; */ ! /* gint sign; */ ! /* tmp = g_strdup (lat); */ ! /* /\* get sign *\/ */ ! /* switch (lat[strlen(lat) - 1]) { */ ! /* case 'N': */ ! /* sign = 1; */ ! /* break; */ ! /* case 'S': */ ! /* sign = -1; */ ! /* break; */ ! /* default: */ ! /* sign = 1; */ ! /* g_print ("**** UNKNOWN SIGN!!!! (%s) ****\n", lat); */ ! /* } */ ! /* /\* Remove N/S *\/ */ ! /* g_strdelimit (tmp, "NS", '\0'); */ ! /* buff = g_strsplit (tmp, ":", 0); */ ! /* deg = g_strtod (buff[0], NULL); */ ! /* min = g_strtod (buff[1], NULL); */ ! /* if (buff[2]) */ ! /* sec = g_strtod (buff[2], NULL); */ ! /* else */ ! /* sec = 0.00; */ ! /* g_free (tmp); */ ! /* g_strfreev (buff); */ ! /* return (g_strdup_printf ("%.4f", sign*(deg+min/60))); */ ! /* } */ ! /* static gchar *satloc_conv_lon (const gchar *lon) */ ! /* { */ ! /* gchar *tmp,**buff; */ ! /* gfloat deg,min,sec; */ ! /* gint sign; */ ! /* tmp = g_strdup (lon); */ ! /* /\* get sign *\/ */ ! /* switch (lon[strlen(lon) - 1]) { */ ! /* case 'W': */ ! /* sign = 1; */ ! /* break; */ ! /* case 'E': */ ! /* sign = -1; */ ! /* break; */ ! /* default: */ ! /* sign = 1; */ ! /* g_print ("**** UNKNOWN SIGN!!!! (%s) ****\n", lon); */ ! /* } */ ! /* /\* Remove N/S *\/ */ ! /* g_strdelimit (tmp, "EW", '\0'); */ ! /* buff = g_strsplit (tmp, ":", 0); */ ! /* deg = g_strtod (buff[0], NULL); */ ! /* min = g_strtod (buff[1], NULL); */ ! /* if (buff[2]) */ ! /* sec = g_strtod (buff[2], NULL); */ ! /* else */ ! /* sec = 0.00; */ ! /* g_free (tmp); */ ! /* g_strfreev (buff); */ ! /* return (g_strdup_printf ("%.4f", sign*(deg+min/60+sec/3600))); */ ! /* } */ |