Re: [Codestriker-user] Problems with tab expansion in codestriker
Brought to you by:
sits
From: Chris W. <Chr...@jd...> - 2012-03-05 14:26:54
|
I had the same initial impression of the problem and did a drill down into the source data. The source data was consistent in its use of tabs and displays fine with several different editors. In this case it is a bug with Codestriker. The code views fine everywhere but in Codestriker. Only Codestriker fails to display the source properly. Yes I agree mixed white space is evil and I set up coding standards elsewhere to avoid the problem, however, it is not a requirement here. I've provided details of the data below as examining the generated display from Codestriker showed that Codestriker is not expanding tabs consistently and is definitely a bug in Codestriker. The problem seems to be something interfering with correct tab expansion logic when a line has parenthesis '(' or ')' in them. Lines with a parenthesis in them do not have correct tab expansion of 4 or 8 spaces. Please review the data I originally presented to see the problem. There are no mixed space/tab lines yet the tabs get unevenly substituted for spaces. This is also reflected in the 4 space expansion I've provided. Once again there is irregular tab expansion on lines ith parenthesis on them. Bye for now, Chris -----Original Message----- From: David Sitsky [mailto:dav...@gm...] Sent: Sunday, March 04, 2012 7:11 PM To: Chris Welch Cc: cod...@li... Subject: Re: [Codestriker-user] Problems with tab expansion in codestriker Hi Chris, This is the problem with tabs.. and why in my work place, our IDEs specifically are setup to not use them. What you are seeing is quite normal, if you load your file into an editor with different tab-stops (8 instead of 4), you'll see the same behaviour. Cheers, David On Thu, Mar 1, 2012 at 2:30 AM, Chris Welch <Chr...@jd...> wrote: > Using Codestriker 1.9.10 with SVN 1.6, getting tab expansion problems. See the following: > > > 458 if( attempt_num < 4 ) > 459 ++attempt_num; > 460 else > 461 TSK_sleep( ticks_per_attempt ); > 462 } while( PRD_getticks() < end_tick ); > > The tab expansion setting is at 8 for this display. I did an od dump of the patch looking at the data representing lines 459 and 461 that they both have three tab chars and nothing else before the text, yet they have unequal tab expansion. > > This patch has the following white space prior to the text on the lines: > > Line 458 two tab lead in, nothing else > Line 459 three tab lead in, nothing else > Line 460 two tab lead in, nothing else > Line 461 three tab lead in, nothing else > Line 462 one tab lead in, nothing else > > Changing the display setting to 4 spaces per tabs yields: > > 458 if( attempt_num < 4 ) > 459 ++attempt_num; > 460 else > 461 TSK_sleep( ticks_per_attempt ); > 462 } while( PRD_getticks() < end_tick ); > > Any ideas what the problem is? > > Tx, > > Chris > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Codestriker-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codestriker-user |