Previous 199869 Revisions Next

r18357 Monday 8th October, 2012 at 14:17:55 UTC by smf
realigns to the tab size if a space is followed by a tab, this mimics the previous behaviour (nw)
[src/tools]srcclean.c

trunk/src/tools/srcclean.c
r18356r18357
216216      {
217217         int spaces = 1;
218218
219         while (original[src]==32)
219         while (original[src] == 0x20)
220220         {
221221            spaces++;
222222            src++;
223223         }
224224
225         /* Remove invisible spaces */
226         if (original[src] == 0x09)
227         {
228            int realign = (col + spaces) % tab_size;
229            removed_spaces += realign;
230            spaces -= realign;
231         }
232
233         col += spaces;
234
225235         while (spaces > 0)
226236         {
227237            modified[dst++] = 0x09;
228238            spaces -= tab_size;
229239            added_tabs++;
230            col += tab_size;
231240         }
232241      }
233242

Previous 199869 Revisions Next


© 1997-2024 The MAME Team