~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_lib.c

  • Committer: Stewart Smith
  • Date: 2008-09-15 07:13:59 UTC
  • mfrom: (383.1.21 drizzle)
  • mto: This revision was merged to the branch mainline in revision 408.
  • Revision ID: stewart@flamingspork.com-20080915071359-f8bznznyaiqrtqxa
merged

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
#define NAMES_START_SIZE   32768
54
54
 
55
55
 
56
 
static int      comp_names(struct fileinfo *a,struct fileinfo *b);
 
56
static int comp_names(const struct fileinfo *a, const struct fileinfo *b);
57
57
 
58
58
 
59
59
        /* We need this because program don't know with malloc we used */
74
74
 
75
75
        /* Compare in sort of filenames */
76
76
 
77
 
static int comp_names(struct fileinfo *a, struct fileinfo *b)
 
77
static int comp_names(const struct fileinfo *a, const struct fileinfo *b)
78
78
{
79
79
  return (strcmp(a->name,b->name));
80
80
} /* comp_names */
118
118
  /* MY_DIR structure is allocated and completly initialized at this point */
119
119
  result= (MY_DIR*)buffer;
120
120
 
121
 
  tmp_file=strend(tmp_path);
 
121
  tmp_file= strchr(tmp_path, '\0');
122
122
 
123
123
  dp= (struct dirent*) dirent_tmp;
124
124
  
134
134
        goto error;
135
135
      
136
136
      memset(finfo.mystat, 0, sizeof(struct stat));
137
 
      VOID(strmov(tmp_file,dp->d_name));
 
137
      VOID(stpcpy(tmp_file,dp->d_name));
138
138
      VOID(stat(tmp_path, finfo.mystat));
139
139
      if (!(finfo.mystat->st_mode & S_IREAD))
140
140
        continue;
190
190
 
191
191
  if (src[0] == 0)
192
192
    src= (char*) ".";                           /* Use empty as current */
193
 
  end=strmov(dst, src);
 
193
  end=stpcpy(dst, src);
194
194
  if (end[-1] != FN_LIBCHAR)
195
195
  {
196
196
    end[0]=FN_LIBCHAR;                          /* Add last '/' */