mirror of
https://github.com/simon987/sist2.git
synced 2025-12-19 18:24:54 +00:00
utf8 update + bug fixes
This commit is contained in:
15
src/util.h
15
src/util.h
@@ -5,7 +5,10 @@
|
||||
|
||||
#define TEXT_BUF_FULL -1
|
||||
#define INITIAL_BUF_SIZE 1024 * 16
|
||||
#define SHOULD_IGNORE_CHAR(c) c < '0' || c > 'z'
|
||||
|
||||
#define SHOULD_IGNORE_CHAR(c) !(SHOULD_KEEP_CHAR(c))
|
||||
#define SHOULD_KEEP_CHAR(c) (c >= (int)'!')
|
||||
|
||||
|
||||
typedef struct dyn_buffer {
|
||||
char *buf;
|
||||
@@ -21,8 +24,10 @@ typedef struct text_buffer {
|
||||
dyn_buffer_t dyn_buffer;
|
||||
} text_buffer_t;
|
||||
|
||||
char *abspath(const char * path);
|
||||
char *abspath(const char *path);
|
||||
|
||||
char *expandpath(const char *path);
|
||||
|
||||
dyn_buffer_t url_escape(char *str);
|
||||
|
||||
void progress_bar_print(double percentage, size_t tn_size, size_t index_size);
|
||||
@@ -56,14 +61,16 @@ text_buffer_t text_buffer_create(int max_size);
|
||||
|
||||
void text_buffer_terminate_string(text_buffer_t *buf);
|
||||
|
||||
int text_buffer_append_string(text_buffer_t *buf, char * str);
|
||||
int text_buffer_append_string(text_buffer_t *buf, char *str, size_t len);
|
||||
int text_buffer_append_string0(text_buffer_t *buf, char *str);
|
||||
|
||||
int text_buffer_append_char(text_buffer_t *buf, int c);
|
||||
|
||||
void incremental_put(GHashTable *table, unsigned long inode_no, int mtime);
|
||||
|
||||
int incremental_get(GHashTable *table, unsigned long inode_no);
|
||||
|
||||
int incremental_mark_file_for_copy(GHashTable *table, unsigned long inode_no);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user