mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-21 01:40:21 -05:00
opt: animations logic all use the int type
This commit is contained in:
parent
e5cfd4e4fc
commit
7d019b7032
21 changed files with 835 additions and 820 deletions
|
|
@ -36,8 +36,8 @@ void *ecalloc(size_t nmemb, size_t size) {
|
|||
return p;
|
||||
}
|
||||
|
||||
int fd_set_nonblock(int fd) {
|
||||
int flags = fcntl(fd, F_GETFL);
|
||||
int32_t fd_set_nonblock(int32_t fd) {
|
||||
int32_t flags = fcntl(fd, F_GETFL);
|
||||
if (flags < 0) {
|
||||
perror("fcntl(F_GETFL):");
|
||||
return -1;
|
||||
|
|
@ -50,8 +50,8 @@ int fd_set_nonblock(int fd) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int regex_match(const char *pattern, const char *str) {
|
||||
int errnum;
|
||||
int32_t regex_match(const char *pattern, const char *str) {
|
||||
int32_t errnum;
|
||||
PCRE2_SIZE erroffset;
|
||||
|
||||
if (!pattern || !str) {
|
||||
|
|
@ -70,7 +70,7 @@ int regex_match(const char *pattern, const char *str) {
|
|||
|
||||
pcre2_match_data *match_data =
|
||||
pcre2_match_data_create_from_pattern(re, NULL);
|
||||
int ret =
|
||||
int32_t ret =
|
||||
pcre2_match(re, (PCRE2_SPTR)str, strlen(str), 0, 0, match_data, NULL);
|
||||
|
||||
pcre2_match_data_free(match_data);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
void die(const char *fmt, ...);
|
||||
void *ecalloc(size_t nmemb, size_t size);
|
||||
int fd_set_nonblock(int fd);
|
||||
int regex_match(const char *pattern_mb, const char *str_mb);
|
||||
int32_t fd_set_nonblock(int32_t fd);
|
||||
int32_t regex_match(const char *pattern_mb, const char *str_mb);
|
||||
void wl_list_append(struct wl_list *list, struct wl_list *object);
|
||||
uint32_t get_now_in_ms(void);
|
||||
uint32_t timespec_to_ms(struct timespec *ts);
|
||||
Loading…
Add table
Add a link
Reference in a new issue