43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
extern const char _binary_build_info_txt_start [];
|
|
extern const char _binary_build_info_txt_end [];
|
|
extern const char _binary_build_info_txt_size [];
|
|
|
|
extern const char _binary_latex_equations_txt_start [];
|
|
extern const char _binary_latex_equations_txt_end [];
|
|
extern const char _binary_latex_equations_txt_size [];
|
|
|
|
int build_info_length_()
|
|
{
|
|
return ((char*)&_binary_build_info_txt_end - (char*)&_binary_build_info_txt_start);
|
|
}
|
|
|
|
int latex_length_()
|
|
{
|
|
return ((char*)&_binary_latex_equations_txt_end - (char*)&_binary_latex_equations_txt_start);
|
|
}
|
|
|
|
void string_copy ( char *s, unsigned long b, const char *p_start , const char *p_end )
|
|
{
|
|
int count = 0;
|
|
const char* p = p_start;
|
|
|
|
while ( p != p_end && count < b )
|
|
{
|
|
s[count++] = *p++;
|
|
}
|
|
|
|
while ( count < b )
|
|
{
|
|
s[count++] = ' ';
|
|
}
|
|
}
|
|
|
|
void cstr_( char *s, unsigned long b )
|
|
{
|
|
string_copy(s, b, &_binary_build_info_txt_start, &_binary_build_info_txt_end);
|
|
}
|
|
|
|
void eqnstr_( char *s, unsigned long b )
|
|
{
|
|
string_copy(s, b, &_binary_latex_equations_txt_start, &_binary_latex_equations_txt_end);
|
|
}
|