Skip to contentSkip to conversation

minmax functions (taken from GRUB2 source code)

PATCH In review Vladimir Testov 2 participants 2 messages Apr 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 9/11 minmax functions (taken from GRUB2 source code)

functions currently included in grub2 source code. (grub_min, grub_max)

patch only for compatibility so someone could make grub2 binaries from grub-2.00.tar.gz

Signature · 4 lines
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
include/grub/misc.h +3 -0
diff -Naur grub-2.00/include/grub/misc.h grub-minmax/include/grub/misc.h
@@ -52,6 +52,9 @@
 
 #define grub_dprintf(condition, fmt, args...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, fmt, ## args)
 
+#define grub_max(a, b) (((a) > (b)) ? (a) : (b))
+#define grub_min(a, b) (((a) < (b)) ? (a) : (b))
+
 void *EXPORT_FUNC(grub_memmove) (void *dest, const void *src, grub_size_t n);
 char *EXPORT_FUNC(grub_strcpy) (char *dest, const char *src);
 char *EXPORT_FUNC(grub_strncpy) (char *dest, const char *src, int c);
#1 lore raw

В Thu, 11 Apr 2013 15:38:10 +0400
Vladimir Testov <[email protected]> пишет:

Quoted 6 lines

functions currently included in grub2 source code. (grub_min, grub_max)

patch only for compatibility so someone could make grub2 binaries from grub-2.00.tar.gz

Already in trunk.