#ifndef LIB_MISC_H
#define LIB_MISC_H

extern int select_wait(int fd, int sec);
extern void mesg(int fd, unsigned char *msg);

extern ssize_t open_trunc(const char *filename);
extern ssize_t open_read(const char *filename);
extern ssize_t open_append(const char *filename);
extern size_t open_appendclose(const char *fn, const unsigned char *what);
extern unsigned char *open_readclose(const char *fn, size_t *len, size_t max);
extern off_t get_filesize(int fd);

extern char *get_user_home(void);

extern bool is_digit(unsigned char ch);
extern int my_system(const char *cmd);
extern bool is_devfs(void);

#endif /* LIB_MISC_H */
