php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
parse_iso_intervals.c File Reference
#include "timelib.h"
#include "timelib_private.h"
#include <ctype.h>

Go to the source code of this file.

Data Structures

struct  _Scanner
 

Macros

#define strtoll(s, f, b)
 
#define EOI   257
 
#define TIMELIB_PERIOD   260
 
#define TIMELIB_ISO_DATE   261
 
#define TIMELIB_ERROR   999
 
#define BSIZE   8192
 
#define YYCTYPE   uchar
 
#define YYCURSOR   cursor
 
#define YYLIMIT   s->lim
 
#define YYMARKER   s->ptr
 
#define YYFILL(n)
 
#define RET(i)
 
#define timelib_string_free   timelib_free
 
#define TIMELIB_INIT   s->cur = cursor; str = timelib_string(s); ptr = str
 
#define TIMELIB_DEINIT   timelib_string_free(str)
 
#define DEBUG_OUTPUT(s)
 
#define YYDEBUG(s, c)
 
#define timelib_split_free(arg)
 
#define YYMAXFILL   20
 

Typedefs

typedef struct _Scanner Scanner
 

Functions

void timelib_strtointerval (const char *s, size_t len, timelib_time **begin, timelib_time **end, timelib_rel_time **period, int *recurrences, timelib_error_container **errors)
 

Macro Definition Documentation

◆ BSIZE

#define BSIZE   8192

Definition at line 50 of file parse_iso_intervals.c.

◆ DEBUG_OUTPUT

#define DEBUG_OUTPUT ( s)

Definition at line 69 of file parse_iso_intervals.c.

◆ EOI

#define EOI   257

Definition at line 42 of file parse_iso_intervals.c.

◆ RET

#define RET ( i)
Value:
{s->cur = cursor; return i;}
char s[4]
Definition cdf.c:77

Definition at line 58 of file parse_iso_intervals.c.

◆ strtoll

#define strtoll ( s,
f,
b )
Value:
strtol(s, f, b)

Definition at line 38 of file parse_iso_intervals.c.

◆ TIMELIB_DEINIT

#define TIMELIB_DEINIT   timelib_string_free(str)

Definition at line 63 of file parse_iso_intervals.c.

◆ TIMELIB_ERROR

#define TIMELIB_ERROR   999

Definition at line 46 of file parse_iso_intervals.c.

◆ TIMELIB_INIT

#define TIMELIB_INIT   s->cur = cursor; str = timelib_string(s); ptr = str

Definition at line 62 of file parse_iso_intervals.c.

◆ TIMELIB_ISO_DATE

#define TIMELIB_ISO_DATE   261

Definition at line 45 of file parse_iso_intervals.c.

◆ TIMELIB_PERIOD

#define TIMELIB_PERIOD   260

Definition at line 44 of file parse_iso_intervals.c.

◆ timelib_split_free

#define timelib_split_free ( arg)
Value:
{ \
int i; \
for (i = 0; i < arg.c; i++) { \
timelib_free(arg.v[i]); \
} \
if (arg.v) { \
timelib_free(arg.v); \
} \
}
zval * arg
Definition ffi.c:3975

Definition at line 155 of file parse_iso_intervals.c.

◆ timelib_string_free

#define timelib_string_free   timelib_free

Definition at line 60 of file parse_iso_intervals.c.

◆ YYCTYPE

#define YYCTYPE   uchar

Definition at line 52 of file parse_iso_intervals.c.

◆ YYCURSOR

#define YYCURSOR   cursor

Definition at line 53 of file parse_iso_intervals.c.

◆ YYDEBUG

#define YYDEBUG ( s,
c )

Definition at line 70 of file parse_iso_intervals.c.

◆ YYFILL

#define YYFILL ( n)
Value:
return EOI;
#define EOI
Definition parse_date.c:47

Definition at line 56 of file parse_iso_intervals.c.

◆ YYLIMIT

#define YYLIMIT   s->lim

Definition at line 54 of file parse_iso_intervals.c.

◆ YYMARKER

#define YYMARKER   s->ptr

Definition at line 55 of file parse_iso_intervals.c.

◆ YYMAXFILL

#define YYMAXFILL   20

Definition at line 968 of file parse_iso_intervals.c.

Typedef Documentation

◆ Scanner

typedef struct _Scanner Scanner

Function Documentation

◆ timelib_strtointerval()

void timelib_strtointerval ( const char * s,
size_t len,
timelib_time ** begin,
timelib_time ** end,
timelib_rel_time ** period,
int * recurrences,
timelib_error_container ** errors )

Parses a subset of an ISO 8601 intervals specification string into its constituent parts.

If the **errors points to a timelib_error_container variable, warnings and errors will be recorded. You are responsible for freeing the stored information with timelib_error_container_dtor(). To see whether errors have occurred, inspect errors->errors_count. To see whether warnings have occurred, inspect errors->warnings_count.

Definition at line 971 of file parse_iso_intervals.c.