~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_pack.c

Removed references to strmov and strnmov

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
  if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
143
143
  {                                             /* Skip device part */
144
144
    length=(size_t) (pos-from_ptr)+1;
145
 
    start=strnmov(buff,from_ptr,length); from_ptr+=length;
 
145
    start=stpncpy(buff,from_ptr,length); from_ptr+=length;
146
146
  }
147
147
#endif
148
148
 
149
149
  parent[0]=FN_LIBCHAR;
150
 
  length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent);
 
150
  length=(size_t) (stpcpy(parent+1,FN_PARENTDIR)-parent);
151
151
  for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
152
152
  {
153
153
#ifdef BACKSLASH_MBTAIL
177
177
              pos+=length+1;                    /* Don't unpack ~/.. */
178
178
              continue;
179
179
            }
180
 
            pos=strmov(buff,home_dir)-1;        /* Unpacks ~/.. */
 
180
            pos=stpcpy(buff,home_dir)-1;        /* Unpacks ~/.. */
181
181
            if (*pos == FN_LIBCHAR)
182
182
              pos--;                            /* home ended with '/' */
183
183
          }
188
188
              pos+=length+1;                    /* Don't unpack ./.. */
189
189
              continue;
190
190
            }
191
 
            pos=strmov(buff,curr_dir)-1;        /* Unpacks ./.. */
 
191
            pos=stpcpy(buff,curr_dir)-1;        /* Unpacks ./.. */
192
192
            if (*pos == FN_LIBCHAR)
193
193
              pos--;                            /* home ended with '/' */
194
194
          }
197
197
            pos--;
198
198
          if (pos[1] == FN_HOMELIB || memcmp(pos,parent,length) == 0)
199
199
          {                                     /* Don't remove ~user/ */
200
 
            pos=strmov(end_parentdir+1,parent);
 
200
            pos=stpcpy(end_parentdir+1,parent);
201
201
            *pos=FN_LIBCHAR;
202
202
            continue;
203
203
          }
223
223
      }
224
224
    }
225
225
  }
226
 
  (void) strmov(to,buff);
 
226
  (void) stpcpy(to,buff);
227
227
  return((size_t) (pos-buff));
228
228
} /* cleanup_dirname */
229
229
 
249
249
    File file;
250
250
    size_t length;
251
251
    char temp= *(--pos);            /* May be "/" or "\" */
252
 
    strmov(pos,".sym");
 
252
    stpcpy(pos,".sym");
253
253
    file= my_open(dir, O_RDONLY, MYF(0));
254
254
    *pos++=temp; *pos=0;          /* Restore old filename */
255
255
    if (file >= 0)
391
391
  n_length=unpack_dirname(buff,buff);
392
392
  if (n_length+strlen(from+length) < FN_REFLEN)
393
393
  {
394
 
    (void) strmov(buff+n_length,from+length);
 
394
    (void) stpcpy(buff+n_length,from+length);
395
395
    length= system_filename(to,buff);           /* Fix to usably filename */
396
396
  }
397
397
  else
423
423
  char buff[FN_REFLEN];
424
424
 
425
425
  libchar_found=0;
426
 
  (void) strmov(buff,from);                      /* If to == from */
 
426
  (void) stpcpy(buff,from);                      /* If to == from */
427
427
  from_pos= buff;
428
428
  if ((pos=strrchr(from_pos,FN_DEVCHAR)))       /* Skip device part */
429
429
  {
430
430
    pos++;
431
 
    to_pos=strnmov(to,from_pos,(size_t) (pos-from_pos));
 
431
    to_pos=stpncpy(to,from_pos,(size_t) (pos-from_pos));
432
432
    from_pos=pos;
433
433
  }
434
434
  else
444
444
      from_pos+=strlen(FN_ROOTDIR);             /* Actually +1 but... */
445
445
      if (! strchr(from_pos,FN_LIBCHAR))
446
446
      {                                         /* No dir, use [000000] */
447
 
        to_pos=strmov(to_pos,FN_C_ROOT_DIR);
 
447
        to_pos=stpcpy(to_pos,FN_C_ROOT_DIR);
448
448
        libchar_found++;
449
449
      }
450
450
    }
457
457
        *(to_pos++)=FN_C_DIR_SEP;               /* Add '.' between dirs */
458
458
      if (strstr(from_pos,FN_PARENTDIR) == from_pos &&
459
459
          from_pos+strlen(FN_PARENTDIR) == pos)
460
 
        to_pos=strmov(to_pos,FN_C_PARENT_DIR);  /* Found '../' */
 
460
        to_pos=stpcpy(to_pos,FN_C_PARENT_DIR);  /* Found '../' */
461
461
      else
462
 
        to_pos=strnmov(to_pos,from_pos,(size_t) (pos-from_pos));
 
462
        to_pos=stpncpy(to_pos,from_pos,(size_t) (pos-from_pos));
463
463
      from_pos=pos+1;
464
464
    }
465
465
    *(to_pos++)=FN_C_AFTER_DIR;
466
466
  }
467
 
  length= (size_t) (strmov(to_pos,from_pos)-to);
 
467
  length= (size_t) (stpcpy(to_pos,from_pos)-to);
468
468
  return(length);
469
469
#endif
470
470
} /* system_filename */
478
478
  char buff[FN_REFLEN];
479
479
  if (from == to)
480
480
  {                                             /* Dirname may destroy from */
481
 
    strmov(buff,from);
 
481
    stpcpy(buff,from);
482
482
    from=buff;
483
483
  }
484
484
  length= dirname_part(to, from, &to_length);   /* Copy dirname & fix chars */
485
 
  (void) strmov(to + to_length,from+length);
 
485
  (void) stpcpy(to + to_length,from+length);
486
486
  return (to);
487
487
} /* intern_filename */