aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-11-10 18:20:16 -0600
committerRob Landley <rob@landley.net>2013-11-10 18:20:16 -0600
commit34b91a97ee6124765c0ee3a01771833ee6f8989a (patch)
tree870a5ad0b2287e95ab93695ed9a7b07302ec6592 /lib
parentcc1d6e3f4141fac6b6cb1d0a1e03b458f1372ac3 (diff)
downloadtoybox-34b91a97ee6124765c0ee3a01771833ee6f8989a.tar.gz
Break out lib/pending.h from lib/lib.h.
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.h30
-rw-r--r--lib/pending.h32
2 files changed, 33 insertions, 29 deletions
diff --git a/lib/lib.h b/lib/lib.h
index 94884156..a0a1c316 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -3,17 +3,6 @@
* Copyright 2006 Rob Landley <rob@landley.net>
*/
-// Unfortunately, sizeof() doesn't work in a preprocessor test. TODO.
-
-//#if sizeof(double) <= sizeof(long)
-//typedef double FLOAT;
-//#else
-typedef float FLOAT;
-//#endif
-
-// libc generally has this, but the headers are screwed up
-ssize_t getline(char **lineptr, size_t *n, FILE *stream);
-
// llist.c
// All these list types can be handled by the same code because first element
@@ -158,7 +147,6 @@ void replace_tempfile(int fdin, int fdout, char **tempname);
void crc_init(unsigned int *crc_table, int little_endian);
int terminal_size(unsigned *x, unsigned *y);
int yesno(char *prompt, int def);
-void names_to_pid(char **names, int (*callback)(pid_t pid, char *name));
// net.c
int xsocket(int domain, int type, int protocol);
@@ -186,20 +174,4 @@ char *num_to_sig(int sig);
mode_t string_to_mode(char *mode_str, mode_t base);
void mode_to_string(mode_t mode, char *buf);
-// password helper functions
-#define MAX_SALT_LEN 20 //3 for id, 16 for key, 1 for '\0'
-#define SYS_FIRST_ID 100
-#define SYS_LAST_ID 999
-int get_salt(char *salt, char * algo);
-void is_valid_username(const char *name);
-int read_password(char * buff, int buflen, char* mesg);
-int update_password(char *filename, char* username, char* encrypted);
-
-// cut helper functions
-unsigned long get_int_value(const char *numstr, unsigned long lowrange, unsigned long highrange);
-
-// grep helper functions
-char *astrcat (char *, char *);
-char *xastrcat (char *, char *);
-
-void daemonize(void);
+#include "lib/pending.h"
diff --git a/lib/pending.h b/lib/pending.h
new file mode 100644
index 00000000..335ca522
--- /dev/null
+++ b/lib/pending.h
@@ -0,0 +1,32 @@
+// pending.h - header for pending.c
+
+// Unfortunately, sizeof() doesn't work in a preprocessor test. TODO.
+
+//#if sizeof(double) <= sizeof(long)
+//typedef double FLOAT;
+//#else
+typedef float FLOAT;
+//#endif
+
+// libc generally has this, but the headers are screwed up
+ssize_t getline(char **lineptr, size_t *n, FILE *stream);
+
+void names_to_pid(char **names, int (*callback)(pid_t pid, char *name));
+
+// password.c
+#define MAX_SALT_LEN 20 //3 for id, 16 for key, 1 for '\0'
+#define SYS_FIRST_ID 100
+#define SYS_LAST_ID 999
+int get_salt(char *salt, char * algo);
+void is_valid_username(const char *name);
+int read_password(char * buff, int buflen, char* mesg);
+int update_password(char *filename, char* username, char* encrypted);
+
+// cut helper functions
+unsigned long get_int_value(const char *numstr, unsigned long lowrange, unsigned long highrange);
+
+// grep helper functions
+char *astrcat (char *, char *);
+char *xastrcat (char *, char *);
+
+void daemonize(void);