struct time_parts { int hours; int minutes; int seconds; int mili; gboolean negative; }; #define LOG_SOUND 1 #define LOG_MEM 2 #define LOG_OTHER 3 //#define LOG_WAVEFORM 4 #define __STR2__(x) #x #define __STR1__(x) __STR2__(x) #define __LOC__ __FILE__ "("__STR1__(__LINE__)") : warning C9999 : " void sabbu_log_real(int type, char *file, int line, char *text); #define sabbu_log(type, text) sabbu_log_real(type, __FILE__, __LINE__, text) void sabbu_log_endl(); void sabbu_log_close(); char *sabbu_get_config_dir(); char *sabbu_get_config_file(); char *sabbu_iconv_get_charset(int code); gboolean sabbu_iconv_get_mapping(kryScript *script, kryEventDetailed *event, kryHash *hash, struct style_iconv_map **map_param, gboolean); void sabbu_style_iconv_map_free(struct style_iconv_map *map); int sabbu_clamp_value_real(int val, int min, int max, char *file, int line); #define sabbu_clamp_value(val, min, max) sabbu_clamp_value_real(val, min, max, __FILE__, __LINE__) int time_mili_to_frames(int time, double fps); char *time_mili_to_string(long time, gboolean is_srt_format = FALSE, gboolean is_srt_write = FALSE); char *time_mili_to_string_compact(long time); void time_mili_to_parts(long time, struct time_parts *time_out); long time_string_to_mili(const char *time_str, int err_val, gboolean is_srt_format = FALSE, gboolean is_srt_separator = TRUE); void fwrite_custom(char *buffer, int len, int count, FILE *fh, gboolean utf16); char *string_replace(char *str, char *target, char *replacement); int integer_calculate_width(int num); char *kry_path_replace_ext(char *path, char *new_ext); char *sgettext (const char *msgid); char *sgettext_strip(const char *msgid); FILE *fopen_win32(char *filename, char *flag); int stat_win32(char *filename, struct _stat *stat); int mkdir_win32(char *dir); int chdir_win32(char *dir); int open_win32(char *file, int flag); void kry_recent_list_add(GList **list, char *string); void kry_recent_list_save(GList *list, char *key); GList *kry_recent_list_load(char *key); #ifdef _WINDOWS #define kry_sleep(mili) _sleep(mili) #else #define kry_sleep(mili) usleep(mili * 1000) #endif