Skip to content

Commit

Permalink
indent -kr
Browse files Browse the repository at this point in the history
  • Loading branch information
sasagawa888 committed Oct 26, 2024
1 parent 814ebfa commit 832bd96
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 31 deletions.
17 changes: 8 additions & 9 deletions edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,15 +691,14 @@ read_line_loop(int c, int *j, int *uni_j, int *pos, int limit,
case CTRL('M'):
case EOL:
if (!check_balance()) {
printf
("\n() \"\" unbalance --- enter any key ---");
eisl_getch();
ESCMVLEFT(1);
ESCCLSL();
ESCMVU();
ESCMVLEFT(3);
display_buffer();
ESCMVLEFT(*j + 3);
printf("\n() \"\" unbalance --- enter any key ---");
eisl_getch();
ESCMVLEFT(1);
ESCCLSL();
ESCMVU();
ESCMVLEFT(3);
display_buffer();
ESCMVLEFT(*j + 3);
restore_paren_buffer(*j);
return false;
}
Expand Down
26 changes: 13 additions & 13 deletions edlis.c
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ bool edit_loop(void)
clear_status();
ESCRST();
return false;
}
}
}
break;
case KEY_UP:
Expand Down Expand Up @@ -2625,19 +2625,19 @@ int find_eol1(int row)
/* if end of line has no EOL, add EOL*/
void add_eol(void)
{
int col;

if(ed_data[ed_end][0] == 0)
return;

for(col=0;col<COL_SIZE;col++){
if(ed_data[ed_end][col] == EOL)
return;
else if (ed_data[ed_end][col] == 0){
ed_data[ed_end][col] = EOL;
return;
}
int col;

if (ed_data[ed_end][0] == 0)
return;

for (col = 0; col < COL_SIZE; col++) {
if (ed_data[ed_end][col] == EOL)
return;
else if (ed_data[ed_end][col] == 0) {
ed_data[ed_end][col] = EOL;
return;
}
}
}


Expand Down
7 changes: 3 additions & 4 deletions function.c
Original file line number Diff line number Diff line change
Expand Up @@ -3942,10 +3942,9 @@ int f_finish_output(int arglist, int th)
arg1 = car(arglist);
if (length(arglist) != 1)
error(WRONG_ARGS, "finish-output", arglist, th);
if (!
(streamp(arg1)
&& (GET_OPT(arg1) == EISL_OUTPUT
|| GET_OPT(arg1) == EISL_OUTSTR)))
if (!(streamp(arg1)
&& (GET_OPT(arg1) == EISL_OUTPUT
|| GET_OPT(arg1) == EISL_OUTSTR)))
error(NOT_OUT_STREAM, "finish-output", arg1, th);

if (GET_OPT(arg1) == EISL_OUTPUT)
Expand Down
8 changes: 4 additions & 4 deletions syntax.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ int f_defgeneric(int arglist, int th)
arg2 = cadr(arglist); /* lambda-list */
arg3 = cddr(arglist); /* body */

/* when (defgeneric (setf foo) ...) */
/* when (defgeneric (setf foo) ...) */
if (listp(arg1) && car(arg1) == make_sym("SETF")) {
setf_list = cons(cadr(arg1), setf_list);
arg1 = cadr(arg1);
Expand Down Expand Up @@ -1831,7 +1831,7 @@ int f_defgeneric(int arglist, int th)
if (!top_flag && !ignore_topchk) {
error(NOT_TOP_LEVEL, "defgeneric", arglist, th);
}

if (!member(arg1, generic_list))
generic_list = cons(arg1, generic_list);

Expand Down Expand Up @@ -1876,7 +1876,7 @@ int f_defmethod(int arglist, int th)
arg1 = car(arglist); /* method-name */
arg2 = cdr(arglist); /* parameter-profile */

/* when (defmethod (setf foo) ...) */
/* when (defmethod (setf foo) ...) */
if (listp(arg1) && car(arg1) == make_sym("SETF")) {
arg1 = cadr(arg1);
}
Expand All @@ -1897,7 +1897,7 @@ int f_defmethod(int arglist, int th)
&& symbolp(cadr(arg1))))) {
error(ILLEGAL_FORM, "defmethod", arg1, th);
}

if (listp(car(arg2)) && illegal_lambda_p(car(arg2))) {
error(ILLEGAL_ARGS, "defmethod", arg2, th);
}
Expand Down
1 change: 0 additions & 1 deletion tests/fib.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
(cond ((= n 0) 0)
((= n 1) 1)
(t (+ (fib (- n 1)) (fib (- n 2))))))

0 comments on commit 832bd96

Please sign in to comment.