b53211c2a807c2a974d4266f9083b4e25032adbf
[openafs.git] / src / opr / opr.h
1 #ifndef OPENAFS_OPR_OPR_H
2 #define OPENAFS_OPR_OPR_H 1
3
4 /* assert.c */
5 #ifdef AFS_NT40_ENV
6 # define opr_abort() opr_NTAbort()
7 extern void opr_NTAbort(void);
8 #else
9 # define opr_abort() abort()
10 #endif
11
12 extern void opr_AssertionFailed(char *, int);
13 extern void opr_AssertFailU(const char *, const char *, int);
14
15 #define opr_Assert(ex) \
16     do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
17
18 /* casestrcpy.c */
19 #define lcstring opr_lcstring
20 #define ucstring opr_ucstring
21 #define stolower opr_stolower
22 #define stoupper opr_stoupper
23 #define strcompose opr_strcompose
24
25 extern char *opr_lcstring(char *d, char *s, int n);
26 extern char *opr_ucstring(char *d, char *s, int n);
27 extern void opr_stolower(char *s);
28 extern void opr_stoupper(char *s);
29 extern char *opr_strcompose(char *buf, size_t len, ...);
30
31 #endif