annotate lib/pending.h @ 1243:eae29e8e2bc8 draft

_mkflags_ had an issue for generating FLAG_xxxx macros for long options. Only the first __long__ option, without any __short__ option had a proper flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved to the next in this case.
author Ashwini Sharma <ak.ashwini1981@gmail.com>
date Wed, 09 Apr 2014 07:40:02 -0500
parents 80c9df5145fe
children 6f18a0845db3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1115
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 // pending.h - header for pending.c
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 // Unfortunately, sizeof() doesn't work in a preprocessor test. TODO.
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 //#if sizeof(double) <= sizeof(long)
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 //typedef double FLOAT;
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 //#else
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 typedef float FLOAT;
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 //#endif
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
10
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 // password.c
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
12 #define MAX_SALT_LEN 20 //3 for id, 16 for key, 1 for '\0'
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 #define SYS_FIRST_ID 100
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 #define SYS_LAST_ID 999
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 int get_salt(char *salt, char * algo);
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 void is_valid_username(const char *name);
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 int read_password(char * buff, int buflen, char* mesg);
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 int update_password(char *filename, char* username, char* encrypted);
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
19
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 // cut helper functions
349424387e22 Break out lib/pending.h from lib/lib.h.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 void daemonize(void);
1116
b2a8f64a564b du from Ashwini Sharma.
Rob Landley <rob@landley.net>
parents: 1115
diff changeset
22 char *human_readable(unsigned long long size);