Revision 717
added a bunch of TODO comments that will improve the style, efficiency, and possibly memory usage of the wireless library
wl_error_group.c | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (c) 2007 Colony Project |
3 |
*
|
|
3 |
* |
|
4 | 4 |
* Permission is hereby granted, free of charge, to any person |
5 | 5 |
* obtaining a copy of this software and associated documentation |
6 | 6 |
* files (the "Software"), to deal in the Software without |
... | ... | |
9 | 9 |
* copies of the Software, and to permit persons to whom the |
10 | 10 |
* Software is furnished to do so, subject to the following |
11 | 11 |
* conditions: |
12 |
*
|
|
12 |
* |
|
13 | 13 |
* The above copyright notice and this permission notice shall be |
14 | 14 |
* included in all copies or substantial portions of the Software. |
15 |
*
|
|
15 |
* |
|
16 | 16 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
17 | 17 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
18 | 18 |
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
... | ... | |
61 | 61 |
* This function must be called before any other wl_error |
62 | 62 |
* function. |
63 | 63 |
**/ |
64 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
65 |
// it reduces code size or not should be done to be sure. |
|
64 | 66 |
void wl_error_register(void) |
65 | 67 |
{ |
66 | 68 |
wl_register_packet_group(&wl_error_handler); |
... | ... | |
72 | 74 |
* |
73 | 75 |
* @see wl_error_register |
74 | 76 |
**/ |
77 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
78 |
// it reduces code size or not should be done to be sure. |
|
75 | 79 |
void wl_error_unregister(void) |
76 | 80 |
{ |
77 | 81 |
wl_unregister_packet_group(&wl_error_handler); |
... | ... | |
111 | 115 |
|
112 | 116 |
/** |
113 | 117 |
* Send an error message as a string. |
114 |
*
|
|
118 |
* |
|
115 | 119 |
* @param str the error message to send |
116 | 120 |
**/ |
121 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
122 |
// it reduces code size or not should be done to be sure. |
|
117 | 123 |
void wl_error_send_string(char* str) |
118 | 124 |
{ |
119 | 125 |
wl_send_global_packet(WL_ERROR_GROUP, WL_ERROR_STRING_TYPE, |
Also available in: Unified diff