~ubuntu-branches/ubuntu/utopic/libxpm/utopic

« back to all changes in this revision

Viewing changes to src/WrFFrI.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2007-08-25 10:50:50 UTC
  • mfrom: (1.1.4 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20070825105050-xbytdxkw7wuclhca
Tags: 1:3.5.7-1
* New upstream release.
* Add the upstream URL to debian/copyright.
* Use binary:Version instead of the deprecated Source-Version.
* Add myself to uploaders, and remove Branden with his permission.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
#ifdef VMS
118
118
        name = filename;
119
119
#else
120
 
        if (!(name = rindex(filename, '/'))
 
120
        if (!(name = strrchr(filename, '/'))
121
121
#ifdef AMIGA
122
 
            && !(name = rindex(filename, ':'))
 
122
            && !(name = strrchr(filename, ':'))
123
123
#endif
124
124
     )
125
125
            name = filename;
127
127
            name++;
128
128
#endif
129
129
        /* let's try to make a valid C syntax name */
130
 
        if (index(name, '.')) {
 
130
        if (strchr(name, '.')) {
131
131
            strncpy(new_name, name, sizeof(new_name));
132
132
            new_name[sizeof(new_name)-1] = '\0';
133
133
            /* change '.' to '_' */
134
134
            name = s = new_name;
135
 
            while ((dot = index(s, '.'))) {
 
135
            while ((dot = strchr(s, '.'))) {
136
136
                *dot = '_';
137
137
                s = dot;
138
138
            }
139
139
        }
140
 
        if (index(name, '-')) {
 
140
        if (strchr(name, '-')) {
141
141
            if (name != new_name) {
142
 
                strcpy(new_name, name);
 
142
                strncpy(new_name, name, sizeof(new_name));
 
143
                new_name[sizeof(new_name)-1] = '\0';
143
144
                name = new_name;
144
145
            }
145
146
            /* change '-' to '_' */
146
147
            s = name;
147
 
            while ((dot = index(s, '-'))) {
 
148
            while ((dot = strchr(s, '-'))) {
148
149
                *dot = '_';
149
150
                s = dot;
150
151
            }