Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2718f30

Browse files
committed
Fix for entab.
1 parent268b8be commit2718f30

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

‎src/tools/entab/entab.c

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ char **argv;
113113

114114
if (col_in_tab==tab_size)
115115
{
116-
/* Is the next character going to be a tab?
117-
Needed to do tab replacement in current spot if
118-
next char is going to be a tab, ignoring
119-
min_spaces */
116+
/*
117+
Is the next character going to be a tab?
118+
Needed to do tab replacement in current spot if
119+
next char is going to be a tab, ignoring
120+
min_spaces
121+
*/
120122
nxt_spaces=0;
121123
while (1)
122124
{
@@ -133,17 +135,20 @@ char **argv;
133135
break;
134136
}
135137
}
136-
if ((prv_spaces >=min_spaces||nxt_spaces==tab_size)&&
137-
quote_char==' '&&
138-
del_tabs== FALSE )
138+
if (quote_char==' ')
139139
{
140-
*(dst++)='\t';
141-
prv_spaces=0;
142-
}
143-
else
144-
{
145-
for (;prv_spaces>0;prv_spaces--)
146-
*(dst++)=' ';
140+
if ((prv_spaces >=min_spaces||
141+
nxt_spaces==tab_size)&&
142+
del_tabs== FALSE)
143+
{
144+
*(dst++)='\t';
145+
prv_spaces=0;
146+
}
147+
else
148+
{
149+
for (;prv_spaces>0;prv_spaces--)
150+
*(dst++)=' ';
151+
}
147152
}
148153
}
149154
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp