Initial import of libdpf.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
e4e666f459
4563 changed files with 1690372 additions and 0 deletions
27
thirdparty/hedley/test/stringify.c
vendored
Normal file
27
thirdparty/hedley/test/stringify.c
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "../hedley.h"
|
||||
|
||||
#define PREFIX foo_
|
||||
#define BAR bar
|
||||
|
||||
static int
|
||||
my_strcmp(const char* s1, const char* s2) {
|
||||
while (1) {
|
||||
if (*s1 < *s2)
|
||||
return -1;
|
||||
else if (*s1 > *s2)
|
||||
return 1;
|
||||
else if (*s1 == '\0')
|
||||
return 0;
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
}
|
||||
|
||||
static const char*
|
||||
foo_bar(void) {
|
||||
return HEDLEY_STRINGIFY(BAR);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
return my_strcmp("bar", HEDLEY_CONCAT(PREFIX, BAR)());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue