Skip to content

Commit df949d4

Browse files
committed
Remove custom include/new header
Delete the project-local `include/new` declarations for global `new`/`delete`, and update `include/ctype.h` with the 2026 copyright year plus whitespace/style normalization in inline character helper functions.
1 parent 0a16a3f commit df949d4

2 files changed

Lines changed: 10 additions & 49 deletions

File tree

include/ctype.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @file ctype.h
33
*
44
*/
5-
/* Copyright (C) 2017-2023 by Arjan van Vught mailto:info@gd32-dmx.org
5+
/* Copyright (C) 2017-2026 by Arjan van Vught mailto:info@gd32-dmx.org
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -31,39 +31,39 @@ extern "C" {
3131
#endif
3232

3333
inline int isdigit(int c) {
34-
return (c >= (int) '0' && c <= (int) '9') ? 1 : 0;
34+
return (c >= (int)'0' && c <= (int)'9') ? 1 : 0;
3535
}
3636

3737
inline int isxdigit(int c) {
38-
return ((isdigit(c) != 0) || (((unsigned) c | 32) - (int) 'a' < 6)) ? 1 : 0;
38+
return ((isdigit(c) != 0) || (((unsigned)c | 32) - (int)'a' < 6)) ? 1 : 0;
3939
}
4040

4141
inline int isprint(int c) {
42-
return ((c >= (int) ' ' && c <= (int) '~')) ? 1 : 0;
42+
return ((c >= (int)' ' && c <= (int)'~')) ? 1 : 0;
4343
}
4444

4545
inline int isupper(int c) {
46-
return (c >= (int) 'A' && c <= (int) 'Z') ? 1 : 0;
46+
return (c >= (int)'A' && c <= (int)'Z') ? 1 : 0;
4747
}
4848

4949
inline int islower(int c) {
50-
return (c >= (int) 'a' && c <= (int) 'z') ? 1 : 0;
50+
return (c >= (int)'a' && c <= (int)'z') ? 1 : 0;
5151
}
5252

5353
inline int isalpha(int c) {
54-
return ((isupper(c) != 0) || (islower(c) != 0)) ? 1 : 0;
54+
return ((isupper(c) != 0) || (islower(c) != 0)) ? 1 : 0;
5555
}
5656

5757
inline int tolower(int c) {
58-
return ((isupper(c) != 0) ? (c + 32) : c);
58+
return ((isupper(c) != 0) ? (c + 32) : c);
5959
}
6060

6161
inline int toupper(int c) {
62-
return ((islower(c) != 0) ? (c - 32) : c);
62+
return ((islower(c) != 0) ? (c - 32) : c);
6363
}
6464

6565
inline int isspace(int c) {
66-
return (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' || c == ' ' ? 1 : 0);
66+
return (c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r' || c == ' ' ? 1 : 0);
6767
}
6868

6969
#ifdef __cplusplus

include/new

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)