summaryrefslogtreecommitdiff
path: root/src/util/StoreHandledData.c
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-11-24 20:50:59 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-11-24 20:50:59 +0000
commitd475e8040a76eb7776eb5ed8f3f3edc0f417f6c7 (patch)
treee377c6a035918a2ef81c2655946a11b27513e253 /src/util/StoreHandledData.c
parent1de5cce82d9fac333fba971bd5c19547c4d22abe (diff)
Removed tabs from files.
Added @version lines to various header files. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1170 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/StoreHandledData.c')
-rw-r--r--src/util/StoreHandledData.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/util/StoreHandledData.c b/src/util/StoreHandledData.c
index c3894e37..13a8de7c 100644
--- a/src/util/StoreHandledData.c
+++ b/src/util/StoreHandledData.c
@@ -13,7 +13,7 @@
#include "StoreHandledData.h"
-static char *rcsid="$Id$";
+static char *rcsid="$Header$";
/* Purely internal definitions. */
@@ -73,31 +73,31 @@ int Util_NewHandle(cHandledData **storage, const char *name, void *data)
{
if(!(temp = (void *)realloc((*storage)->array, ((*storage)->array_size+1)*sizeof(cHandleStorage))))
{
- /* Failed to allocate memory for new array element. */
-
- return_code = -2;
+ /* Failed to allocate memory for new array element. */
+
+ return_code = -2;
}
else
{
- (*storage)->array = temp;
-
- /* Fill in data in array. */
- (*storage)->array[(*storage)->array_size].in_use = TRUE;
- (*storage)->array[(*storage)->array_size].data = data;
- (*storage)->array[(*storage)->array_size].name = (char *)malloc((strlen(name)+1)*sizeof(char));
-
- if((*storage)->array[(*storage)->array_size].name)
- {
- strcpy((*storage)->array[(*storage)->array_size].name, name);
- }
-
- return_code = (*storage)->array_size;
-
- /* Increase array size counter. */
- (*storage)->array_size++;
-
- /* Record position of first unused array element. */
- (*storage)->first_unused = (*storage)->array_size;
+ (*storage)->array = temp;
+
+ /* Fill in data in array. */
+ (*storage)->array[(*storage)->array_size].in_use = TRUE;
+ (*storage)->array[(*storage)->array_size].data = data;
+ (*storage)->array[(*storage)->array_size].name = (char *)malloc((strlen(name)+1)*sizeof(char));
+
+ if((*storage)->array[(*storage)->array_size].name)
+ {
+ strcpy((*storage)->array[(*storage)->array_size].name, name);
+ }
+
+ return_code = (*storage)->array_size;
+
+ /* Increase array size counter. */
+ (*storage)->array_size++;
+
+ /* Record position of first unused array element. */
+ (*storage)->first_unused = (*storage)->array_size;
}
}
else
@@ -106,23 +106,23 @@ int Util_NewHandle(cHandledData **storage, const char *name, void *data)
if((*storage)->array[(*storage)->first_unused].in_use == TRUE)
{
- /* The pointers have become corrupted in some fashion.
- *
- * Could write a repair function, but probably safer to just
- * produce an error.
- */
- return_code = -2;
+ /* The pointers have become corrupted in some fashion.
+ *
+ * Could write a repair function, but probably safer to just
+ * produce an error.
+ */
+ return_code = -2;
}
else
{
- /* Fill in data in array. */
- (*storage)->array[(*storage)->first_unused].in_use = TRUE;
- (*storage)->array[(*storage)->first_unused].data = data;
+ /* Fill in data in array. */
+ (*storage)->array[(*storage)->first_unused].in_use = TRUE;
+ (*storage)->array[(*storage)->first_unused].data = data;
- return_code = (*storage)->first_unused;
+ return_code = (*storage)->first_unused;
- /* Change pointer to first unused array element. */
- (*storage)->first_unused = FindNextUnused(*storage, (*storage)->first_unused);
+ /* Change pointer to first unused array element. */
+ (*storage)->first_unused = FindNextUnused(*storage, (*storage)->first_unused);
}
}
}