sorry, i dont want anyone to change his own coding style, but
i feel a little misunderstood.

If code should be set in stone, there is no other way than using
spaces, and only spaces.

Evan Laforge schrieb:
>> there is no need to redefine tabs as they are not needed to replace spaces!
>>
>>>       So no other medium will show those files correctly unless
>>>       their tabstops are all changed too.
>> thats wrong!
>> all files are rendered correct independent from actual tab display width
> 
> Only with a sufficiently loose definition of correct :)
> 
> If you wrap to 80 columns with 2 space tabs but I look at the file
> with 8 space tabs, it won't be 80 columns anymore.  This isn't
> theoretical, it happens all the time and it's annoying.

there is no thing like 2 space tabs!
a tab is a tab and ist rendered most times on a multiple of eight
colums (remember old typewriters).
If tabs were used only for indentation, (only at the start of a line)
nothing gets confused when changing the rendering width.

Wrapping is a complete other thing, that could be done on column
boundary or by word wrapping... .
Anyway, half of fltk sources are already longer than 80 characters
try: wc -L *.c*

If you are stingy with horizontal space you are free to set the tab
rendering width to 2 without detroying any formatting. Or use
most instead of less, or...

Looking at some long lines in code, these looks like:

static pascal OSStatus carbonDispatchHandler( EventHandlerCallRef 
nextHandler, EventRef event, void *userData )

     ret = CallNextEventHandler( nextHandler, event ); // let the OS 
handle the activation, but continue to get a click-through effect

  ret = InstallEventHandler( target, dispatchHandler, 
GetEventTypeCount(dispatchEvents), dispatchEvents, 0, 0L );

     AEInstallEventHandler( kCoreEventClass, kAEQuitApplication, 
NewAEEventHandlerUPP((AEEventHandlerProcPtr)QuitAppleEventHandler), 0, 
false );

None of them would fit into 80 columns, even without indentation. Only
way to keep source lines short is to break them up. eg.:

     AEInstallEventHandler( kCoreEventClass
        , kAEQuitApplication
        , NewAEEventHandlerUPP(
                (AEEventHandlerProcPtr)QuitAppleEventHandler)
        , 0
        , false );

or:

static void
getsyscolor(const char *key1, const char* key2, const char *arg, const 
char *defarg, void (*func)(uchar,uchar,uchar))
{...

static void getsyscolor(const char *key1
        , const char* key2
        , const char *arg
        , const char *defarg
        , void (*func)(uchar,uchar,uchar))      
        {

I hope that gets it clear.
Gombok

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to