[asterisk-commits] qwell: trunk r43236 - in /trunk: formats/
include/asterisk/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Sep 18 15:02:04 MST 2006
Author: qwell
Date: Mon Sep 18 17:02:04 2006
New Revision: 43236
URL: http://svn.digium.com/view/asterisk?rev=43236&view=rev
Log:
u_intXX_t is silly
Modified:
trunk/formats/format_g723.c
trunk/formats/format_pcm.c
trunk/include/asterisk/frame.h
Modified: trunk/formats/format_g723.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_g723.c?rev=43236&r1=43235&r2=43236&view=diff
==============================================================================
--- trunk/formats/format_g723.c (original)
+++ trunk/formats/format_g723.c Mon Sep 18 17:02:04 2006
@@ -87,8 +87,8 @@
static int g723_write(struct ast_filestream *s, struct ast_frame *f)
{
- u_int32_t delay;
- u_int16_t size;
+ uint32_t delay;
+ uint16_t size;
int res;
/* XXX there used to be a check s->fr means a read stream */
if (f->frametype != AST_FRAME_VOICE) {
Modified: trunk/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_pcm.c?rev=43236&r1=43235&r2=43236&view=diff
==============================================================================
--- trunk/formats/format_pcm.c (original)
+++ trunk/formats/format_pcm.c Mon Sep 18 17:02:04 2006
@@ -229,7 +229,7 @@
/* SUN .au support routines */
#define AU_HEADER_SIZE 24
-#define AU_HEADER(var) u_int32_t var[6]
+#define AU_HEADER(var) uint32_t var[6]
#define AU_HDR_MAGIC_OFF 0
#define AU_HDR_HDR_SIZE_OFF 1
@@ -266,19 +266,19 @@
static int check_header(FILE *f)
{
AU_HEADER(header);
- u_int32_t magic;
- u_int32_t hdr_size;
- u_int32_t data_size;
- u_int32_t encoding;
- u_int32_t sample_rate;
- u_int32_t channels;
+ uint32_t magic;
+ uint32_t hdr_size;
+ uint32_t data_size;
+ uint32_t encoding;
+ uint32_t sample_rate;
+ uint32_t channels;
if (fread(header, 1, AU_HEADER_SIZE, f) != AU_HEADER_SIZE) {
ast_log(LOG_WARNING, "Read failed (header)\n");
return -1;
}
magic = ltohl(header[AU_HDR_MAGIC_OFF]);
- if (magic != (u_int32_t) AU_MAGIC) {
+ if (magic != (uint32_t) AU_MAGIC) {
ast_log(LOG_WARNING, "Bad magic: 0x%x\n", magic);
}
/* hdr_size = ltohl(header[AU_HDR_HDR_SIZE_OFF]);
@@ -313,7 +313,7 @@
static int update_header(FILE *f)
{
off_t cur, end;
- u_int32_t datalen;
+ uint32_t datalen;
int bytes;
cur = ftell(f);
@@ -327,7 +327,7 @@
ast_log(LOG_WARNING, "Unable to find our position\n");
return -1;
}
- if (fseek(f, AU_HDR_DATA_SIZE_OFF * sizeof(u_int32_t), SEEK_SET)) {
+ if (fseek(f, AU_HDR_DATA_SIZE_OFF * sizeof(uint32_t), SEEK_SET)) {
ast_log(LOG_WARNING, "Unable to set our position\n");
return -1;
}
@@ -346,7 +346,7 @@
{
AU_HEADER(header);
- header[AU_HDR_MAGIC_OFF] = htoll((u_int32_t) AU_MAGIC);
+ header[AU_HDR_MAGIC_OFF] = htoll((uint32_t) AU_MAGIC);
header[AU_HDR_HDR_SIZE_OFF] = htoll(AU_HEADER_SIZE);
header[AU_HDR_DATA_SIZE_OFF] = 0;
header[AU_HDR_ENCODING_OFF] = htoll(AU_ENC_8BIT_ULAW);
Modified: trunk/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/frame.h?rev=43236&r1=43235&r2=43236&view=diff
==============================================================================
--- trunk/include/asterisk/frame.h (original)
+++ trunk/include/asterisk/frame.h Mon Sep 18 17:02:04 2006
@@ -333,17 +333,17 @@
struct ast_option_header {
/* Always keep in network byte order */
#if __BYTE_ORDER == __BIG_ENDIAN
- u_int16_t flag:3;
- u_int16_t option:13;
+ uint16_t flag:3;
+ uint16_t option:13;
#else
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int16_t option:13;
- u_int16_t flag:3;
+ uint16_t option:13;
+ uint16_t flag:3;
#else
#error Byte order not defined
#endif
#endif
- u_int8_t data[0];
+ uint8_t data[0];
};
/*! \brief Requests a frame to be allocated
More information about the asterisk-commits
mailing list