summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-09-16 15:25:52 +0000
committerFrederic Culot <calcurse@culot.org>2006-09-16 15:25:52 +0000
commit9b37b9c2985450e663420a0776d374080bf0f00c (patch)
tree2cd41954a198e0d4ed72a6b9f252df42534dcc56
parent6486777715351567afec60931353ba56a39d7d03 (diff)
downloadcalcurse-9b37b9c2985450e663420a0776d374080bf0f00c.zip
mycpy() created
-rwxr-xr-xsrc/utils.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 3589563..166c6c4 100755
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $calcurse: utils.c,v 1.8 2006/09/16 09:09:39 culot Exp $ */
+/* $calcurse: utils.c,v 1.9 2006/09/16 15:25:52 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -641,3 +641,14 @@ long now(void)
current_time = time(NULL);
return current_time;
}
+
+/* Copy a string */
+char *mycpy(const char *src)
+{
+ char *string = malloc(strlen(src) + 1);
+
+ if (string != NULL)
+ return strcpy(string, src);
+ else
+ return NULL;
+}