
- Renamed all folders from format NEx (e.g., 1Ex, 2Ex...) to 0NEx (01Ex, 02Ex, etc.) - Updated subdirectories and files accordingly - Removed old main Makefile and tasks (a01.c–a09.c, solve.c, io_status.h), likely obsolete - Cleaned up deprecated task binaries and configs
23 lines
442 B
C
23 lines
442 B
C
#include "sort.h"
|
|
|
|
int up_strcmp(const char *a, const char *b)
|
|
{ return strcmp(a, b); }
|
|
|
|
int down_strcmp(const char *a, const char *b)
|
|
{ return -strcmp(a, b); }
|
|
|
|
int up_len(const char *a, const char *b)
|
|
{
|
|
int i = 0;
|
|
while (1)
|
|
{
|
|
if (a[i] == '\0' && b[i] == '\0') return strcmp(a, b);
|
|
else if (a[i] == '\0') return -1;
|
|
else if (b[i] == '\0') return 1;
|
|
|
|
i++;
|
|
}
|
|
}
|
|
int down_len(const char *a, const char *b)
|
|
{ return -up_len(a, b); }
|
|
|