changeset 32566:da2dc11d8436

Use uint8_t type instead of unsigned char.
author reimar
date Sat, 27 Nov 2010 10:09:20 +0000
parents e55bd36048a8
children 2546de3e5afe
files sub/sub_cc.c sub/sub_cc.h
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/sub/sub_cc.c	Sat Nov 27 10:07:19 2010 +0000
+++ b/sub/sub_cc.c	Sat Nov 27 10:09:20 2010 +0000
@@ -182,8 +182,8 @@
 {
 
   static unsigned short int lastcode=0x0000;
-  unsigned char c1 = data & 0x7f;
-  unsigned char c2 = (data >> 8) & 0x7f;
+  uint8_t c1 = data & 0x7f;
+  uint8_t c2 = (data >> 8) & 0x7f;
 
   if (c1 & 0x60) {		/* normal character, 0x20 <= c1 <= 0x7f */
 	   if (channel != (selected_channel() & 1))
@@ -254,7 +254,7 @@
   lastcode=data;
 }
 
-static void subcc_decode(const unsigned char *inputbuffer, unsigned int inputlength)
+static void subcc_decode(const uint8_t *inputbuffer, unsigned int inputlength)
 {
   /* The first number may denote a channel number. I don't have the
    * EIA-708 standard, so it is hard to say.
@@ -287,10 +287,10 @@
    *
    * until end of packet
    */
-  const unsigned char *current = inputbuffer;
+  const uint8_t *current = inputbuffer;
   unsigned int curbytes = 0;
-  unsigned char data1, data2;
-  unsigned char cc_code;
+  uint8_t data1, data2;
+  uint8_t cc_code;
   int odd_offset = 1;
 
   while (curbytes < inputlength) {
@@ -338,7 +338,7 @@
 }
 
 
-void subcc_process_data(const unsigned char *inputdata,unsigned int len)
+void subcc_process_data(const uint8_t *inputdata, unsigned int len)
 {
 	if(!subcc_enabled) return;
 	if(!initialized) subcc_init();
--- a/sub/sub_cc.h	Sat Nov 27 10:07:19 2010 +0000
+++ b/sub/sub_cc.h	Sat Nov 27 10:09:20 2010 +0000
@@ -19,9 +19,11 @@
 #ifndef MPLAYER_SUB_CC_H
 #define MPLAYER_SUB_CC_H
 
+#include <stdint.h>
+
 extern int subcc_enabled;
 
 void subcc_init(void);
-void subcc_process_data(const unsigned char *inputdata, unsigned int len);
+void subcc_process_data(const uint8_t *inputdata, unsigned int len);
 
 #endif /* MPLAYER_SUB_CC_H */