[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: Fonts do not work correctly in cc-mode
From: |
Matzi Kratzi |
Subject: |
Fwd: Fonts do not work correctly in cc-mode |
Date: |
Tue, 24 Apr 2007 05:38:00 +0200 |
---------- Forwarded message ----------
From: Matzi Kratzi <address@hidden>
Date: Apr 24, 2007 5:37 AM
Subject: Re: Fonts do not work correctly in cc-mode
To: address@hidden
I could, but I rather not.
Here is the smallest test-file I can produce. Try remove " uint8 i;"
and the fonts will work as expected (in my opinion)..
test-file starts below:
////////////////////////////////////////////////////////////////////////////////
static boolean Ctester_FoobarenFOO_Ack(LL_Data_Ind_t *FoobarenFOO_Ack_p,
FoobarenFOO_AckAddr_t
*FoobarenFOO_AckAddr_p)
{
uint8 *Data_p = &(FoobarenFOO_Ack_p->Data[BARFOO_BAR_HEADER_SIZE]);
uint8 FoobarenFOO_AckAddrIEI[] = {USER_DATA_IP_ADDRESS_IEI,
UDP_PORT_IEI,
GA_FOO_CAUSE_IEI};
uint8 i;
uint8 Index = 0;
uint8 NoOf_IE = sizeof (FoobarenFOO_AckAddrIEI);
for (i = 0; i < NoOf_IE; i++)
{
if (Data_p[Index] == FoobarenFOO_AckAddrIEI[i])
{
FoobarenFOO_AckAddr_p->Addr[i] = &Data_p[Index];
Index += Data_p[Index + sizeof(uint8)] + sizeof(uint8) + sizeof(uint8);
}
else
{
FoobarenFOO_AckAddr_p->Addr[i] = NIL;
}
}
return TRUE; //Always accept so far.
}
////////////////////////////////////////////////////////////////////////////////
static boolean Ctester_DefoobarenFOO_Req(LL_Data_Ind_t *FOO_Data_p,
DefoobarenFOO_ReqAddr_t
*DefoobarenFOO_ReqAddr_p)
{
}
////////////////////////////////////////////////////////////////////////////////
static boolean Ctester_FOO_Data(LL_Data_Ind_t *FOO_Data_p,
FOO_DataAddr_t *FOO_DataAddr_p)
{
}
testfile ends above
On 4/24/07, Richard Stallman <address@hidden> wrote:
Quite often, but not always, cc-mode does not fontify the "head" of a
function definition correctly.
static uint8 CheckIE_ActivateUTC_Req(LL_Data_Ind_t *ActivateUTC_Req_p,
ActivateUTC_ReqAddr_t
*ActivateUTC_ReqAddr_p)
{
...
}
With that formatting I am not surprised it fails, Try writing it like this:
static uint8
CheckIE_ActivateUTC_Req(LL_Data_Ind_t *ActivateUTC_Req_p,
ActivateUTC_ReqAddr_t, *ActivateUTC_ReqAddr_p)
{
...
}