~ubuntu-branches/ubuntu/lucid/mc/lucid

« back to all changes in this revision

Viewing changes to src/poptconfig.c

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2008-09-16 10:38:59 UTC
  • mfrom: (3.1.6 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080916103859-2uwn8w61xk5mbxxq
Tags: 2:4.6.2~git20080311-4
Corrected fix for odt2txt issue (Closes: #492019) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include "popt.h"
18
18
#include "poptint.h"
19
19
 
20
 
static void configLine(poptContext con, unsigned char * line) {
 
20
static void configLine(poptContext con, char * line) {
21
21
    int nameLength = strlen(con->appName);
22
22
    char * opt;
23
23
    struct poptAlias alias;
27
27
    
28
28
    if (strncmp(line, con->appName, nameLength)) return;
29
29
    line += nameLength;
30
 
    if (!*line || !isspace(*line)) return;
31
 
    while (*line && isspace(*line)) line++;
 
30
    if (!*line || !isspace((unsigned char) *line)) return;
 
31
    while (*line && isspace((unsigned char) *line)) line++;
32
32
    entryType = line;
33
33
 
34
 
    while (!*line || !isspace(*line)) line++;
 
34
    while (!*line || !isspace((unsigned char) *line)) line++;
35
35
    *line++ = '\0';
36
 
    while (*line && isspace(*line)) line++;
 
36
    while (*line && isspace((unsigned char) *line)) line++;
37
37
    if (!*line) return;
38
38
    opt = line;
39
39
 
40
 
    while (!*line || !isspace(*line)) line++;
 
40
    while (!*line || !isspace((unsigned char) *line)) line++;
41
41
    *line++ = '\0';
42
 
    while (*line && isspace(*line)) line++;
 
42
    while (*line && isspace((unsigned char) *line)) line++;
43
43
    if (!*line) return;
44
44
 
45
45
    if (opt[0] == '-' && opt[1] == '-')
101
101
          case '\n':
102
102
            *dst = '\0';
103
103
            dst = buf;
104
 
            while (*dst && isspace((unsigned)*dst)) dst++;
 
104
            while (*dst && isspace((unsigned char) *dst)) dst++;
105
105
            if (*dst && *dst != '#') {
106
106
                configLine(con, dst);
107
107
            }
130
130
    const char* home;
131
131
    int rc;
132
132
 
 
133
    (void) useEnv;
 
134
 
133
135
    if (!con->appName) return 0;
134
136
 
135
137
    rc = poptReadConfigFile(con, "/etc/popt");