~ubuntu-branches/ubuntu/karmic/gentoo/karmic

« back to all changes in this revision

Viewing changes to src/cmdparse.c

  • Committer: Bazaar Package Importer
  • Author(s): Margarita Manterola
  • Date: 2006-08-14 19:21:36 UTC
  • mfrom: (3.1.1 edgy)
  • Revision ID: james.westby@ubuntu.com-20060814192136-0es4if1szu30ezf4
Tags: 0.11.55-1.1
* Non-maintainer upload to fix failure to operate with files.
* Applied the suggested patch to fix the problem when dealing with files,
  when a locale is set. Thanks to Anders Lageras for the link to the patch. 
  (Closes: #368849, #364275).

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
        {
254
254
                if((end = strchr(def + 2, '"')) != NULL)
255
255
                {
256
 
                        GString *dstr;
 
256
                        GString *tmp, *dstr;
257
257
 
258
258
                        *end = '\0';
 
259
                        tmp = g_string_new(def + 2);
259
260
                        dstr = g_string_new("");
260
 
                        parse_code(dlg->min, dstr, def + 2, dlg, FALSE);
 
261
                        parse_code(dlg->min, dstr, tmp->str, dlg, FALSE);
 
262
                        g_string_free(tmp, TRUE);
261
263
                        gtk_entry_set_text(GTK_ENTRY(ent), dstr->str);
262
264
                        gtk_entry_select_region(GTK_ENTRY(ent), 0, -1);
263
265
                        g_string_free(dstr, TRUE);
411
413
static void parse_code_input(MainInfo *min, GString *cstr, gchar *code, CmdDlg *dlg)
412
414
{
413
415
        gchar           *ltxt = NULL, *end;
414
 
        const gchar     *def = code + 1;
 
416
        gchar           *def = code + 1;
415
417
        gint            succ = 0;
416
418
        GtkWidget       *label;
417
419
 
579
581
/* ----------------------------------------------------------------------------------------- */
580
582
 
581
583
/* 2003-11-16 - Get ending brace for a code definition. Knows about embedded braces, unlike strchr(). */
582
 
static gchar * get_code_end(gchar *def)
 
584
static const gchar * get_code_end(const gchar *def)
583
585
{
584
586
        const gchar     *base = def;
585
587
        gint            level;
626
628
                        gchar   *end;
627
629
 
628
630
                        code++;
629
 
                        if((end = get_code_end(code)) != NULL)
 
631
                        if((end = (gchar *) get_code_end(code)) != NULL)
630
632
                        {
631
633
                                *end = '\0';            /* This is in a GString, so OK. */
632
634
                                if(code[0] == 'f' || code[0] == 'F')