Hi,
For one of our design, we had introduced a local array of structures
which contains the following fields :
typedef struct {
W_CHAR ussdService[MAX_CHARACTER];
W_CHAR ussdCommand[MAX_NUMBER];
BOOL isTrue;
} NSussdStruct;
The above structure is used to store a Ussd string.
const NSussdStruct UssdString_To_Operation_tbl[]=
{
{ L"*126#" , ACTIVATE },
{ L"#126#" , DEACTIVATE },
{ L"*#126#" , STATUS_REQUEST },
}
We have used the keyword "L" to specify the characters to be word
aligned in the structure array, so that its compatible with the lower
layer calls. The above implementation has been verified to be working
fine on compiler.
Our question is, this feature a language dependent or compiler
dependent feature. Any reference to ANSI C would be useful.
Also, if any one has implemented the 2 byte CHAR assigment statement
with the keyword "L", can you please let me know if the implementation
is safe. Also, please suggest if you have a better strategy.