~ubuntu-branches/ubuntu/wily/weechat/wily

« back to all changes in this revision

Viewing changes to src/core/wee-config-file.c

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bouthenot
  • Date: 2014-09-28 17:41:10 UTC
  • mfrom: (29.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140928174110-bwlsn7gqmqfftnmb
Tags: 1.0.1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
979
979
                    option->value = malloc (sizeof (int));
980
980
                    if (option->value)
981
981
                        CONFIG_INTEGER(option) = 0;
 
982
                    else
 
983
                        break;
982
984
                }
983
985
                if (CONFIG_INTEGER(option) == CONFIG_INTEGER_DEFAULT(option))
984
986
                    rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
1009
1011
                    option->value = malloc (sizeof (int));
1010
1012
                    if (option->value)
1011
1013
                        CONFIG_INTEGER(option) = 0;
 
1014
                    else
 
1015
                        break;
1012
1016
                }
1013
1017
                if (CONFIG_COLOR(option) == CONFIG_COLOR_DEFAULT(option))
1014
1018
                    rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
2065
2069
        }
2066
2070
    }
2067
2071
 
2068
 
    log_printf (_("Writing configuration file %s %s"),
 
2072
    log_printf (_("Writing configuration file %s%s%s"),
2069
2073
                config_file->filename,
 
2074
                (default_options) ? " " : "",
2070
2075
                (default_options) ? _("(default options)") : "");
2071
2076
 
2072
2077
    /* open temp file in write mode */
2247
2252
            /* encode line to internal charset */
2248
2253
            ptr_line2 = string_iconv_to_internal (NULL, ptr_line);
2249
2254
            if (ptr_line2)
2250
 
                snprintf (line, sizeof (line) - 1, "%s", ptr_line2);
 
2255
                snprintf (line, sizeof (line), "%s", ptr_line2);
2251
2256
 
2252
2257
            /* skip spaces */
2253
2258
            while (ptr_line[0] == ' ')
2717
2722
        HDATA_VAR(struct t_config_file, last_section, POINTER, 0, NULL, "config_section");
2718
2723
        HDATA_VAR(struct t_config_file, prev_config, POINTER, 0, NULL, hdata_name);
2719
2724
        HDATA_VAR(struct t_config_file, next_config, POINTER, 0, NULL, hdata_name);
2720
 
        HDATA_LIST(config_files);
2721
 
        HDATA_LIST(last_config_file);
 
2725
        HDATA_LIST(config_files, WEECHAT_HDATA_LIST_CHECK_POINTERS);
 
2726
        HDATA_LIST(last_config_file, 0);
2722
2727
    }
2723
2728
    return hdata;
2724
2729
}