~ubuntu-branches/ubuntu/precise/libxfont/precise-updates

« back to all changes in this revision

Viewing changes to src/fontfile/dirfile.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2005-12-21 15:44:59 UTC
  • mto: (1.1.9 upstream) (10.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051221154459-11co3ejq50scyf3o
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    char        file_name[MAXFONTFILENAMELEN];
59
59
    char        font_name[MAXFONTNAMELEN];
60
60
    char        dir_file[MAXFONTFILENAMELEN];
61
 
#ifdef FONTDIRATTRIB
62
61
    char        dir_path[MAXFONTFILENAMELEN];
63
62
    char        *ptr;
64
 
#endif
65
63
    FILE       *file;
66
64
    int         count,
67
65
                i,
74
72
    if (strlen(directory) + 1 + sizeof(FontDirFile) > sizeof(dir_file))
75
73
        return BadFontPath;
76
74
 
77
 
#ifdef FONTDIRATTRIB
78
75
    /* Check for font directory attributes */
79
76
#if !defined(__UNIXOS2__) && !defined(WIN32)
80
77
    if ((ptr = strchr(directory, ':'))) {
88
85
        strcpy(dir_path, directory);
89
86
    }
90
87
    strcpy(dir_file, dir_path);
91
 
#else
92
 
    strcpy(dir_file, directory);
93
 
#endif
94
88
    if (dir_file[strlen(dir_file) - 1] != '/')
95
89
        strcat(dir_file, "/");
96
90
    strcat(dir_file, FontDirFile);
147
141
    } else if (errno != ENOENT) {
148
142
        return BadFontPath;
149
143
    }
150
 
#ifdef FONTDIRATTRIB
151
144
    status = ReadFontAlias(dir_path, FALSE, &dir);
152
 
#else
153
 
    status = ReadFontAlias(directory, FALSE, &dir);
154
 
#endif
155
145
    if (status != Successful) {
156
146
        if (dir)
157
147
            FontFileFreeDir (dir);