forked from mirrors/ubasic
Merge pull request #1 from adamdunkels/dbohdan-master
Slight code style fix
This commit is contained in:
commit
04b97fd136
2 changed files with 8 additions and 8 deletions
|
|
@ -206,11 +206,11 @@ tokenizer_next(void)
|
||||||
}
|
}
|
||||||
current_token = get_next_token();
|
current_token = get_next_token();
|
||||||
|
|
||||||
if (current_token == TOKENIZER_REM) {
|
if(current_token == TOKENIZER_REM) {
|
||||||
while(!(*nextptr == '\n' || tokenizer_finished())) {
|
while(!(*nextptr == '\n' || tokenizer_finished())) {
|
||||||
++nextptr;
|
++nextptr;
|
||||||
}
|
}
|
||||||
if (*nextptr == '\n') {
|
if(*nextptr == '\n') {
|
||||||
++nextptr;
|
++nextptr;
|
||||||
}
|
}
|
||||||
tokenizer_next();
|
tokenizer_next();
|
||||||
|
|
|
||||||
12
ubasic.c
12
ubasic.c
|
|
@ -251,7 +251,7 @@ relation(void)
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
index_free(void) {
|
index_free(void) {
|
||||||
if (line_index_head != NULL) {
|
if(line_index_head != NULL) {
|
||||||
line_index_current = line_index_head;
|
line_index_current = line_index_head;
|
||||||
do {
|
do {
|
||||||
DEBUG_PRINTF("Freeing index for line %d.\n", line_index_current);
|
DEBUG_PRINTF("Freeing index for line %d.\n", line_index_current);
|
||||||
|
|
@ -276,7 +276,7 @@ index_find(int linenum) {
|
||||||
lidx = lidx->next;
|
lidx = lidx->next;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (lidx != NULL) {
|
if(lidx != NULL) {
|
||||||
DEBUG_PRINTF("index_find: Step %3d. Found index for line %d: %d.\n",
|
DEBUG_PRINTF("index_find: Step %3d. Found index for line %d: %d.\n",
|
||||||
step, lidx->line_number,
|
step, lidx->line_number,
|
||||||
lidx->program_text_position);
|
lidx->program_text_position);
|
||||||
|
|
@ -284,7 +284,7 @@ index_find(int linenum) {
|
||||||
step++;
|
step++;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (lidx != NULL && lidx->line_number == linenum) {
|
if(lidx != NULL && lidx->line_number == linenum) {
|
||||||
DEBUG_PRINTF("index_find: Returning index for line %d.\n", linenum);
|
DEBUG_PRINTF("index_find: Returning index for line %d.\n", linenum);
|
||||||
return lidx->program_text_position;
|
return lidx->program_text_position;
|
||||||
}
|
}
|
||||||
|
|
@ -294,7 +294,7 @@ index_find(int linenum) {
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
index_add(int linenum, char const* sourcepos) {
|
index_add(int linenum, char const* sourcepos) {
|
||||||
if (line_index_head != NULL && index_find(linenum)) {
|
if(line_index_head != NULL && index_find(linenum)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ index_add(int linenum, char const* sourcepos) {
|
||||||
new_lidx->program_text_position = sourcepos;
|
new_lidx->program_text_position = sourcepos;
|
||||||
new_lidx->next = NULL;
|
new_lidx->next = NULL;
|
||||||
|
|
||||||
if (line_index_head != NULL) {
|
if(line_index_head != NULL) {
|
||||||
line_index_current->next = new_lidx;
|
line_index_current->next = new_lidx;
|
||||||
line_index_current = line_index_current->next;
|
line_index_current = line_index_current->next;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -338,7 +338,7 @@ static void
|
||||||
jump_linenum(int linenum)
|
jump_linenum(int linenum)
|
||||||
{
|
{
|
||||||
char const* pos = index_find(linenum);
|
char const* pos = index_find(linenum);
|
||||||
if (pos != NULL) {
|
if(pos != NULL) {
|
||||||
DEBUG_PRINTF("jump_linenum: Going to line %d.\n", linenum);
|
DEBUG_PRINTF("jump_linenum: Going to line %d.\n", linenum);
|
||||||
tokenizer_goto(pos);
|
tokenizer_goto(pos);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue