Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _defines_included
- #define _defines_included
- #endif
- #define LUSER_FILE "usconsole.db"
- #define LPASS_FILE "psconsole.db"
- #define LLOGS_FILE "logconsole.db"
- #define MAX_PASS_SIZE 16
- #define MAX_NAME_SIZE 32
- void sleep(unsigned int mseconds)
- {
- clock_t goal = mseconds + clock();
- while (goal > clock());
- }
- int fexist(const char* filename) {
- FILE* fp;
- fp = fopen(filename, "r");
- if (fp==0) return 0;
- fclose(fp);
- return 1;
- }
- int fexist_(char* filename, int* len) {
- int i;
- char* tmpname;
- tmpname = (char*)calloc(((*len)+1),sizeof(char));
- for (i=0; i<(*len); i++) {
- tmpname[i] = filename[i];
- }
- tmpname[(*len)] = '\0';
- i = fexist(tmpname);
- free(tmpname);
- return i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement