More sh updates (with related changes to everything else). Switched
to using getopt and cleaned up the resulting mess. if-then-else-fi
is now basically working (given a bunch of constraints).
-Erik
diff --git a/utility.c b/utility.c
index 50f497f..565fd73 100644
--- a/utility.c
+++ b/utility.c
@@ -1465,13 +1465,21 @@
return ptr;
}
-void *xrealloc(void *old, size_t size)
+extern void *xrealloc(void *old, size_t size)
{
void *ptr = realloc(old, size);
if (!ptr)
fatalError(memory_exhausted);
return ptr;
}
+
+extern void *xcalloc(size_t nmemb, size_t size)
+{
+ void *ptr = calloc(nmemb, size);
+ if (!ptr)
+ fatalError(memory_exhausted);
+ return ptr;
+}
#endif
#if defined BB_FEATURE_NFSMOUNT