finit ?
This commit is contained in:
parent
3603776303
commit
562449a727
19
eval.c
19
eval.c
|
@ -15,11 +15,13 @@ void print_text(const char* text, int len){
|
||||||
for (int i=0; i<len; i++){
|
for (int i=0; i<len; i++){
|
||||||
if (state.beginLine) printf("\n");
|
if (state.beginLine) printf("\n");
|
||||||
|
|
||||||
printf("%c", text[i]);
|
if (text[i] != '\n'){
|
||||||
state.y++;
|
printf("%c", text[i]);
|
||||||
state.beginLine = 0;
|
state.y++;
|
||||||
|
state.beginLine = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (state.y >= PAGE_WIDTH || text[i] == '\n'){
|
if (!state.beginLine && (state.y >= PAGE_WIDTH || text[i] == '\n')){
|
||||||
state.y = 0;
|
state.y = 0;
|
||||||
state.x++;
|
state.x++;
|
||||||
state.beginLine = 1;
|
state.beginLine = 1;
|
||||||
|
@ -128,4 +130,13 @@ void evaluate(Token* token){
|
||||||
break_line();
|
break_line();
|
||||||
print_text(EXPAND_LIT("-------------------------------------------------------------------------------"));
|
print_text(EXPAND_LIT("-------------------------------------------------------------------------------"));
|
||||||
}
|
}
|
||||||
|
else if (token->type == BLOCKQUOTE)
|
||||||
|
{
|
||||||
|
print_text(EXPAND_LIT(" "));
|
||||||
|
printf(FC_SWAP);
|
||||||
|
}
|
||||||
|
else if (token->type == END_BLOCKQUOTE)
|
||||||
|
{
|
||||||
|
printf(FC_nSWAP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue