maint: use minmax.h instead of rolling our own

* gl/lib/mbsalign.c, gl/lib/randread.c, src/system.h (MAX, MIN):
Remove; include minmax.h instead.
* gl/modules/mbsalign, gl/modules/randread (Depends-on): Add minmax.
* src/factor.c (MIN): Remove.
This commit is contained in:
Paul Eggert committed 2021-10-31 22:36:46 -07:00
1 parent 9f8a38414b
commit ea02406748
6 files changed
+6 -17

No files matched your search

+2 -4
View File
@@ -19,6 +19,8 @@
#include <config.h>
#include "mbsalign.h"
#include "minmax.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -28,10 +30,6 @@
#include <wchar.h>
#include <wctype.h>
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
/* Replace non printable chars.
Note \t and \n etc. are non printable.
Return 1 if replacement made, 0 otherwise. */
+1 -4
View File
@@ -40,15 +40,12 @@
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "minmax.h"
#include "rand-isaac.h"
#include "stdio-safer.h"
#include "unlocked-io.h"
#include "xalloc.h"
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#if _STRING_ARCH_unaligned || _STRING_INLINE_unaligned
# define ALIGNED_POINTER(ptr, type) true
#else
+1
View File
@@ -6,6 +6,7 @@ lib/mbsalign.c
lib/mbsalign.h
Depends-on:
minmax
wchar
wctype
wcwidth
+1
View File
@@ -14,6 +14,7 @@ inline
fopen-safer
getrandom
quote
minmax
stdalign
stdbool
stdint
-1
View File
@@ -1950,7 +1950,6 @@ static const unsigned short invtab[0x81] =
# define Q_FREQ_SIZE 50
/* Element 0 keeps the total */
static unsigned int q_freq[Q_FREQ_SIZE + 1];
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#if USE_SQUFOF
+1 -8
View File
@@ -380,14 +380,7 @@ enum
exit (EXIT_SUCCESS); \
break;
#ifndef MAX
# define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#include "minmax.h"
#include "intprops.h"
#ifndef SSIZE_MAX