Ignore:
Timestamp:
May 9, 2007, 11:02:24 AM (14 years ago)
Author:
Bruno Cornec
Message:

mr_conf now handles # inside strings correctly (before they were considered as a comment which they are not !)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondoarchive/mondoarchive.c

    r1415 r1422  
    136136   
    137137    char *p = NULL;
    138 
    139     mr_asprintf(&p, mr_conf_sread("mondo_iso_creation_cmd"));
     138    char *s = NULL;
     139
     140    s = mr_conf_sread("mondo_iso_creation_cmd");
     141    fprintf(stderr,"s: %s\n",s);
     142    mr_asprintf(&p, s);
    140143    mr_cnf->iso_creation_cmd = p;
    141     mr_asprintf(&mr_cnf->iso_creation_options, mr_conf_sread("mondo_iso_creation_options"));
    142     mr_asprintf(&mr_cnf->iso_burning_cmd, mr_conf_sread("mondo_iso_burning_cmd"));
    143     mr_asprintf(&mr_cnf->iso_burning_options, mr_conf_sread("mondo_iso_burning_options"));
     144    p = NULL;
     145
     146    mr_asprintf(&p, mr_conf_sread("mondo_iso_creation_options"));
     147    mr_cnf->iso_creation_options = p;
     148    p = NULL;
     149
     150    mr_asprintf(&p, mr_conf_sread("mondo_iso_burning_cmd"));
     151    mr_cnf->iso_burning_cmd = p;
     152    p = NULL;
     153
     154    mr_asprintf(&p, mr_conf_sread("mondo_iso_burning_options"));
     155    mr_cnf->iso_burning_options = p;
     156    p = NULL;
     157
    144158    mr_cnf->iso_burning_speed = mr_conf_iread("mondo_iso_burning_speed");
    145159    mr_cnf->media_size = mr_conf_iread("mondo_media_size");
    146     mr_asprintf(&mr_cnf->media_device, mr_conf_sread("mondo_media_device"));
     160
     161    mr_asprintf(&p, mr_conf_sread("mondo_media_device"));
     162    mr_cnf->media_device = p;
     163    p = NULL;
     164
    147165    mr_cnf->manual_tray = mr_conf_bread("mondo_manual_tray");
    148166    mr_cnf->log_level = mr_conf_iread("mondo_log_level");
    149     mr_asprintf(&mr_cnf->prefix, mr_conf_sread("mondo_prefix"));
     167
     168    mr_asprintf(&p, mr_conf_sread("mondo_prefix"));
     169    mr_cnf->prefix = p;
     170    p = NULL;
     171
    150172    mr_cnf->external_tape_blocksize = mr_conf_iread("mondo_external_tape_blocksize");
    151173    mr_cnf->internal_tape_blocksize = mr_conf_iread("mondo_internal_tape_blocksize");
    152174    mr_cnf->slice_size = mr_conf_iread("mondo_slice_size");
    153     mr_asprintf(&mr_cnf->deplist_file, mr_conf_sread("mondo_deplist_file"));
     175
     176    mr_asprintf(&p, mr_conf_sread("mondo_deplist_file"));
     177    mr_cnf->deplist_file = p;
     178    p = NULL;
     179
    154180    mr_cnf->write_boot_floppy = mr_conf_bread("mondo_write_boot_floppy");
    155181    mr_cnf->create_mindi_cd = mr_conf_bread("mondo_create_mindi_cd");
    156     mr_asprintf(&mr_cnf->kernel, mr_conf_sread("mondo_kernel"));
    157     mr_asprintf(&mr_cnf->additional_modules, mr_conf_sread("mondo_additional_modules"));
    158     mr_asprintf(&mr_cnf->boot_loader, mr_conf_sread("mondo_boot_loader"));
     182
     183    mr_asprintf(&p, mr_conf_sread("mondo_kernel"));
     184    mr_cnf->kernel = p;
     185    p = NULL;
     186
     187    mr_asprintf(&p, mr_conf_sread("mondo_additional_modules"));
     188    mr_cnf->additional_modules = p;
     189    p = NULL;
     190
     191    mr_asprintf(&p, mr_conf_sread("mondo_boot_loader"));
     192    mr_cnf->boot_loader = p;
     193    p = NULL;
     194
    159195    mr_cnf->differential = mr_conf_bread("mondo_differential");
    160     mr_asprintf(&mr_cnf->compression_tool, mr_conf_sread("mondo_compression_tool"));
     196
     197    mr_asprintf(&p, mr_conf_sread("mondo_compression_tool"));
     198    mr_cnf->compression_tool = p;
     199    p = NULL;
     200
    161201    mr_cnf->compression_level = mr_conf_iread("mondo_compression_level");
    162     mr_asprintf(&mr_cnf->exclude_paths, mr_conf_sread("mondo_exclude_paths"));
    163     mr_asprintf(&mr_cnf->include_paths, mr_conf_sread("mondo_include_paths"));
    164     mr_asprintf(&mr_cnf->ui_mode, mr_conf_sread("mondo_ui_mode"));
     202
     203    mr_asprintf(&p, mr_conf_sread("mondo_exclude_paths"));
     204    mr_cnf->exclude_paths = p;
     205    p = NULL;
     206
     207    mr_asprintf(&p, mr_conf_sread("mondo_include_paths"));
     208    mr_cnf->include_paths = p;
     209    p = NULL;
     210
     211    mr_asprintf(&p, mr_conf_sread("mondo_ui_mode"));
     212    mr_cnf->ui_mode = p;
     213    p = NULL;
     214
    165215    mr_cnf->automatic_restore = mr_conf_bread("mondo_automatic_restore");
    166     mr_asprintf(&mr_cnf->scratch_dir, mr_conf_sread("mondo_scratch_dir"));
    167     mr_asprintf(&mr_cnf->tmp_dir, mr_conf_sread("mondo_tmp_dir"));
    168     mr_asprintf(&mr_cnf->images_dir, mr_conf_sread("mondo_images_dir"));
     216
     217    mr_asprintf(&p, mr_conf_sread("mondo_scratch_dir"));
     218    mr_cnf->scratch_dir = p;
     219    p = NULL;
     220
     221    mr_asprintf(&p, mr_conf_sread("mondo_tmp_dir"));
     222    mr_cnf->tmp_dir = p;
     223    p = NULL;
     224
     225    mr_asprintf(&p, mr_conf_sread("mondo_images_dir"));
     226    mr_cnf->images_dir = p;
     227    p = NULL;
    169228    mr_msg(5, "Directory for images is %s", mr_cnf->images_dir);
    170229}
Note: See TracChangeset for help on using the changeset viewer.