~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_redel.c

  • Committer: Monty Taylor
  • Date: 2008-08-04 19:37:18 UTC
  • mto: (261.2.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 262.
  • Revision ID: monty@inaugust.com-20080804193718-f0rz13uli4429ozb
Changed gettext_noop() to N_()

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    char ext[20];
52
52
    ext[0]='-';
53
53
    get_date(ext+1,2+4,(time_t) 0);
54
 
    my_stpcpy(strchr(ext, '\0'),REDEL_EXT);
 
54
    strmov(strend(ext),REDEL_EXT);
55
55
    if (my_rename(org_name, fn_format(name_buff, org_name, "", ext, 2),
56
56
                  MyFlags))
57
57
      goto end;
83
83
  }
84
84
  if ((statbuf.st_mode & S_IFMT) != S_IFREG)
85
85
    return 1;
86
 
  chmod(to, statbuf.st_mode & 07777);           /* Copy modes */
 
86
  VOID(chmod(to, statbuf.st_mode & 07777));             /* Copy modes */
87
87
 
88
88
  if (statbuf.st_nlink > 1 && MyFlags & MY_LINK_WARNING)
89
89
  {
90
90
    if (MyFlags & MY_LINK_WARNING)
91
91
      my_error(EE_LINK_WARNING,MYF(ME_BELL+ME_WAITTANG),from,statbuf.st_nlink);
92
92
  }
93
 
  if(chown(to, statbuf.st_uid, statbuf.st_gid)!=0)
94
 
    return 1;
 
93
  VOID(chown(to, statbuf.st_uid, statbuf.st_gid));      /* Copy ownership */
95
94
 
96
95
#ifndef __ZTC__
97
96
  if (MyFlags & MY_COPYTIME)
99
98
    struct utimbuf timep;
100
99
    timep.actime  = statbuf.st_atime;
101
100
    timep.modtime = statbuf.st_mtime;
102
 
    utime((char*) to, &timep);/* Update last accessed and modified times */
 
101
    VOID(utime((char*) to, &timep));/* Update last accessed and modified times */
103
102
  }
104
103
#else
105
104
  if (MyFlags & MY_COPYTIME)
107
106
    time_t time[2];
108
107
    time[0]= statbuf.st_atime;
109
108
    time[1]= statbuf.st_mtime;
110
 
    utime((char*) to, time);/* Update last accessed and modified times */
 
109
    VOID(utime((char*) to, time));/* Update last accessed and modified times */
111
110
  }
112
111
#endif
113
112
  return 0;