summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 9a836038d..48fd020ef 100644
--- a/dive.c
+++ b/dive.c
@@ -2,6 +2,7 @@
/* maintains the internal dive list structure */
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
#include <limits.h>
#include "gettext.h"
#include "dive.h"
@@ -2188,3 +2189,17 @@ timestamp_t get_times()
}
return dive->when;
}
+
+#define MAX_USERID_SIZE 32
+void set_save_userid_local(short value)
+{
+ prefs.save_userid_local = value;
+}
+
+void set_userid(char *rUserId)
+{
+ prefs.userid = (char *) malloc(MAX_USERID_SIZE);
+ if (prefs.userid && rUserId)
+ strcpy(prefs.userid, rUserId);
+}
+#undef MAX_USERID_SIZE \ No newline at end of file