-
Notifications
You must be signed in to change notification settings - Fork 0
/
general.h
64 lines (52 loc) · 1.48 KB
/
general.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
General C Routines Header File
Copyright (c) 1993, 1994 Boyd C. Fletcher
*/
#define GENERAL_H
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#ifndef VMS
#include <pwd.h>
#else
#include <unixlib.h>
#include <unixio.h>
#include <X11VMS/pwd.h>
#include <X11VMS/vmsutil.h>
#endif
#define FALSE 0
#define TRUE 1
#define OK 1
#define NOT_OK 0
#define NOT_FOUND 0
#define FOUND 1
#define YES 1
#define NO 0
#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
#define Unix_Filename_Chars_CONST "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+=|\\~`}]{[';.,<>/?"
/*
#define Unix_Filename_Chars_CONST "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_-+=|\\~`}]{[':;.,<>/?"
Has Colon!!!!
*/
#define SCMPN(a, b) strncmp(a, b, sizeof (a))
#define SCPYN(a, b) (void)strncpy(a, b, sizeof (a))
void UpcaseWord(char *str);
void Remove_CR(char *str);
void Remove_CTRL(char *str);
int Is_All_Spaces(char *str);
void Add_Hrs_Mins(int *New_Hours,
int *New_Minutes,
int Old_Hours,
int Old_Minutes);
void Subtract_Hrs_Mins(int *New_Hours,
int *New_Minutes,
int Old_Hours,
int Old_Minutes);
char *Get_Current_Time();
char *Get_Current_Date();
char *Get_Current_Date_Time(char *Format);
time_t Get_Current_Date_Num();
char *Return_Current_Date(time_t Date_Enc);
char Check_User_Name(char *User_Name);