opt: change unsigned int to uint32_t
This commit is contained in:
@@ -70,7 +70,7 @@ setclient_coordinate_center(Client *c, struct wlr_box geom, int offsetx,
|
||||
int len = 0;
|
||||
Monitor *m = c->mon ? c->mon : selmon;
|
||||
|
||||
unsigned int cbw = check_hit_no_border(c) ? c->bw : 0;
|
||||
uint32_t cbw = check_hit_no_border(c) ? c->bw : 0;
|
||||
|
||||
if (!c->no_force_center) {
|
||||
tempbox.x = m->w.x + (m->w.width - geom.width) / 2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
pid_t getparentprocess(pid_t p) {
|
||||
unsigned int v = 0;
|
||||
uint32_t v = 0;
|
||||
|
||||
FILE *f;
|
||||
char buf[256];
|
||||
@@ -26,7 +26,7 @@ int isdescprocess(pid_t p, pid_t c) {
|
||||
return (int)c;
|
||||
}
|
||||
|
||||
char *get_autostart_path(char *autostart_path, unsigned int buf_size) {
|
||||
char *get_autostart_path(char *autostart_path, uint32_t buf_size) {
|
||||
const char *mangoconfig = getenv("MANGOCONFIG");
|
||||
|
||||
if (mangoconfig && mangoconfig[0] != '\0') {
|
||||
@@ -60,10 +60,10 @@ void get_layout_abbr(char *abbr, const char *full_name) {
|
||||
const char *open = strrchr(full_name, '(');
|
||||
const char *close = strrchr(full_name, ')');
|
||||
if (open && close && close > open) {
|
||||
unsigned int len = close - open - 1;
|
||||
uint32_t len = close - open - 1;
|
||||
if (len > 0 && len <= 4) {
|
||||
// 提取并转换为小写
|
||||
for (unsigned int j = 0; j < len; j++) {
|
||||
for (uint32_t j = 0; j < len; j++) {
|
||||
abbr[j] = tolower(open[j + 1]);
|
||||
}
|
||||
abbr[len] = '\0';
|
||||
@@ -72,8 +72,8 @@ void get_layout_abbr(char *abbr, const char *full_name) {
|
||||
}
|
||||
|
||||
// 3. 提取前2-3个字母并转换为小写
|
||||
unsigned int j = 0;
|
||||
for (unsigned int i = 0; full_name[i] != '\0' && j < 3; i++) {
|
||||
uint32_t j = 0;
|
||||
for (uint32_t i = 0; full_name[i] != '\0' && j < 3; i++) {
|
||||
if (isalpha(full_name[i])) {
|
||||
abbr[j++] = tolower(full_name[i]);
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ bool is_scroller_layout(Monitor *m) {
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int get_tag_status(unsigned int tag, Monitor *m) {
|
||||
uint32_t get_tag_status(uint32_t tag, Monitor *m) {
|
||||
Client *c = NULL;
|
||||
unsigned int status = 0;
|
||||
uint32_t status = 0;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->mon == m && c->tags & 1 << (tag - 1) & TAGMASK) {
|
||||
if (c->isurgent) {
|
||||
@@ -41,8 +41,8 @@ unsigned int get_tag_status(unsigned int tag, Monitor *m) {
|
||||
return status;
|
||||
}
|
||||
|
||||
unsigned int get_tags_first_tag_num(unsigned int source_tags) {
|
||||
unsigned int i, tag;
|
||||
uint32_t get_tags_first_tag_num(uint32_t source_tags) {
|
||||
uint32_t i, tag;
|
||||
tag = 0;
|
||||
|
||||
if (!source_tags) {
|
||||
@@ -63,8 +63,8 @@ unsigned int get_tags_first_tag_num(unsigned int source_tags) {
|
||||
}
|
||||
|
||||
// 获取tags中最前面的tag的tagmask
|
||||
unsigned int get_tags_first_tag(unsigned int source_tags) {
|
||||
unsigned int i, tag;
|
||||
uint32_t get_tags_first_tag(uint32_t source_tags) {
|
||||
uint32_t i, tag;
|
||||
tag = 0;
|
||||
|
||||
if (!source_tags) {
|
||||
|
||||
Reference in New Issue
Block a user