[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-indent] indent mangles trigraphs
From: |
david ingamells |
Subject: |
Re: [Bug-indent] indent mangles trigraphs |
Date: |
Thu, 16 May 2002 20:46:31 +0200 |
Anton,
Seems that it's a problem with the tool. Handling trigraphs has probably not
been properly inplemented - they are a more recent addition to the language
than indent originally supported, so the extension to indent has probably not
happened yet. I'll take a look - it must be annoying having to work with such
a handicapped machine! I'm glad I've been able to stick to Unices in recent
years.
Have you thought about a preprocessor for the C code that translates "[" into
"??(" that you can run your code through before/during compilation on the
OS/370? It might make your coding work easier.
On Thursday 16 May 2002 5:14 pm, address@hidden wrote:
> L.S.:
>
> Indent destroys trigraphs, like:
> "??(" for '[' and "??)" for '] ',
> by putting spaces before the question marks and opening parenthesis.
> I need trigraphs because OS/390 doesn't know brackets.
>
> e.g.:
> ===================================================================
> $ cat tstf3.c
> {
> MQCHAR cChannelName??(MQ_CHANNEL_NAME_LENGTH + 1??) = "\0";
>
> pUAS = (UserAreaStruct *) & (ChannelDef_ptr->SecurityUserData??(0??));
> }
>
> $ indent -gnu tstf3.c
> $ cat tstf3.c
> {
> MQCHAR cChannelName ? ? (MQ_CHANNEL_NAME_LENGTH + 1 ? ?) = "\0";
>
> pUAS = (UserAreaStruct *) & (ChannelDef_ptr->SecurityUserData ? ? (0 ?
> ?)); }
>
>
> $ cat $tstf3b.c
> {
> MQCHAR cChannelName??(MQ_CHANNEL_NAME_LENGTH + 1??) = "\0";
>
> pUAS = (UserAreaStruct *) & (ChannelDef_ptr->SecurityUserData??(0??));
> }
>
> $ indent -bap -bad -bli0 -nbc -npsl -di1 -i4 -ci4 -npcs -ss -c40 -cd40 -cp1
> -ts4 -sob -nlp tstf3b.c $ cat tstf3b.c
> {
> MQCHAR cChannelName ? ? (MQ_CHANNEL_NAME_LENGTH + 1 ? ?) = "\0";
>
> pUAS =
> (UserAreaStruct *) & (ChannelDef_ptr->SecurityUserData ? ? (0 ? ?));
> }
> ===========================================================================
>====
>
> Can you specify which option (if any) touches the '?'s ? Apparently it is
> not "-pcs" which is part of "-gnu" and that puts a space between a function
> call name and the '(' : because in my second example I specify "-npcs" with
> the same results.
>
> BTW we use GNU indent here because we have a wide range of different
> platforms, and each vendor's tool works a bit differently; so we try using
> one that is portable.
>
> Thanx,
>
> ---------------------------------------------------------------------------
> This message (including any attachments) is confidential and may be
> privileged. If you have received it by mistake please notify the sender by
> return e-mail and delete this message from your system. Any unauthorised
> use or dissemination of this message in whole or in part is strictly
> prohibited. Please note that e-mails are susceptible to change. ABN AMRO
> Bank N.V. (including its group companies) shall not be liable for the
> improper or incomplete transmission of the information contained in this
> communication nor for any delay in its receipt or damage to your system.
> ABN AMRO Bank N.V. (or its group companies) does not guarantee that the
> integrity of this communication has been maintained nor that this
> communication is free of viruses, interceptions or interference.
> ---------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Bug-indent mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-indent
--
David Ingamells
address@hidden
+31 (013) 5093388 (home)
+31 615010947 (mobile)