-#define BUFSIZE 128
-
-static gchar *decode_geo_parameters(const gchar *input_text)
-{
- gchar *message;
- gchar *path = g_build_filename(get_rc_dir(), GEOCODE_NAME, NULL);
- gchar *cmd = g_strconcat("echo \'", input_text, "\' | awk -f ", path, NULL);
-
- if (g_file_test(path, G_FILE_TEST_EXISTS))
- {
- gchar buf[BUFSIZE];
- FILE *fp;
-
- if ((fp = popen(cmd, "r")) == NULL)
- {
- message = g_strconcat("Error: opening pipe\n", input_text, NULL);
- }
- else
- {
- fgets(buf, BUFSIZE, fp);
- message = g_strconcat(buf, NULL);
-
- if(pclose(fp))
- {
- message = g_strconcat("Error: Command not found or exited with error status\n", input_text, NULL);
- }
- }
- }
- else
- {
- message = g_strconcat(input_text, NULL);
- }
-
- g_free(path);
- g_free(cmd);
- return message;
-}
-