Mercurial > pidgin
annotate plugins/crazychat/util.h @ 13545:cfc2f7fcb3dd
[gaim-migrate @ 15922]
Way more changes that I initially thought I was going to make. I apologize
for the commit message spam. These changes bring a lot of consistency to
our capitalization and punctuation, especially of words like "e-mail".
For reference, I've used these rules (after discussing in #gaim):
e-mail, a case of two words joined:
"e-mail" - in the middle of a sentence caps context
"E-mail" - start of text in a sentence caps context
"E-Mail" - in a header (title) caps context
re-enable, a single word, would be:
"re-enable", "Re-enable", and "Re-enable" (respectively)
The reason this changeset exploded is that, as I went through and verified
these changes, I realized we were using improper capitalization (e.g. header
instead of sentence) in a number of dialogs. I fixed a number of these
cases before, and this corrects another pile.
This looks like I've made a LOT of work for the translators, but the impact
is significantly mitigated by three factors: 1) Many of these changes use
strings that already exist, or change one string in many places. 2) I've
used sed to correct the .po files where possible. 3) The actual changes
are extremely trivial.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Tue, 21 Mar 2006 04:32:45 +0000 |
| parents | 8bcd4d4ccef6 |
| children |
| rev | line source |
|---|---|
| 11232 | 1 #ifndef __UTIL_H__ |
| 2 #define __UTIL_H__ | |
| 3 | |
| 4 #include <debug.h> | |
| 5 | |
| 6 #define SET_TIME(x) \ | |
| 7 do { \ | |
| 8 assert(!gettimeofday((x), NULL)); \ | |
| 9 } while(0) | |
| 10 | |
| 11 #define SET_TIMEOUT(timespec, given_timeout) /* timeout is in ms */ \ | |
| 12 do { \ | |
| 13 struct timeval* curr = (struct timeval*)(timespec); \ | |
| 14 unsigned int tout; \ | |
| 15 if (given_timeout > 100) { \ | |
| 16 tout = given_timeout; \ | |
| 17 } else { \ | |
| 18 tout = 100; \ | |
| 19 } \ | |
| 20 SET_TIME(curr); \ | |
| 21 curr->tv_sec += (tout / 1000); \ | |
| 22 curr->tv_usec /= 1000; /* set to ms */ \ | |
| 23 curr->tv_usec += (tout % 1000); \ | |
| 24 curr->tv_sec += (curr->tv_usec / 1000); \ | |
| 25 curr->tv_usec = (curr->tv_usec % 1000); \ | |
| 26 curr->tv_usec *= 1000000; \ | |
| 27 } while (0) | |
| 28 | |
| 29 #endif | |
| 30 | |
| 31 /* -- gcc specific vararg macro support ... but its so nice! -- */ | |
| 32 #ifdef _DEBUG_ | |
| 33 #define Debug(x, args...) \ | |
| 34 do { \ | |
| 35 printf(x, ## args); \ | |
| 36 gaim_debug(GAIM_DEBUG_INFO, "crazychat", x, ## args); \ | |
| 37 } while (0) | |
| 38 #else | |
| 39 #define Debug(x, args...) do{}while(0) | |
| 40 #endif |
