More code, closer to working, still builds.
This commit is contained in:
parent
c9f50572ab
commit
f751fc8a09
14 changed files with 138 additions and 133 deletions
|
|
@ -145,6 +145,25 @@ struct pso_pointer c_string_to_lisp_string( wchar_t *string ) {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a lisp symbol representation of this wide character string. In
|
||||
* symbols, I am accepting only lower case characters.
|
||||
*/
|
||||
struct pso_pointer c_string_to_lisp_symbol( wchar_t *symbol ) {
|
||||
struct pso_pointer result = nil;
|
||||
|
||||
for ( int i = wcslen( symbol ) - 1; i >= 0; i-- ) {
|
||||
wchar_t c = towlower( symbol[i] );
|
||||
|
||||
if ( iswalpha( c ) || c == L'-' ) {
|
||||
result = make_symbol( c, result );
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a lisp keyword representation of this wide character string. In
|
||||
* keywords, I am accepting only lower case characters and numbers.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue