diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-12 21:37:58 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-13 01:07:02 +0100 |
commit | a8823830d39bdbde8d4f4f34bfcb26dc4bf79741 (patch) | |
tree | 086d51b0db42c8fdbef669d002739f607db52f01 /toxav/rtp.h | |
parent | 0aa2840164fc782f150cd45f8668ca623e6002cf (diff) |
Add some astyle options to make it do more.
It now enforces a bit more formatting. In particular, padding inside
parentheses is removed. I would like it to remove padding after unary
operators, but there seems to be no option for that.
Diffstat (limited to 'toxav/rtp.h')
-rw-r--r-- | toxav/rtp.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/toxav/rtp.h b/toxav/rtp.h index 30d8ca65..1fbf21e3 100644 --- a/toxav/rtp.h +++ b/toxav/rtp.h | |||
@@ -64,7 +64,7 @@ struct RTPHeader { | |||
64 | /* Non-standard TOX-specific fields */ | 64 | /* Non-standard TOX-specific fields */ |
65 | uint16_t cpart;/* Data offset of the current part */ | 65 | uint16_t cpart;/* Data offset of the current part */ |
66 | uint16_t tlen; /* Total message lenght */ | 66 | uint16_t tlen; /* Total message lenght */ |
67 | } __attribute__ ((packed)); | 67 | } __attribute__((packed)); |
68 | 68 | ||
69 | /* Check alignment */ | 69 | /* Check alignment */ |
70 | typedef char __fail_if_misaligned_1 [ sizeof(struct RTPHeader) == 80 ? 1 : -1 ]; | 70 | typedef char __fail_if_misaligned_1 [ sizeof(struct RTPHeader) == 80 ? 1 : -1 ]; |
@@ -74,7 +74,7 @@ struct RTPMessage { | |||
74 | 74 | ||
75 | struct RTPHeader header; | 75 | struct RTPHeader header; |
76 | uint8_t data[]; | 76 | uint8_t data[]; |
77 | } __attribute__ ((packed)); | 77 | } __attribute__((packed)); |
78 | 78 | ||
79 | /* Check alignment */ | 79 | /* Check alignment */ |
80 | typedef char __fail_if_misaligned_2 [ sizeof(struct RTPMessage) == 82 ? 1 : -1 ]; | 80 | typedef char __fail_if_misaligned_2 [ sizeof(struct RTPMessage) == 82 ? 1 : -1 ]; |
@@ -96,16 +96,16 @@ typedef struct { | |||
96 | 96 | ||
97 | BWController *bwc; | 97 | BWController *bwc; |
98 | void *cs; | 98 | void *cs; |
99 | int (*mcb) (void *, struct RTPMessage *msg); | 99 | int (*mcb)(void *, struct RTPMessage *msg); |
100 | } RTPSession; | 100 | } RTPSession; |
101 | 101 | ||
102 | 102 | ||
103 | RTPSession *rtp_new (int payload_type, Messenger *m, uint32_t friendnumber, | 103 | RTPSession *rtp_new(int payload_type, Messenger *m, uint32_t friendnumber, |
104 | BWController *bwc, void *cs, | 104 | BWController *bwc, void *cs, |
105 | int (*mcb) (void *, struct RTPMessage *)); | 105 | int (*mcb)(void *, struct RTPMessage *)); |
106 | void rtp_kill (RTPSession *session); | 106 | void rtp_kill(RTPSession *session); |
107 | int rtp_allow_receiving (RTPSession *session); | 107 | int rtp_allow_receiving(RTPSession *session); |
108 | int rtp_stop_receiving (RTPSession *session); | 108 | int rtp_stop_receiving(RTPSession *session); |
109 | int rtp_send_data (RTPSession *session, const uint8_t *data, uint16_t length); | 109 | int rtp_send_data(RTPSession *session, const uint8_t *data, uint16_t length); |
110 | 110 | ||
111 | #endif /* RTP_H */ | 111 | #endif /* RTP_H */ |