#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
Go to the source code of this file.
|
| #define | UNUSED(x) ((x) = (x)) |
| |
| #define | assert(expr) ((void) ((expr) || (__assert2 (#expr, __func__, __FILE__, __LINE__), 0))) |
| |
|
| typedef bool(* | line_func) (const char *data, size_t datalen, void *pw) |
| |
◆ assert
| #define assert |
( |
|
expr | ) |
((void) ((expr) || (__assert2 (#expr, __func__, __FILE__, __LINE__), 0))) |
◆ UNUSED
| #define UNUSED |
( |
|
x | ) |
((x) = (x)) |
◆ line_func
| typedef bool(* line_func) (const char *data, size_t datalen, void *pw) |
◆ __assert2()
| void __assert2 |
( |
const char * |
expr, |
|
|
const char * |
function, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
◆ css__parse_filesize()
| size_t css__parse_filesize |
( |
const char * |
filename | ) |
|
Read the size of a file
- Parameters
-
| filename | Name of file to read size of |
- Returns
- File size (in bytes), or 0 on error
◆ css__parse_strnchr()
| char * css__parse_strnchr |
( |
const char * |
str, |
|
|
size_t |
len, |
|
|
int |
chr |
|
) |
| |
Length-limited strchr
- Parameters
-
| str | String to search in |
| len | Length of string |
| chr | Character to search for |
- Returns
- Pointer to character in string, or NULL if not found
◆ css__parse_testfile()
| bool css__parse_testfile |
( |
const char * |
filename, |
|
|
line_func |
callback, |
|
|
void * |
pw |
|
) |
| |
Testcase datafile parser driver
- Parameters
-
| filename | Name of file to parse |
| callback | Pointer to function to handle each line of input data |
| pw | Pointer to client-specific private data |
- Returns
- true on success, false otherwise.
◆ css_error_from_string()
| css_error css_error_from_string |
( |
const char * |
str, |
|
|
size_t |
len |
|
) |
| |
Convert a string representation of an error name to a LibCSS error code
- Parameters
-
| str | String containing error name |
| len | Length of string (bytes) |
- Returns
- LibCSS error code, or CSS_OK if unknown