X-Git-Url: https://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=common%2Fgsm-sms.c;h=cfc0061da69d2d68e41574ac62ef38095d71569a;hp=5a35034fb9d0784c6c50d29c5447ea04d6f26a36;hb=a2613480a5a1d2e6a1314841f43ae53e85f05f8b;hpb=833e1c7c90e13ceaba3dde8e7a36fcc8dfb1db3c diff --git a/common/gsm-sms.c b/common/gsm-sms.c index 5a35034..cfc0061 100644 --- a/common/gsm-sms.c +++ b/common/gsm-sms.c @@ -8,6 +8,8 @@ */ +#include "config.h" + #include #include #include @@ -18,7 +20,7 @@ #include "gsm-coding.h" /* User data headers */ -GSM_UDHHeader UDHHeaders[] = { +static GSM_UDHHeader UDHHeaders[] = { { GSM_ConcatenatedMessages, 0x05, "\x00\x03\x01\x00\x00" }, /* See GSM 03.40 section 9.2.3.24.1 */ { GSM_DisableVoice, 0x04, "\x01\x02\x00\x00" }, @@ -67,7 +69,8 @@ GSM_UDHHeader UDHHeaders[] = { #define ByteMask ((1 << Bits) - 1) -int GSM_PackSevenBitsToEight(int offset, unsigned char *input, unsigned char *output) +#ifndef UCLINUX +static int GSM_PackSevenBitsToEight(int offset, unsigned char *input, unsigned char *output) { unsigned char *OUT = output; /* Current pointer to the output buffer */ unsigned char *IN = input; /* Current pointer to the input buffer */ @@ -259,7 +262,7 @@ GSM_Error GSM_EncodeSMSDateTime(GSM_DateTime *DT, unsigned char *req) } /* See GSM 03.40 section 9.2.3.11 */ -GSM_Error GSM_DecodeSMSDateTime(GSM_DateTime *DT, unsigned char *req) +static GSM_Error GSM_DecodeSMSDateTime(GSM_DateTime *DT, unsigned char *req) { DT->Year = DecodeWithBCDAlphabet(req[0]); DT->Month = DecodeWithBCDAlphabet(req[1]); @@ -292,7 +295,7 @@ GSM_Error GSM_DecodeSMSDateTime(GSM_DateTime *DT, unsigned char *req) return GE_NONE; } -int GSM_EncodeETSISMSSubmitData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) +static int GSM_EncodeETSISMSSubmitData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) { int off,size=0,size2=0,w,i; @@ -347,7 +350,7 @@ int GSM_EncodeETSISMSSubmitData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) ETSI->TPDCS |= 0x08; #ifdef DEBUG - fprintf(stdout,_("SMS Length is %i\n"),strlen(SMS->MessageText)); + fprintf(stdout,_("SMS Length is %ld\n"),(long)strlen(SMS->MessageText)); #endif EncodeUnicode (ETSI->MessageText+off,SMS->MessageText,strlen(SMS->MessageText)); @@ -821,8 +824,9 @@ GSM_Error GSM_DecodeETSISMS(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) return GE_NONE; } +#endif /* UCLINUX */ -void GSM_SetDefaultSMSData (GSM_SMSMessage *SMS) +static void GSM_SetDefaultSMSData (GSM_SMSMessage *SMS) { struct tm *now; time_t nowh; @@ -887,6 +891,9 @@ void GSM_SetDefaultSMSData (GSM_SMSMessage *SMS) - GSM 03.40 version 6.1.0 Release 1997, section 9.2.3.24 - Smart Messaging Specification, Revision 1.0.0, September 15, 1997 */ +#ifdef UCLINUX +static +#endif /* UCLINUX */ GSM_Error EncodeUDHHeader(char *text, GSM_UDH UDHType) { int i=0; @@ -910,7 +917,7 @@ GSM_Error EncodeUDHHeader(char *text, GSM_UDH UDHType) return GE_NONE; } -int GSM_MakeSinglePartSMS2(GSM_SMSMessage *SMS, +static int GSM_MakeSinglePartSMS2(GSM_SMSMessage *SMS, unsigned char *MessageBuffer,int cur, GSM_UDH UDHType, GSM_Coding_Type Coding){ int j;