~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_sys.h

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 17:24:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326172457-vni09y22ktvvefmn
some more sprintf --> snprintf

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
#include <drizzled/dynamic_array.h>
51
51
 
52
 
#ifdef HAVE_SYS_MMAN_H 
53
52
#include <sys/mman.h>
54
 
#endif
55
53
 
56
54
#include "drizzled/qsort_cmp.h"
57
55
 
171
169
 
172
170
extern bool timed_mutexes;
173
171
 
174
 
typedef class wild_file_pack    /* Struct to hold info when selecting files */
 
172
typedef struct wild_file_pack   /* Struct to hold info when selecting files */
175
173
{
176
 
public:
177
174
  uint          wilds;          /* How many wildcards */
178
175
  uint          not_pos;        /* Start of not-theese-files */
179
176
  char *        *wild;          /* Pointer to wildcards */
180
 
 
181
 
  wild_file_pack():
182
 
    wilds(0),
183
 
    not_pos(0),
184
 
    wild(NULL)
185
 
  {}
186
 
 
187
177
} WF_PACK;
188
178
 
189
179
enum cache_type
190
180
{
191
 
  TYPE_NOT_SET= 0,
192
 
  READ_CACHE,
193
 
  WRITE_CACHE,
194
 
  READ_FIFO,
195
 
  READ_NET,
196
 
  WRITE_NET
197
 
};
 
181
  TYPE_NOT_SET= 0, READ_CACHE, WRITE_CACHE,
 
182
  SEQ_READ_APPEND               /* sequential read or append */,
 
183
  READ_FIFO, READ_NET,WRITE_NET};
198
184
 
199
 
typedef struct record_cache     /* Used when cacheing records */
 
185
typedef struct st_record_cache  /* Used when cacheing records */
200
186
{
201
 
public:
202
187
  int file;
203
188
  int   rc_seek,error,inited;
204
189
  uint  rc_length,read_length,reclength;
209
194
  my_aio_result aio_result;
210
195
#endif
211
196
  enum cache_type type;
212
 
 
213
 
  record_cache():
214
 
    file(0),
215
 
    rc_seek(0),
216
 
    error(0),
217
 
    inited(0),
218
 
    rc_length(0),
219
 
    read_length(0),
220
 
    reclength(0),
221
 
    rc_record_pos(0),
222
 
    end_of_file(0),
223
 
    rc_buff(NULL),
224
 
    rc_buff2(NULL),
225
 
    rc_pos(NULL),
226
 
    rc_end(NULL),
227
 
    rc_request_pos(NULL)
228
 
  {}
229
 
 
230
197
} RECORD_CACHE;
231
198
 
232
199
 
329
296
extern int wild_compare(const char *str,const char *wildstr,
330
297
                        bool str_is_pattern);
331
298
extern WF_PACK *wf_comp(char * str);
332
 
extern int wf_test(wild_file_pack *wf_pack,const char *name);
333
 
extern void wf_end(wild_file_pack *buffer);
 
299
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
 
300
extern void wf_end(struct wild_file_pack *buffer);
334
301
extern bool array_append_string_unique(const char *str,
335
302
                                          const char **array, size_t size);
336
303
extern void get_date(char * to,int timeflag,time_t use_time);