read isn't written yet, but I think all the building blocks I need for it are.
Compiles and runs; does nothing yet.
This commit is contained in:
parent
364d7d2c7b
commit
1196b3eb1d
21 changed files with 84 additions and 3347 deletions
38
src/c/payloads/psse_string.h
Normal file
38
src/c/payloads/psse_string.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* payloads/string.h
|
||||
*
|
||||
* A string cell.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#ifndef __psse_payloads_string_h
|
||||
#define __psse_payloads_string_h
|
||||
/*
|
||||
* wide characters
|
||||
*/
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include "memory/pointer.h"
|
||||
|
||||
/**
|
||||
* @brief payload of a string cell.
|
||||
*
|
||||
* At least at first, only one UTF character will be stored in each cell. At
|
||||
* present the payload of a symbol or keyword cell is identical
|
||||
* to the payload of a string cell.
|
||||
*/
|
||||
struct string_payload {
|
||||
/** the actual character stored in this cell */
|
||||
wint_t character;
|
||||
/** a hash of the string value, computed at store time. */
|
||||
uint32_t hash;
|
||||
/** the remainder of the string following this character. */
|
||||
struct pso_pointer cdr;
|
||||
};
|
||||
|
||||
struct pso_pointer make_string( wint_t c, struct pso_pointer tail );
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue