* INLINE doesn't work across several objects as of C99; we just survive it the way...
[citadel.git] / citadel / user_ops.c
index 4da586ef837db1e3d8bac13104a25d6c3ac76174..294767c68e5cd1412adf69994912a049b2211e3c 100644 (file)
@@ -38,7 +38,6 @@
 #include "citadel.h"
 #include "server.h"
 #include "database.h"
-#include "user_ops.h"
 #include "sysdep_decls.h"
 #include "support.h"
 #include "room_ops.h"
 
 #include "ctdl_module.h"
 
+////#define CTDL_INLINE_USR INLINE
+#include "user_ops.h"
+
 /* These pipes are used to talk to the chkpwd daemon, which is forked during startup */
 int chkpwd_write_pipe[2];
 int chkpwd_read_pipe[2];
 
 
-INLINE long cutuserkey(char *username) {
-       long len;
-       len = strlen(username);
-       if (len >= USERNAME_SIZE)
-       {
-               CtdlLogPrintf (CTDL_EMERG, "Username to long: %s", username);
-               cit_backtrace ();
-               len = USERNAME_SIZE - 1; 
-               ((char*)username)[USERNAME_SIZE - 1]='\0';
-       }
-       return len;
-}
-
-/*
- * makeuserkey() - convert a username into the format used as a database key
- *              (it's just the username converted into lower case)
- */
-INLINE void makeuserkey(char *key, const char *username, long len) {
-       int i;
-
-       if (len >= USERNAME_SIZE)
-       {
-               CtdlLogPrintf (CTDL_EMERG, "Username to long: %s", username);
-               cit_backtrace ();
-               len = USERNAME_SIZE - 1; 
-       }
-       for (i=0; i<=len; ++i) {
-               key[i] = tolower(username[i]);
-       }
-}
-
 
 /*
  * getuser()  -  retrieve named user into supplied buffer.