Mercurial > hg > toybox
comparison lib/pending.h @ 1115:349424387e22 draft
Break out lib/pending.h from lib/lib.h.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 10 Nov 2013 18:20:16 -0600 |
parents | |
children | b2a8f64a564b |
comparison
equal
deleted
inserted
replaced
1114:a32fe765bdc2 | 1115:349424387e22 |
---|---|
1 // pending.h - header for pending.c | |
2 | |
3 // Unfortunately, sizeof() doesn't work in a preprocessor test. TODO. | |
4 | |
5 //#if sizeof(double) <= sizeof(long) | |
6 //typedef double FLOAT; | |
7 //#else | |
8 typedef float FLOAT; | |
9 //#endif | |
10 | |
11 // libc generally has this, but the headers are screwed up | |
12 ssize_t getline(char **lineptr, size_t *n, FILE *stream); | |
13 | |
14 void names_to_pid(char **names, int (*callback)(pid_t pid, char *name)); | |
15 | |
16 // password.c | |
17 #define MAX_SALT_LEN 20 //3 for id, 16 for key, 1 for '\0' | |
18 #define SYS_FIRST_ID 100 | |
19 #define SYS_LAST_ID 999 | |
20 int get_salt(char *salt, char * algo); | |
21 void is_valid_username(const char *name); | |
22 int read_password(char * buff, int buflen, char* mesg); | |
23 int update_password(char *filename, char* username, char* encrypted); | |
24 | |
25 // cut helper functions | |
26 unsigned long get_int_value(const char *numstr, unsigned long lowrange, unsigned long highrange); | |
27 | |
28 // grep helper functions | |
29 char *astrcat (char *, char *); | |
30 char *xastrcat (char *, char *); | |
31 | |
32 void daemonize(void); |