changed function_set in metagen so that it is not structure of arrays any more; introduced item type
parent
2b36821c1e
commit
9a5d57f961
|
@ -1176,6 +1176,7 @@ Coming Soon</i><div>
|
|||
<li><a href='#to_upper_cc_str_doc'>to_upper_cc</a></li>
|
||||
<li><a href='#to_upper_ss_str_doc'>to_upper_ss</a></li>
|
||||
<li><a href='#to_upper_s_str_doc'>to_upper_s</a></li>
|
||||
<li><a href='#to_camel_cc_str_doc'>to_camel_cc</a></li>
|
||||
<li><a href='#int_to_str_size_str_doc'>int_to_str_size</a></li>
|
||||
<li><a href='#int_to_str_str_doc'>int_to_str</a></li>
|
||||
<li><a href='#append_int_to_str_str_doc'>append_int_to_str</a></li>
|
||||
|
@ -1967,8 +1968,8 @@ void to_upper_cc(
|
|||
</div>
|
||||
<div>
|
||||
<div style='font-weight: 600;'>dst</div>
|
||||
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The destination buffer to receive the converted string. This must be large
|
||||
enough to contain all of src and a null terminator.</div></div>
|
||||
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The destination buffer to receive the converted string.
|
||||
This must be large enough to contain all of src and a null terminator.</div></div>
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Rewrites the string in src into dst. src and dst should not overlap with the exception
|
||||
that src and dst may be exactly equal in order to convert the string in place.</div></div><hr>
|
||||
|
@ -1979,7 +1980,7 @@ void to_upper_ss(
|
|||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Parameters</i></b></div><div>
|
||||
<div style='font-weight: 600;'>src</div>
|
||||
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The source string to conver to uppercase.</div></div>
|
||||
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The source string to convert to uppercase.</div></div>
|
||||
</div>
|
||||
<div>
|
||||
<div style='font-weight: 600;'>dst</div>
|
||||
|
@ -1998,153 +1999,170 @@ void to_upper_s(
|
|||
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The string to be converted to all uppercase.</div></div>
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This version of to_upper converts str to uppercase in place.</div></div><hr>
|
||||
<div id='int_to_str_size_str_doc'><h4>§4.3.86: int_to_str_size</h4>
|
||||
<div id='to_camel_cc_str_doc'><h4>§4.3.86: to_camel_cc</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
void to_camel_cc(
|
||||
<div style='margin-left: 4mm;'>char *src,<br>char *dst<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Parameters</i></b></div><div>
|
||||
<div style='font-weight: 600;'>src</div>
|
||||
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The source string to convert to camel case.</div></div>
|
||||
</div>
|
||||
<div>
|
||||
<div style='font-weight: 600;'>dst</div>
|
||||
<div style='margin-bottom: 6mm;'><div style='margin-left: 5mm; margin-right: 5mm;'>The destination buffer to receive the converted string.
|
||||
This must be large enough to contain all of src and a null terminator.</div></div>
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>Rewrites the string in src into dst. src and dst should not overlap
|
||||
with the exception that src and dst may be exactly equal in order to
|
||||
convert the string in place.</div></div><hr>
|
||||
<div id='int_to_str_size_str_doc'><h4>§4.3.87: int_to_str_size</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t int_to_str_size(
|
||||
<div style='margin-left: 4mm;'>int32_t x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call returns the number of bytes required to represent x as a string.</div></div><hr>
|
||||
<div id='int_to_str_str_doc'><h4>§4.3.87: int_to_str</h4>
|
||||
<div id='int_to_str_str_doc'><h4>§4.3.88: int_to_str</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool int_to_str(
|
||||
<div style='margin-left: 4mm;'>String *dest,<br>int32_t x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call writes a string representation of x into dest. If there is enough
|
||||
space in dest this call returns non-zero.</div></div><hr>
|
||||
<div id='append_int_to_str_str_doc'><h4>§4.3.88: append_int_to_str</h4>
|
||||
<div id='append_int_to_str_str_doc'><h4>§4.3.89: append_int_to_str</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool append_int_to_str(
|
||||
<div style='margin-left: 4mm;'>String *dest,<br>int32_t x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call appends a string representation of x onto dest. If there is enough
|
||||
space in dest this call returns non-zero.</div></div><hr>
|
||||
<div id='u64_to_str_size_str_doc'><h4>§4.3.89: u64_to_str_size</h4>
|
||||
<div id='u64_to_str_size_str_doc'><h4>§4.3.90: u64_to_str_size</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t u64_to_str_size(
|
||||
<div style='margin-left: 4mm;'>uint64_t x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call returns the number of bytes required to represent x as a string.</div></div><hr>
|
||||
<div id='u64_to_str_str_doc'><h4>§4.3.90: u64_to_str</h4>
|
||||
<div id='u64_to_str_str_doc'><h4>§4.3.91: u64_to_str</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool u64_to_str(
|
||||
<div style='margin-left: 4mm;'>String *dest,<br>uint64_t x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call writes a string representation of x into dest. If there is enough
|
||||
space in dest this call returns non-zero.</div></div><hr>
|
||||
<div id='append_u64_to_str_str_doc'><h4>§4.3.91: append_u64_to_str</h4>
|
||||
<div id='append_u64_to_str_str_doc'><h4>§4.3.92: append_u64_to_str</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool append_u64_to_str(
|
||||
<div style='margin-left: 4mm;'>String *dest,<br>uint64_t x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call appends a string representation of x onto dest. If there is enough
|
||||
space in dest this call returns non-zero.</div></div><hr>
|
||||
<div id='float_to_str_size_str_doc'><h4>§4.3.92: float_to_str_size</h4>
|
||||
<div id='float_to_str_size_str_doc'><h4>§4.3.93: float_to_str_size</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t float_to_str_size(
|
||||
<div style='margin-left: 4mm;'>float x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call returns the number of bytes required to represent x as a string.</div></div><hr>
|
||||
<div id='append_float_to_str_str_doc'><h4>§4.3.93: append_float_to_str</h4>
|
||||
<div id='append_float_to_str_str_doc'><h4>§4.3.94: append_float_to_str</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool append_float_to_str(
|
||||
<div style='margin-left: 4mm;'>String *dest,<br>float x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call writes a string representation of x into dest. If there is enough
|
||||
space in dest this call returns non-zero.</div></div><hr>
|
||||
<div id='float_to_str_str_doc'><h4>§4.3.94: float_to_str</h4>
|
||||
<div id='float_to_str_str_doc'><h4>§4.3.95: float_to_str</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool float_to_str(
|
||||
<div style='margin-left: 4mm;'>String *dest,<br>float x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call appends a string representation of x onto dest. If there is enough
|
||||
space in dest this call returns non-zero.</div></div><hr>
|
||||
<div id='str_is_int_c_str_doc'><h4>§4.3.95: str_is_int_c</h4>
|
||||
<div id='str_is_int_c_str_doc'><h4>§4.3.96: str_is_int_c</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t str_is_int_c(
|
||||
<div style='margin-left: 4mm;'>char *str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>If str is a valid string representation of an integer, this call returns non-zero</div></div><hr>
|
||||
<div id='str_is_int_s_str_doc'><h4>§4.3.96: str_is_int_s</h4>
|
||||
<div id='str_is_int_s_str_doc'><h4>§4.3.97: str_is_int_s</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool str_is_int_s(
|
||||
<div style='margin-left: 4mm;'>String str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>If str is a valid string representation of an integer, this call returns non-zero.</div></div><hr>
|
||||
<div id='str_to_int_c_str_doc'><h4>§4.3.97: str_to_int_c</h4>
|
||||
<div id='str_to_int_c_str_doc'><h4>§4.3.98: str_to_int_c</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t str_to_int_c(
|
||||
<div style='margin-left: 4mm;'>char *str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>If str is a valid string representation of an integer, this call will return
|
||||
the integer represented by the string. Otherwise this call returns zero.</div></div><hr>
|
||||
<div id='str_to_int_s_str_doc'><h4>§4.3.98: str_to_int_s</h4>
|
||||
<div id='str_to_int_s_str_doc'><h4>§4.3.99: str_to_int_s</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t str_to_int_s(
|
||||
<div style='margin-left: 4mm;'>String str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>If str represents a valid string representation of an integer, this call will return
|
||||
the integer represented by the string. Otherwise this call returns zero.</div></div><hr>
|
||||
<div id='hexchar_to_int_str_doc'><h4>§4.3.99: hexchar_to_int</h4>
|
||||
<div id='hexchar_to_int_str_doc'><h4>§4.3.100: hexchar_to_int</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t hexchar_to_int(
|
||||
<div style='margin-left: 4mm;'>char c<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>If c is a valid hexadecimal digit [0-9a-fA-F] this call returns the value of
|
||||
the integer value of the digit. Otherwise the return is some nonsense value.</div></div><hr>
|
||||
<div id='int_to_hexchar_str_doc'><h4>§4.3.100: int_to_hexchar</h4>
|
||||
<div id='int_to_hexchar_str_doc'><h4>§4.3.101: int_to_hexchar</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
char int_to_hexchar(
|
||||
<div style='margin-left: 4mm;'>int32_t x<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>If x is in the range [0,15] this call returns the equivalent lowercase hexadecimal digit.
|
||||
Otherwise the return is some nonsense value.</div></div><hr>
|
||||
<div id='hexstr_to_int_str_doc'><h4>§4.3.101: hexstr_to_int</h4>
|
||||
<div id='hexstr_to_int_str_doc'><h4>§4.3.102: hexstr_to_int</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
uint32_t hexstr_to_int(
|
||||
<div style='margin-left: 4mm;'>String str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call interprets str has a hexadecimal representation of an integer and returns
|
||||
the represented integer value.</div></div><hr>
|
||||
<div id='color_to_hexstr_str_doc'><h4>§4.3.102: color_to_hexstr</h4>
|
||||
<div id='color_to_hexstr_str_doc'><h4>§4.3.103: color_to_hexstr</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool color_to_hexstr(
|
||||
<div style='margin-left: 4mm;'>String *s,<br>uint32_t color<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call fills s with the hexadecimal representation of the color.
|
||||
If there is enough memory in s to represent the color this call returns non-zero.</div></div><hr>
|
||||
<div id='hexstr_to_color_str_doc'><h4>§4.3.103: hexstr_to_color</h4>
|
||||
<div id='hexstr_to_color_str_doc'><h4>§4.3.104: hexstr_to_color</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool hexstr_to_color(
|
||||
<div style='margin-left: 4mm;'>String s,<br>uint32_t *out<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call interprets s as a color and writes the 32-bit integer representation into out.</div></div><hr>
|
||||
<div id='reverse_seek_slash_pos_str_doc'><h4>§4.3.104: reverse_seek_slash_pos</h4>
|
||||
<div id='reverse_seek_slash_pos_str_doc'><h4>§4.3.105: reverse_seek_slash_pos</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t reverse_seek_slash_pos(
|
||||
<div style='margin-left: 4mm;'>String str,<br>int32_t pos<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call searches for a slash in str by starting pos bytes from the end and going backwards.</div></div><hr>
|
||||
<div id='reverse_seek_slash_str_doc'><h4>§4.3.105: reverse_seek_slash</h4>
|
||||
<div id='reverse_seek_slash_str_doc'><h4>§4.3.106: reverse_seek_slash</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
int32_t reverse_seek_slash(
|
||||
<div style='margin-left: 4mm;'>String str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call searches for a slash in str by starting at the end and going backwards.</div></div><hr>
|
||||
<div id='front_of_directory_str_doc'><h4>§4.3.106: front_of_directory</h4>
|
||||
<div id='front_of_directory_str_doc'><h4>§4.3.107: front_of_directory</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
String front_of_directory(
|
||||
<div style='margin-left: 4mm;'>String dir<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call returns a substring of dir containing only the file name or
|
||||
folder name furthest to the right in the directory.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#substr_doc'>substr</a></div></div><hr>
|
||||
<div id='path_of_directory_str_doc'><h4>§4.3.107: path_of_directory</h4>
|
||||
<div id='path_of_directory_str_doc'><h4>§4.3.108: path_of_directory</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
String path_of_directory(
|
||||
<div style='margin-left: 4mm;'>String dir<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call returns a substring of dir containing the whole path except
|
||||
for the final file or folder name.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#substr_doc'>substr</a></div></div><hr>
|
||||
<div id='set_last_folder_sc_str_doc'><h4>§4.3.108: set_last_folder_sc</h4>
|
||||
<div id='set_last_folder_sc_str_doc'><h4>§4.3.109: set_last_folder_sc</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool set_last_folder_sc(
|
||||
<div style='margin-left: 4mm;'>String *dir,<br>char *folder_name,<br>char slash<br></div>)
|
||||
|
@ -2164,7 +2182,7 @@ at the end of the directory.</div></div>
|
|||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call deletes the last file name or folder name in the dir string and appends the new provided one.
|
||||
If there is enough memory in dir this call returns non-zero.</div></div><hr>
|
||||
<div id='set_last_folder_ss_str_doc'><h4>§4.3.109: set_last_folder_ss</h4>
|
||||
<div id='set_last_folder_ss_str_doc'><h4>§4.3.110: set_last_folder_ss</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool set_last_folder_ss(
|
||||
<div style='margin-left: 4mm;'>String *dir,<br>String folder_name,<br>char slash<br></div>)
|
||||
|
@ -2183,27 +2201,27 @@ fstr_bool set_last_folder_ss(
|
|||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call deletes the last file name or folder name in the dir string and appends the new provided one.
|
||||
If there is enough memory in dir this call returns non-zero.</div></div><hr>
|
||||
<div id='file_extension_str_doc'><h4>§4.3.110: file_extension</h4>
|
||||
<div id='file_extension_str_doc'><h4>§4.3.111: file_extension</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
String file_extension(
|
||||
<div style='margin-left: 4mm;'>String str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call returns a substring containing only the file extension of the provided filename.</div><div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>See Also</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'><a href='#substr_doc'>substr</a></div></div><hr>
|
||||
<div id='remove_extension_str_doc'><h4>§4.3.111: remove_extension</h4>
|
||||
<div id='remove_extension_str_doc'><h4>§4.3.112: remove_extension</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool remove_extension(
|
||||
<div style='margin-left: 4mm;'>String *str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call attemps to delete a file extension off the end of a filename.
|
||||
This call returns non-zero on success.</div></div><hr>
|
||||
<div id='remove_last_folder_str_doc'><h4>§4.3.112: remove_last_folder</h4>
|
||||
<div id='remove_last_folder_str_doc'><h4>§4.3.113: remove_last_folder</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool remove_last_folder(
|
||||
<div style='margin-left: 4mm;'>String *str<br></div>)
|
||||
</div>
|
||||
<div style='margin-top: 3mm; margin-bottom: 3mm; color: #309030;'><b><i>Description</i></b></div><div style='margin-left: 5mm; margin-right: 5mm;'>This call attemps to delete a folder or filename off the end of a path string.
|
||||
This call returns non-zero on success.</div></div><hr>
|
||||
<div id='string_set_match_str_doc'><h4>§4.3.113: string_set_match</h4>
|
||||
<div id='string_set_match_str_doc'><h4>§4.3.114: string_set_match</h4>
|
||||
<div style='font-family: "Courier New", Courier, monospace; text-align: left; margin-top: 3mm; margin-bottom: 3mm; font-size: .95em; background: #DFDFDF; padding: 0.25em;'>
|
||||
fstr_bool string_set_match(
|
||||
<div style='margin-left: 4mm;'>String *str_set,<br>int32_t count,<br>String str,<br>int32_t *match_index<br></div>)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
enum Key_Code_Names{
|
||||
enum{
|
||||
key_back = 1,
|
||||
key_up = 2,
|
||||
key_down = 3,
|
||||
|
|
|
@ -138,6 +138,7 @@ FSTRING_LINK void to_lower_s(String *str);
|
|||
FSTRING_LINK void to_upper_cc(char *src, char *dst);
|
||||
FSTRING_LINK void to_upper_ss(String *src, String *dst);
|
||||
FSTRING_LINK void to_upper_s(String *str);
|
||||
FSTRING_LINK void to_camel_cc(char *src, char *dst);
|
||||
FSTRING_LINK int32_t int_to_str_size(int32_t x);
|
||||
FSTRING_LINK fstr_bool int_to_str(String *dest, int32_t x);
|
||||
FSTRING_LINK fstr_bool append_int_to_str(String *dest, int32_t x);
|
||||
|
@ -232,6 +233,7 @@ FSTRING_INLINE void to_lower(String *str);
|
|||
FSTRING_INLINE void to_upper(char *src, char *dst);
|
||||
FSTRING_INLINE void to_upper(String *src, String *dst);
|
||||
FSTRING_INLINE void to_upper(String *str);
|
||||
FSTRING_INLINE void to_camel(char *src, char *dst);
|
||||
FSTRING_INLINE int32_t str_is_int(char *str);
|
||||
FSTRING_INLINE fstr_bool str_is_int(String str);
|
||||
FSTRING_INLINE int32_t str_to_int(char *str);
|
||||
|
@ -366,6 +368,8 @@ FSTRING_INLINE void
|
|||
to_upper(String *src, String *dst){(to_upper_ss(src,dst));}
|
||||
FSTRING_INLINE void
|
||||
to_upper(String *str){(to_upper_s(str));}
|
||||
FSTRING_INLINE void
|
||||
to_camel(char *src, char *dst){(to_camel_cc(src,dst));}
|
||||
FSTRING_INLINE int32_t
|
||||
str_is_int(char *str){return(str_is_int_c(str));}
|
||||
FSTRING_INLINE fstr_bool
|
||||
|
@ -1503,6 +1507,33 @@ to_upper_s(String *str){
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(FSTRING_IMPLEMENTATION)
|
||||
FSTRING_LINK void
|
||||
to_camel_cc(char *src, char *dst){
|
||||
char *c, ch;
|
||||
int32_t is_first = 1;
|
||||
for (c = src; *c != 0; ++c){
|
||||
ch = *c;
|
||||
if (char_is_alpha_numeric_true(ch)){
|
||||
if (is_first){
|
||||
is_first = 0;
|
||||
ch = char_to_upper(ch);
|
||||
}
|
||||
else{
|
||||
ch = char_to_lower(ch);
|
||||
}
|
||||
}
|
||||
else{
|
||||
is_first = 1;
|
||||
}
|
||||
*dst++ = ch;
|
||||
}
|
||||
*dst = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// String <-> Number Conversions
|
||||
//
|
||||
|
|
|
@ -57,7 +57,7 @@ uint8_t main_fsm_table[] = {
|
|||
33,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
24,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,25,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
37,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5,10,10, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,16,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
40,41,42,43,44, 7, 7, 5,10,10, 8,51,52,53,54,55,56,57,19,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
|
@ -137,7 +137,7 @@ uint8_t pp_macro_fsm_table[] = {
|
|||
33,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
24,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,25,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
37,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5,10,10, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,16,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
40,41,42,43,44, 7, 7, 5,10,10, 8,51,52,53,54,55,56,57,19,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
|
@ -177,7 +177,7 @@ uint8_t pp_identifier_fsm_table[] = {
|
|||
33,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
24,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,25,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
37,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5,10,10, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,16,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
40,41,42,43,44, 7, 7, 5,10,10, 8,51,52,53,54,55,56,57,19,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
|
@ -217,7 +217,7 @@ uint8_t pp_body_if_fsm_table[] = {
|
|||
33,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
24,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,25,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
37,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5,10,10, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,16,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
40,41,42,43,44, 7, 7, 5,10,10, 8,51,52,53,54,55,56,57,19,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
|
@ -257,7 +257,7 @@ uint8_t pp_body_fsm_table[] = {
|
|||
33,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
24,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,25,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
37,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5,10,10, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,16,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
40,41,42,43,44, 7, 7, 5,10,10, 8,51,52,53,54,55,56,57,19,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
|
@ -297,7 +297,7 @@ uint8_t pp_number_fsm_table[] = {
|
|||
33,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
24,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,25,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
37,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5,10,10, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,16,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
40,41,42,43,44, 7, 7, 5,10,10, 8,51,52,53,54,55,56,57,19,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
|
@ -349,7 +349,7 @@ uint8_t pp_junk_fsm_table[] = {
|
|||
33,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
24,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,25,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
37,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5,10,10, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
26,41,42,43,44, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,27,67,29,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,16,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
1, 1,42, 4, 4, 5, 6, 5, 8, 9, 8,51,52,53,54,55,56,57,18,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
40,41,42,43,44, 7, 7, 5,10,10, 8,51,52,53,54,55,56,57,19,18,20,20,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,39,
|
||||
|
|
616
4ed_metagen.cpp
616
4ed_metagen.cpp
File diff suppressed because it is too large
Load Diff
68
4ed_style.h
68
4ed_style.h
|
@ -37,39 +37,39 @@ Interactive_Style file_info_style;
|
|||
|
||||
inline u32*
|
||||
style_index_by_tag(Style_Main_Data *s, u32 tag){
|
||||
u32 *result = 0;
|
||||
switch (tag){
|
||||
case Stag_Bar: result = &s->file_info_style.bar_color; break;
|
||||
case Stag_Bar_Active: result = &s->file_info_style.bar_active_color; break;
|
||||
case Stag_Base: result = &s->file_info_style.base_color; break;
|
||||
case Stag_Pop1: result = &s->file_info_style.pop1_color; break;
|
||||
case Stag_Pop2: result = &s->file_info_style.pop2_color; break;
|
||||
case Stag_Back: result = &s->back_color; break;
|
||||
case Stag_Margin: result = &s->margin_color; break;
|
||||
case Stag_Margin_Hover: result = &s->margin_hover_color; break;
|
||||
case Stag_Margin_Active: result = &s->margin_active_color; break;
|
||||
case Stag_Cursor: result = &s->cursor_color; break;
|
||||
case Stag_At_Cursor: result = &s->at_cursor_color; break;
|
||||
case Stag_Highlight: result = &s->highlight_color; break;
|
||||
case Stag_At_Highlight: result = &s->at_highlight_color; break;
|
||||
case Stag_Mark: result = &s->mark_color; break;
|
||||
case Stag_Default: result = &s->default_color; break;
|
||||
case Stag_Comment: result = &s->comment_color; break;
|
||||
case Stag_Keyword: result = &s->keyword_color; break;
|
||||
case Stag_Str_Constant: result = &s->str_constant_color; break;
|
||||
case Stag_Char_Constant: result = &s->char_constant_color; break;
|
||||
case Stag_Int_Constant: result = &s->int_constant_color; break;
|
||||
case Stag_Float_Constant: result = &s->float_constant_color; break;
|
||||
case Stag_Bool_Constant: result = &s->bool_constant_color; break;
|
||||
case Stag_Preproc: result = &s->preproc_color; break;
|
||||
case Stag_Include: result = &s->include_color; break;
|
||||
case Stag_Special_Character: result = &s->special_character_color; break;
|
||||
case Stag_Highlight_Junk: result = &s->highlight_junk_color; break;
|
||||
case Stag_Highlight_White: result = &s->highlight_white_color; break;
|
||||
case Stag_Paste: result = &s->paste_color; break;
|
||||
case Stag_Undo: result = &s->undo_color; break;
|
||||
case Stag_Next_Undo: result = &s->next_undo_color; break;
|
||||
}
|
||||
return(result);
|
||||
u32 *result = 0;
|
||||
switch (tag){
|
||||
case Stag_Bar: result = &s->file_info_style.bar_color; break;
|
||||
case Stag_Bar_Active: result = &s->file_info_style.bar_active_color; break;
|
||||
case Stag_Base: result = &s->file_info_style.base_color; break;
|
||||
case Stag_Pop1: result = &s->file_info_style.pop1_color; break;
|
||||
case Stag_Pop2: result = &s->file_info_style.pop2_color; break;
|
||||
case Stag_Back: result = &s->back_color; break;
|
||||
case Stag_Margin: result = &s->margin_color; break;
|
||||
case Stag_Margin_Hover: result = &s->margin_hover_color; break;
|
||||
case Stag_Margin_Active: result = &s->margin_active_color; break;
|
||||
case Stag_Cursor: result = &s->cursor_color; break;
|
||||
case Stag_At_Cursor: result = &s->at_cursor_color; break;
|
||||
case Stag_Highlight: result = &s->highlight_color; break;
|
||||
case Stag_At_Highlight: result = &s->at_highlight_color; break;
|
||||
case Stag_Mark: result = &s->mark_color; break;
|
||||
case Stag_Default: result = &s->default_color; break;
|
||||
case Stag_Comment: result = &s->comment_color; break;
|
||||
case Stag_Keyword: result = &s->keyword_color; break;
|
||||
case Stag_Str_Constant: result = &s->str_constant_color; break;
|
||||
case Stag_Char_Constant: result = &s->char_constant_color; break;
|
||||
case Stag_Int_Constant: result = &s->int_constant_color; break;
|
||||
case Stag_Float_Constant: result = &s->float_constant_color; break;
|
||||
case Stag_Bool_Constant: result = &s->bool_constant_color; break;
|
||||
case Stag_Preproc: result = &s->preproc_color; break;
|
||||
case Stag_Include: result = &s->include_color; break;
|
||||
case Stag_Special_Character: result = &s->special_character_color; break;
|
||||
case Stag_Highlight_Junk: result = &s->highlight_junk_color; break;
|
||||
case Stag_Highlight_White: result = &s->highlight_white_color; break;
|
||||
case Stag_Paste: result = &s->paste_color; break;
|
||||
case Stag_Undo: result = &s->undo_color; break;
|
||||
case Stag_Next_Undo: result = &s->next_undo_color; break;
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
|
4
build.c
4
build.c
|
@ -264,7 +264,7 @@ buildsuper(char *code_path, char *out_path, char *filename){
|
|||
|
||||
static void
|
||||
standard_build(char *cdir, uint32_t flags){
|
||||
#if 0
|
||||
#if 1
|
||||
{
|
||||
BEGIN_TIME_SECTION();
|
||||
build(OPTS, cdir, "fsm_table_generator.cpp",
|
||||
|
@ -294,7 +294,7 @@ standard_build(char *cdir, uint32_t flags){
|
|||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
{
|
||||
BEGIN_TIME_SECTION();
|
||||
//buildsuper(cdir, BUILD_DIR, "../code/4coder_default_bindings.cpp");
|
||||
|
|
|
@ -1178,8 +1178,8 @@ CPP_NAME(to_upper)
|
|||
FSTRING_LINK void
|
||||
to_upper_cc(char *src, char *dst)/*
|
||||
DOC_PARAM(src, The source string to convert to uppercase. This string must be null terminated.)
|
||||
DOC_PARAM(dst, The destination buffer to receive the converted string. This must be large
|
||||
enough to contain all of src and a null terminator.)
|
||||
DOC_PARAM(dst, The destination buffer to receive the converted string.
|
||||
This must be large enough to contain all of src and a null terminator.)
|
||||
DOC(Rewrites the string in src into dst. src and dst should not overlap with the exception
|
||||
that src and dst may be exactly equal in order to convert the string in place.)
|
||||
*/{
|
||||
|
@ -1192,7 +1192,7 @@ that src and dst may be exactly equal in order to convert the string in place.)
|
|||
CPP_NAME(to_upper)
|
||||
FSTRING_LINK void
|
||||
to_upper_ss(String *src, String *dst)/*
|
||||
DOC_PARAM(src, The source string to conver to uppercase.)
|
||||
DOC_PARAM(src, The source string to convert to uppercase.)
|
||||
DOC_PARAM(dst, The destination buffer to receive the converted string.
|
||||
This must have a capacity of at least the size of src.)
|
||||
DOC(Rewrites the string in src into dst. src and dst should not overlap with the exception
|
||||
|
@ -1224,6 +1224,38 @@ DOC(This version of to_upper converts str to uppercase in place.)
|
|||
}
|
||||
}
|
||||
|
||||
CPP_NAME(to_camel)
|
||||
FSTRING_LINK void
|
||||
to_camel_cc(char *src, char *dst)/*
|
||||
DOC_PARAM(src, The source string to convert to camel case.)
|
||||
DOC_PARAM(dst, The destination buffer to receive the converted string.
|
||||
This must be large enough to contain all of src and a null terminator.)
|
||||
DOC(Rewrites the string in src into dst. src and dst should not overlap
|
||||
with the exception that src and dst may be exactly equal in order to
|
||||
convert the string in place.)
|
||||
*/{
|
||||
char *c, ch;
|
||||
int32_t is_first = 1;
|
||||
for (c = src; *c != 0; ++c){
|
||||
ch = *c;
|
||||
if (char_is_alpha_numeric_true(ch)){
|
||||
if (is_first){
|
||||
is_first = 0;
|
||||
ch = char_to_upper(ch);
|
||||
}
|
||||
else{
|
||||
ch = char_to_lower(ch);
|
||||
}
|
||||
}
|
||||
else{
|
||||
is_first = 1;
|
||||
}
|
||||
*dst++ = ch;
|
||||
}
|
||||
*dst = 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// String <-> Number Conversions
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue