- Translate comments in src/client/client.h
- Translate comments in src/config/parse_config.h
- Translate comments in src/data/static_keymap.h
- Translate comments in src/dispatch/bind_define.h
- Translate comments in src/ext-protocol/*.h
- Translate comments in src/fetch/*.h
- Translate comments in src/layout/*.h
- Translate comments in src/mango.c
All Chinese comments have been accurately translated to English
while preserving the technical meaning and context.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use int32_t consistently in all loops
- Add zero-length check before memcpy
- Improve error detection in strtol (comment clarification)
- Ensure null terminator always has space reserved
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
- Use memcpy with pointer arithmetic for safe string concatenation
- Track and free allocated strings in spawn error path
- Properly account for null terminator in all buffer operations
- Eliminate potential buffer overflows from strncat edge cases
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
- Use direct character assignment for constant strings
- Remove unnecessary tracking array and cleanup code
- Simplify string concatenation logic
- Fix length calculation to match actual strncat behavior
- Code is cleaner and more maintainable
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
- Add LAYOUT_ABBR_SIZE constant to avoid magic numbers
- Track allocated argv entries to properly free on error
- Simplify strncat bounds checking using strlen for accuracy
- Ensure all allocated memory is freed in error paths
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>
- Fix buffer size for strncpy to match actual buffer (32 bytes)
- Use strtoul instead of strtol for unsigned color values
- Improve strncat bounds checking with accurate length tracking
- Free wordexp results immediately after use instead of batching
- Add strdup for wordexp strings to avoid use-after-free
Co-authored-by: squassina <8495707+squassina@users.noreply.github.com>