Skip to content

Commit

Permalink
Cleaned namespace for global.h, config.h and helper.h
Browse files Browse the repository at this point in the history
Cleaned public symbol tables for global.h, config.h and helper.h. Also added

    #include "internal.h"

in preparation for future namespace cleaning.


git-svn-id: svn+ssh://davebalmain.com/home/dave/repos/ferret/trunk@926 06fd6eb0-0002-0410-a719-e5602cce40bc
  • Loading branch information
dave committed Apr 18, 2008
1 parent 2eff78c commit 982f229
Show file tree
Hide file tree
Showing 51 changed files with 203 additions and 230 deletions.
2 changes: 1 addition & 1 deletion c/include/bitvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
typedef struct FrtBitVector
{
/** The bits are held in an array of 32-bit integers */
f_u32 *bits;
frt_u32 *bits;

/** size is equal to 1 + the highest order bit set */
int size;
Expand Down
12 changes: 6 additions & 6 deletions c/include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ typedef unsigned int bool;
#endif
typedef unsigned char uchar;

typedef posh_u16_t f_u16;
typedef posh_i16_t f_i16;
typedef posh_u32_t f_u32;
typedef posh_i32_t f_i32;
typedef posh_u64_t f_u64;
typedef posh_i64_t f_i64;
typedef posh_u16_t frt_u16;
typedef posh_i16_t frt_i16;
typedef posh_u32_t frt_u32;
typedef posh_i32_t frt_i32;
typedef posh_u64_t frt_u64;
typedef posh_i64_t frt_i64;

#if ( LONG_MAX == 2147483647 ) && defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
#define F_OFF_T_PFX "ll"
Expand Down
4 changes: 2 additions & 2 deletions c/include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ typedef void (*frt_free_ft)(void *key);

extern unsigned int *frt_imalloc(unsigned int value);
extern unsigned long *frt_lmalloc(unsigned long value);
extern f_u32 *frt_u32malloc(f_u32 value);
extern f_u64 *frt_u64malloc(f_u64 value);
extern frt_u32 *frt_u32malloc(frt_u32 value);
extern frt_u64 *frt_u64malloc(frt_u64 value);

extern char *frt_estrdup(const char *s);
extern char *frt_estrcat(char *str, char *str_cat);
Expand Down
4 changes: 2 additions & 2 deletions c/include/helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

extern int hlp_string_diff(register const char *const s1,
register const char *const s2);
extern f_i32 float2int(float f);
extern float int2float(f_i32 i32);
extern frt_i32 float2int(float f);
extern float int2float(frt_i32 i32);
extern float byte2float(unsigned char b);
extern unsigned char float2byte(float f);

Expand Down
14 changes: 7 additions & 7 deletions c/include/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,17 @@ extern void si_advance_norm_gen(SegmentInfo *si, int field_num);
typedef struct SegmentInfos
{
FieldInfos *fis;
f_u64 counter;
f_u64 version;
f_i64 generation;
f_i32 format;
frt_u64 counter;
frt_u64 version;
frt_i64 generation;
frt_i32 format;
Store *store;
SegmentInfo **segs;
int size;
int capa;
} SegmentInfos;

extern char *fn_for_generation(char *buf, char *base, char *ext, f_i64 gen);
extern char *fn_for_generation(char *buf, char *base, char *ext, frt_i64 gen);

extern SegmentInfos *sis_new(FieldInfos *fis);
extern SegmentInfo *sis_new_segment(SegmentInfos *sis, int dcnt, Store *store);
Expand All @@ -212,9 +212,9 @@ extern void sis_del_from_to(SegmentInfos *sis, int from, int to);
extern void sis_clear(SegmentInfos *sis);
extern SegmentInfos *sis_read(Store *store);
extern void sis_write(SegmentInfos *sis, Store *store, Deleter *deleter);
extern f_u64 sis_read_current_version(Store *store);
extern frt_u64 sis_read_current_version(Store *store);
extern void sis_destroy(SegmentInfos *sis);
extern f_i64 sis_current_segment_generation(Store *store);
extern frt_i64 sis_current_segment_generation(Store *store);
extern char *sis_curr_seg_file_name(char *buf, Store *store);
extern void sis_put(SegmentInfos *sis, FILE *stream);

Expand Down
6 changes: 6 additions & 0 deletions c/include/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@
#define hs_orig frt_hs_orig
#define hs_rem frt_hs_rem
#define hyphen_filter_new frt_hyphen_filter_new
#define i16 frt_i16
#define i32 frt_i32
#define i64 frt_i64
#define icmp frt_icmp
#define icmp_risky frt_icmp_risky
#define imalloc frt_imalloc
Expand Down Expand Up @@ -268,7 +271,10 @@
#define ts_new frt_ts_new
#define ts_new_i frt_ts_new_i
#define ts_next frt_ts_next
#define u16 frt_u16
#define u32 frt_u32
#define u32malloc frt_u32malloc
#define u64 frt_u64
#define u64malloc frt_u64malloc
#define vexit frt_vexit
#define vstrfmt frt_vstrfmt
Expand Down
20 changes: 10 additions & 10 deletions c/include/store.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ extern void os_write_bytes(OutStream *os, const uchar *buf, int len);
* @param num the 32-bit signed integer to write
* @raise IO_ERROR if there is an error writing to the file-system
*/
extern void os_write_i32(OutStream *os, f_i32 num);
extern void os_write_i32(OutStream *os, frt_i32 num);

/**
* Write a 64-bit signed integer to the OutStream
Expand All @@ -518,7 +518,7 @@ extern void os_write_i32(OutStream *os, f_i32 num);
* @param num the 64-bit signed integer to write
* @raise IO_ERROR if there is an error writing to the file-system
*/
extern void os_write_i64(OutStream *os, f_i64 num);
extern void os_write_i64(OutStream *os, frt_i64 num);

/**
* Write a 32-bit unsigned integer to the OutStream
Expand All @@ -527,7 +527,7 @@ extern void os_write_i64(OutStream *os, f_i64 num);
* @param num the 32-bit unsigned integer to write
* @raise IO_ERROR if there is an error writing to the file-system
*/
extern void os_write_u32(OutStream *os, f_u32 num);
extern void os_write_u32(OutStream *os, frt_u32 num);

/**
* Write a 64-bit unsigned integer to the OutStream
Expand All @@ -536,7 +536,7 @@ extern void os_write_u32(OutStream *os, f_u32 num);
* @param num the 64-bit unsigned integer to write
* @raise IO_ERROR if there is an error writing to the file-system
*/
extern void os_write_u64(OutStream *os, f_u64 num);
extern void os_write_u64(OutStream *os, frt_u64 num);

/**
* Write an unsigned integer to OutStream in compressed VINT format.
Expand Down Expand Up @@ -566,7 +566,7 @@ extern void os_write_voff_t(OutStream *os, register off_t num);
* @param num the 64bit int to write
* @raise IO_ERROR if there is an error writing to the file-system
*/
extern void os_write_vll(OutStream *os, register f_u64 num);
extern void os_write_vll(OutStream *os, register frt_u64 num);

/**
* Write a string to the OutStream. A string is an integer +length+ in VINT
Expand Down Expand Up @@ -642,7 +642,7 @@ extern uchar *is_read_bytes(InStream *is, uchar *buf, int len);
* @raise IO_ERROR if there is a error reading from the file-system
* @raise EOF_ERROR if there is an attempt to read past the end of the file
*/
extern f_i32 is_read_i32(InStream *is);
extern frt_i32 is_read_i32(InStream *is);

/**
* Read a 64-bit unsigned integer from the InStream.
Expand All @@ -652,7 +652,7 @@ extern f_i32 is_read_i32(InStream *is);
* @raise IO_ERROR if there is a error reading from the file-system
* @raise EOF_ERROR if there is an attempt to read past the end of the file
*/
extern f_i64 is_read_i64(InStream *is);
extern frt_i64 is_read_i64(InStream *is);

/**
* Read a 32-bit signed integer from the InStream.
Expand All @@ -662,7 +662,7 @@ extern f_i64 is_read_i64(InStream *is);
* @raise IO_ERROR if there is a error reading from the file-system
* @raise EOF_ERROR if there is an attempt to read past the end of the file
*/
extern f_u32 is_read_u32(InStream *is);
extern frt_u32 is_read_u32(InStream *is);

/**
* Read a 64-bit signed integer from the InStream.
Expand All @@ -672,7 +672,7 @@ extern f_u32 is_read_u32(InStream *is);
* @raise IO_ERROR if there is a error reading from the file-system
* @raise EOF_ERROR if there is an attempt to read past the end of the file
*/
extern f_u64 is_read_u64(InStream *is);
extern frt_u64 is_read_u64(InStream *is);

/**
* Read a compressed (VINT) unsigned integer from the InStream.
Expand Down Expand Up @@ -717,7 +717,7 @@ extern FRT_INLINE off_t is_read_voff_t(InStream *is);
* @raise IO_ERROR if there is a error reading from the file-system
* @raise EOF_ERROR if there is an attempt to read past the end of the file
*/
extern FRT_INLINE f_u64 is_read_vll(InStream *is);
extern FRT_INLINE frt_u64 is_read_vll(InStream *is);

/**
* Read a string from the InStream. A string is an integer +length+ in vint
Expand Down
Loading

0 comments on commit 982f229

Please sign in to comment.