static Inline Word Read_Word(File *file) { Byte D[4]; OS_FS_Read(file, D, 4); return Make_Word(D[0], D[1], D[2], D[3]); }
*/ void Define_File_Global(REBYTE *name, REBYTE *content) /* ** Util function used in startup. ** ***********************************************************************/ { REBCNT sym = Make_Word(name, 0); REBSER *str = Make_CStr(content); REBVAL *value; value = Append_Frame(Main_Context, 0, sym); SET_STR_TYPE(REB_FILE, value, str); }
RL_API u32 RL_Map_Word(REBYTE *string) /* ** Given a word as a string, return its global word identifier. ** ** Returns: ** The word identifier that matches the string. ** Arguments: ** string - a valid word as a UTF-8 encoded string. ** Notes: ** Word identifiers are persistent, and you can use them anytime. ** If the word is new (not found in master symbol table) ** it will be added and the new word identifier is returned. */ { return Make_Word(string, 0); }
// // RL_Map_Word: C // // Given a word as a string, return its global word identifier. // // Returns: // The word identifier that matches the string. // Arguments: // string - a valid word as a UTF-8 encoded string. // Notes: // Word identifiers are persistent, and you can use them anytime. // If the word is new (not found in master symbol table) // it will be added and the new word identifier is returned. // RL_API u32 RL_Map_Word(REBYTE *string) { return Make_Word(string, LEN_BYTES(string)); }