Subversion Repositories Tewi

Rev

Rev 312 | Rev 341 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 312 Rev 315
Line 35... Line 35...
35
//#include <sys/cdefs.h>
35
//#include <sys/cdefs.h>
36
//__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $");
36
//__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $");
37
 
37
 
38
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
38
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
39
 
39
 
-
 
40
#include <stdlib.h>
40
#include <ctype.h>
41
#include <ctype.h>
41
#include <string.h>
42
#include <string.h>
42
#include <time.h>
43
#include <time.h>
43
#include <stdint.h>
44
#include <stdint.h>
44
 
45
 
45
#ifdef __WATCOMC__
46
#ifdef __WATCOMC__
-
 
47
#ifndef __NETWARE__
46
#include <strings.h>
48
#include <strings.h>
47
#endif
49
#endif
-
 
50
#endif
48
 
51
 
49
static const unsigned char *conv_num(const unsigned char *, int *, unsigned int, unsigned int);
52
static const unsigned char *conv_num(const unsigned char *, int *, unsigned int, unsigned int);
50
static const unsigned char *find_string(const unsigned char *, int *, const char * const *, const char * const *, int);
53
static const unsigned char *find_string(const unsigned char *, int *, const char * const *, const char * const *, int);
51
 
54
 
52
/*
55
/*
Line 114... Line 117...
114
 
117
 
115
#ifdef __WATCOMC__
118
#ifdef __WATCOMC__
116
#define _tzset tzset
119
#define _tzset tzset
117
#endif
120
#endif
118
 
121
 
119
#ifdef __BORLANDC__
122
#if defined(__BORLANDC__) || defined(__NETWARE__)
120
char* cm_strdup(const char* str);
123
char* cm_strdup(const char* str);
121
 
124
 
-
 
125
#ifdef __NETWARE__
-
 
126
#define strncasecmp _strnicmp
-
 
127
#endif
-
 
128
 
122
int _strnicmp(const char* _a, const char* _b, int len){
129
int _strnicmp(const char* _a, const char* _b, int len){
123
	char* a = cm_strdup(_a);
130
	char* a = cm_strdup(_a);
124
	char* b = cm_strdup(_b);
131
	char* b = cm_strdup(_b);
125
	int i;
132
	int i;
126
	char* r;
133
	int r;
127
	for(i = 0; a[i] != 0; i++){
134
	for(i = 0; a[i] != 0; i++){
128
		a[i] = tolower(a[i]);
135
		a[i] = tolower(a[i]);
129
	}
136
	}
130
	for(i = 0; b[i] != 0; i++){
137
	for(i = 0; b[i] != 0; i++){
131
		b[i] = tolower(b[i]);
138
		b[i] = tolower(b[i]);
Line 426... Line 433...
426
            bp = conv_num(bp, &tm->tm_sec, 0, 61);
433
            bp = conv_num(bp, &tm->tm_sec, 0, 61);
427
            LEGAL_ALT(ALT_O);
434
            LEGAL_ALT(ALT_O);
428
            continue;
435
            continue;
429
 
436
 
430
#ifndef TIME_MAX
437
#ifndef TIME_MAX
431
#if defined(_MSC_VER) || defined(__BORLANDC__)
438
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__NETWARE__)
432
#define TIME_MAX	INT32_MAX
439
#define TIME_MAX	INT32_MAX
433
#else
440
#else
434
#define TIME_MAX	INT64_MAX
441
#define TIME_MAX	INT64_MAX
435
#endif
442
#endif
436
#endif
443
#endif