184
177
(*(info)->write_function)((info),(Buffer),(Count)))
186
179
#define my_b_get(info) \
187
((info)->read_pos != (info)->read_end ?\
188
((info)->read_pos++, (int) (unsigned char) (info)->read_pos[-1]) :\
180
((info)->read_pos != (info)->read_end ? ((info)->read_pos++, (int) (unsigned char) (info)->read_pos[-1]) : _my_b_get(info))
191
182
#define my_b_tell(info) ((info)->pos_in_file + \
192
183
(size_t) (*(info)->current_pos - (info)->request_pos))
194
#define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - \
195
*(info)->current_pos)
185
#define my_b_bytes_in_cache(info) (size_t) (*(info)->current_end - *(info)->current_pos)
197
187
/* Prototypes for mysys and my_func functions */
199
189
extern int my_copy(const char *from,const char *to,myf MyFlags);
200
190
DRIZZLED_API int my_delete(const char *name,myf MyFlags);
201
191
DRIZZLED_API int my_open(const char *FileName,int Flags,myf MyFlags);
202
extern int my_register_filename(int fd, const char *FileName,
203
uint32_t error_message_number, myf MyFlags);
204
DRIZZLED_API int my_create(const char *FileName,int CreateFlags,
205
int AccessFlags, myf MyFlags);
192
extern int my_register_filename(int fd, const char *FileName, uint32_t error_message_number, myf MyFlags);
193
DRIZZLED_API int my_create(const char *FileName,int CreateFlags, int AccessFlags, myf MyFlags);
206
194
DRIZZLED_API int my_close(int Filedes,myf MyFlags);
207
195
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
208
196
extern int my_realpath(char *to, const char *filename, myf MyFlags);
209
197
extern int my_create_with_symlink(const char *linkname, const char *filename,
210
int createflags, int access_flags,
198
int createflags, int access_flags, myf MyFlags);
212
199
DRIZZLED_API int my_delete_with_symlink(const char *name, myf MyFlags);
213
200
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
214
201
DRIZZLED_API size_t my_read(int Filedes,unsigned char *Buffer,size_t Count,myf MyFlags);
215
202
DRIZZLED_API int my_rename(const char *from, const char *to,myf MyFlags);
216
DRIZZLED_API size_t my_write(int Filedes, const unsigned char *Buffer,
217
size_t Count, myf MyFlags);
203
DRIZZLED_API size_t my_write(int Filedes, const unsigned char *Buffer, size_t Count, myf MyFlags);
219
205
extern int check_if_legal_tablename(const char *path);
241
227
extern char * intern_filename(char * to,const char *from);
242
228
extern int pack_filename(char * to, const char *name, size_t max_length);
243
229
extern char * my_load_path(char * to, const char *path, const char *own_path_prefix);
245
extern void my_set_alarm_variable(int signo);
246
230
extern void my_string_ptr_sort(unsigned char *base,uint32_t items,size_t size);
247
extern void radixsort_for_str_ptr(unsigned char* base[], uint32_t number_of_elements,
248
size_t size_of_element,unsigned char *buffer[]);
249
extern void my_qsort(void *base_ptr, size_t total_elems, size_t size,
251
extern void my_qsort2(void *base_ptr, size_t total_elems, size_t size,
252
qsort2_cmp cmp, void *cmp_argument);
231
extern void radixsort_for_str_ptr(unsigned char* base[], uint32_t number_of_elements, size_t size_of_element,unsigned char *buffer[]);
232
extern void my_qsort(void *base_ptr, size_t total_elems, size_t size, qsort_cmp cmp);
233
extern void my_qsort2(void *base_ptr, size_t total_elems, size_t size, qsort2_cmp cmp, void *cmp_argument);
253
234
extern qsort2_cmp get_ptr_compare(size_t);
254
235
DRIZZLED_API void my_store_ptr(unsigned char *buff, size_t pack_length, my_off_t pos);
255
236
DRIZZLED_API my_off_t my_get_ptr(unsigned char *ptr, size_t pack_length);