[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small cleanups
From: |
Pavel Machek |
Subject: |
Small cleanups |
Date: |
Fri, 5 Apr 2002 12:33:01 +0200 |
User-agent: |
Mutt/1.3.27i |
Hi!
Made indentation of SMSMessage_Layout make match that of header file.
sendringtone actually expects parameters swapped, and it does not
work, anyway; help fixed and printf() warnining user added.
In gsm-sms.h document which fields are for who.
Okay to commit?
Pavel
Index: common/phones/nk6100.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/phones/nk6100.c,v
retrieving revision 1.60
diff -u -u -r1.60 nk6100.c
--- common/phones/nk6100.c 4 Apr 2002 22:35:37 -0000 1.60
+++ common/phones/nk6100.c 5 Apr 2002 10:29:49 -0000
@@ -59,8 +59,7 @@
-1, -1, -1,
20, true, true,
32, -1,
- 1, 0,
- 39, true
+ 1, 0, 39, true
};
static const SMSMessage_Layout nk6100_submit = {
@@ -70,8 +69,7 @@
16, -1, -1,
21, true, true,
33, -1,
- -1, -1,
- 40, true
+ -1, -1, 40, true
};
static const SMSMessage_Layout nk6100_delivery_report = {
@@ -81,8 +79,7 @@
-1, -1, -1,
19, true, true,
31, 38,
- 1, 0,
- 18, true
+ 1, 0, 18, true
};
static const SMSMessage_Layout nk6100_picture = {
@@ -92,8 +89,7 @@
-1, -1, -1,
-1, true, true,
-1, -1,
- -1, -1,
- -1, true
+ -1, -1, -1, true
};
static SMSMessage_PhoneLayout nk6100_layout;
Index: gnokii/gnokii.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/gnokii/gnokii.c,v
retrieving revision 1.215
diff -u -u -r1.215 gnokii.c
--- gnokii/gnokii.c 4 Apr 2002 11:27:36 -0000 1.215
+++ gnokii/gnokii.c 5 Apr 2002 10:30:24 -0000
@@ -275,7 +275,7 @@
" gnokii --identify\n"
" gnokii --senddtmf string\n"
" gnokii --sendlogo {caller|op|picture}
destination logofile [network code]\n"
- " gnokii --sendringtone destination
rtttlfile\n"
+ " gnokii --sendringtone rtttlfile
destination\n"
" gnokii --setlogo op [logofile] [network
code]\n"
" gnokii --setlogo startup [logofile]\n"
" gnokii --setlogo caller [logofile] [caller
group number] [group name]\n"
@@ -611,15 +611,11 @@
fprintf(stderr, _("storing sms"));
if (chars_read == 0) {
-
fprintf(stderr, _("Couldn't read from stdin!\n"));
return -1;
-
} else if (chars_read > input_len || chars_read >
sizeof(SMS.UserData[0].u.Text) - 1) {
-
fprintf(stderr, _("Input too long!\n"));
return -1;
-
}
if (chars_read > 0 && message_buffer[chars_read - 1] == '\n')
message_buffer[--chars_read] = 0x00;
@@ -3010,6 +3006,8 @@
{
GSM_Ringtone ringtone;
GSM_Error error = GE_NOTSUPPORTED;
+
+ fprintf(stderr, "Sorry, sending ringtones is currently b0rken.\n");
if (GSM_ReadRingtoneFile(argv[0], &ringtone)) {
fprintf(stdout, _("Failed to load ringtone.\n"));
Index: include/gsm-sms.h
===================================================================
RCS file: /cvsroot/gnokii/gnokii/include/gsm-sms.h,v
retrieving revision 1.31
diff -u -u -r1.31 gsm-sms.h
--- include/gsm-sms.h 4 Apr 2002 22:35:37 -0000 1.31
+++ include/gsm-sms.h 5 Apr 2002 10:30:29 -0000
@@ -329,7 +329,7 @@
/* Define datatype for SMS messages, describes precisely GSM Spec 03.40 */
typedef struct {
- /* Specification fields */
+ /* Caller to smsssend() has to fill in these */
SMS_MessageType Type; /* Message Type
Indicator - 2 bits (9.2.3.1) */
bool MoreMessages; /* More Messages to Send
(9.2.3.2) */
bool ReplyViaSameSMSC; /* Reply Path (9.2.3.17)
- `Reply via same centre' in the phone */
@@ -348,6 +348,7 @@
SMS_DataCodingScheme DCS; /* Data Coding Scheme
(9.2.3.10) */
SMS_MessageValidity Validity; /* Validity Period
Format & Validity Period (9.2.3.3 & 9.2.3.12) - `Message validity' in the phone
*/
+ /* This is for internal use by smsssend() */
unsigned short UDH_No; /* Number of present
UDHs */
unsigned int UDH_Length; /* Length of the whole
UDH */
SMS_UDHInfo UDH[SMS_MAX_UDH_NUMBER]; /* User Data Header
Indicator & User Data Header (9.2.3.23 & 9.2.3.24) */
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
- Small cleanups,
Pavel Machek <=