1 diff -Naur openobex-apps-1.0.0-clean/src/obex_put_common.c openobex-apps-1.0.0/src/obex_put_common.c
2 --- openobex-apps-1.0.0-clean/src/obex_put_common.c 2002-12-01 18:34:41.000000000 +0100
3 +++ openobex-apps-1.0.0/src/obex_put_common.c 2004-05-12 12:57:37.000000000 +0200
8 - printf(__FUNCTION__ "() Skipped header %02x\n", hi);
9 + printf("%s() Skipped header %02x\n", __func__, hi);
14 OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS);
17 - printf(__FUNCTION__ "() Denied %02x request\n", cmd);
18 + printf("%s() Denied %02x request\n", __func__, cmd);
19 OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
22 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_cable.h openobex-apps-1.0.0/src/obex_test_cable.h
23 --- openobex-apps-1.0.0-clean/src/obex_test_cable.h 2002-12-01 18:34:41.000000000 +0100
24 +++ openobex-apps-1.0.0/src/obex_test_cable.h 2004-05-12 13:23:11.000000000 +0200
26 /*********************************************************************
29 * Filename: obex_test_cable.h
34 * Status: Experimental.
35 * Author: Pontus Fuchs <pontus.fuchs@tactel.se>
36 * Created at: Wed Nov 17 22:05:16 1999
37 * Modified at: Sun Aug 13 10:55:20 PM CEST 2000
38 * Modified by: Pontus Fuchs <pontus.fuchs@tactel.se>
41 * Copyright (c) 1999, 2000 Pontus Fuchs, All Rights Reserved.
44 * This library is free software; you can redistribute it and/or
45 * modify it under the terms of the GNU Lesser General Public
46 * License as published by the Free Software Foundation; either
49 * You should have received a copy of the GNU Lesser General Public
50 * License along with this library; if not, write to the Free Software
51 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
52 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
56 ********************************************************************/
58 #ifndef OBEX_TEST_CABLE_H
60 #include <openobex/obex.h>
63 -#define CDEBUG(args...) printf(__FUNCTION__ "() " args)
64 +#define CDEBUG(args...) printf("%s() ", __func__, args)
66 #define CDEBUG(args...)
68 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_cable.h~ openobex-apps-1.0.0/src/obex_test_cable.h~
69 --- openobex-apps-1.0.0-clean/src/obex_test_cable.h~ 1970-01-01 01:00:00.000000000 +0100
70 +++ openobex-apps-1.0.0/src/obex_test_cable.h~ 2004-05-12 13:22:48.000000000 +0200
72 +/*********************************************************************
74 + * Filename: obex_test_cable.h
77 + * Status: Experimental.
78 + * Author: Pontus Fuchs <pontus.fuchs@tactel.se>
79 + * Created at: Wed Nov 17 22:05:16 1999
80 + * Modified at: Sun Aug 13 10:55:20 PM CEST 2000
81 + * Modified by: Pontus Fuchs <pontus.fuchs@tactel.se>
83 + * Copyright (c) 1999, 2000 Pontus Fuchs, All Rights Reserved.
85 + * This library is free software; you can redistribute it and/or
86 + * modify it under the terms of the GNU Lesser General Public
87 + * License as published by the Free Software Foundation; either
88 + * version 2 of the License, or (at your option) any later version.
90 + * This library is distributed in the hope that it will be useful,
91 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
92 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
93 + * Lesser General Public License for more details.
95 + * You should have received a copy of the GNU Lesser General Public
96 + * License along with this library; if not, write to the Free Software
97 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
100 + ********************************************************************/
102 +#ifndef OBEX_TEST_CABLE_H
103 +#define OBEX_TEST_CABLE_H
105 +#define CABLE_DEBUG 1
108 +#include <termios.h>
109 +#include <openobex/obex.h>
112 +#define CDEBUG(args...) printf("%s() " __func__, args)
114 +#define CDEBUG(args...)
117 +struct cobex_context
119 + const char *portname;
121 + char inputbuf[500];
122 + struct termios oldtio, newtio;
127 +struct cobex_context *cobex_open(const char *port, int r320);
128 +void cobex_close(struct cobex_context *gt);
129 +int cobex_do_at_cmd(struct cobex_context *gt, char *cmd, char *rspbuf, int rspbuflen, int timeout);
132 +int cobex_handle_input(obex_t *handle, void * userdata, int timeout);
133 +int cobex_write(obex_t *self, void * userdata, uint8_t *buffer, int length);
134 +int cobex_connect(obex_t *handle, void * userdata);
135 +int cobex_disconnect(obex_t *handle, void * userdata);
138 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_client.c openobex-apps-1.0.0/src/obex_test_client.c
139 --- openobex-apps-1.0.0-clean/src/obex_test_client.c 2002-12-01 18:34:41.000000000 +0100
140 +++ openobex-apps-1.0.0/src/obex_test_client.c 2004-05-12 13:07:24.000000000 +0200
141 @@ -370,13 +370,13 @@
143 while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) {
144 if(hi == OBEX_HDR_BODY) {
145 - printf(__FUNCTION__ "() Found body\n");
146 + printf("%s() Found body\n", __func__);
152 - printf(__FUNCTION__ "() Skipped header %02x\n", hi);
153 + printf("%s() Skipped header %02x\n", __func__, hi);
157 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_server.c openobex-apps-1.0.0/src/obex_test_server.c
158 --- openobex-apps-1.0.0-clean/src/obex_test_server.c 2002-12-01 18:34:41.000000000 +0100
159 +++ openobex-apps-1.0.0/src/obex_test_server.c 2004-05-12 13:07:33.000000000 +0200
162 char *namebuf = NULL;
164 - printf(__FUNCTION__ "()\n");
165 + printf("%s()\n", __func__);
167 while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) {
170 - printf(__FUNCTION__ "() Found body\n");
171 + printf("%s() Found body\n", __func__);
176 - printf(__FUNCTION__ "() Found name\n");
177 + printf("%s() Found name\n", __func__);
178 if( (namebuf = malloc(hlen / 2))) {
179 OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
185 - printf(__FUNCTION__ "() Skipped header %02x\n", hi);
186 + printf("%s() Skipped header %02x\n", __func__, hi);
190 @@ -103,12 +103,12 @@
192 char *namebuf = NULL;
194 - printf(__FUNCTION__ "()\n");
195 + printf("%s()\n", __func__);
197 while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) {
200 - printf(__FUNCTION__ "() Found name\n");
201 + printf("%s() Found name\n", __func__);
202 if( (namebuf = malloc(hlen / 2))) {
203 OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
205 @@ -116,16 +116,16 @@
209 - printf(__FUNCTION__ "() Skipped header %02x\n", hi);
210 + printf("%s() Skipped header %02x\n", __func__, hi);
215 - printf(__FUNCTION__ "() Got a GET without a name-header!\n");
216 + printf("%s() Got a GET without a name-header!\n", __func__);
217 OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_FOUND, OBEX_RSP_NOT_FOUND);
220 - printf(__FUNCTION__ "() Got a request for %s\n", name);
221 + printf("%s() Got a request for %s\n", __func__, name);
223 buf = easy_readfile(name, &file_size);
227 const uint8_t *who = NULL;
229 - printf(__FUNCTION__ "()\n");
230 + printf("%s()\n", __func__);
232 while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen)) {
233 if(hi == OBEX_HDR_WHO) {
238 - printf(__FUNCTION__ "() Skipped header %02x\n", hi);
239 + printf("%s() Skipped header %02x\n", __func__, hi);
244 OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
247 - printf(__FUNCTION__ "() Denied %02x request\n", cmd);
248 + printf("%s() Denied %02x request\n", __func__, cmd);
249 OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
256 - printf(__FUNCTION__ "() Command (%02x) has now finished\n", obex_cmd);
257 + printf("%s() Command (%02x) has now finished\n", __func__, obex_cmd);