[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] nmh/sbr utils.c
From: |
Josh Bressers |
Subject: |
[Nmh-commits] nmh/sbr utils.c |
Date: |
Wed, 04 Jan 2006 02:10:25 +0000 |
CVSROOT: /sources/nmh
Module name: nmh
Branch:
Changes by: Josh Bressers <address@hidden> 06/01/04 02:10:25
Modified files:
sbr : utils.c
Log message:
* mh_xmalloc(), mh_xrealloc(), pwd(): Add comments describing the
purpose
of the function.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/sbr/utils.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: nmh/sbr/utils.c
diff -u nmh/sbr/utils.c:1.3 nmh/sbr/utils.c:1.4
--- nmh/sbr/utils.c:1.3 Tue Jan 3 01:08:33 2006
+++ nmh/sbr/utils.c Wed Jan 4 02:10:25 2006
@@ -2,7 +2,7 @@
/*
* utils.c -- various utility routines
*
- * $Id: utils.c,v 1.3 2006/01/03 01:08:33 bress Exp $
+ * $Id: utils.c,v 1.4 2006/01/04 02:10:25 bress Exp $
*
* This code is Copyright (c) 2006, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
@@ -13,6 +13,9 @@
#include <h/utils.h>
#include <stdlib.h>
+/*
+ * Safely call malloc
+ */
void *
mh_xmalloc(size_t size)
{
@@ -28,6 +31,9 @@
return memory;
}
+/*
+ * Safely call realloc
+ */
void *
mh_xrealloc(void *ptr, size_t size)
{
@@ -42,6 +48,11 @@
return memory;
}
+
+/*
+ * Return the present working directory, if the current directory does not
+ * exist, or is too long, make / the pwd.
+ */
char *
pwd(void)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] nmh/sbr utils.c,
Josh Bressers <=