[MPlayer-dev-eng] [PATCH] remove ulong in libmpcodecs

Joey Parrish joey at yunamusic.com
Thu Jul 18 00:19:27 CEST 2002


Hello,

This is a patch to replace references to ulong with
unsigned long.  Use of ulong was causing some pain
with systems like cygwin.  Is this patch acceptable?

--Joey

-- 
"Living in the complex world of the future is somewhat
like having bees live in your head.  But, there they are."
-------------- next part --------------
diff -ur main.cvs/libmpcodecs/ad_real.c main.dev/libmpcodecs/ad_real.c
--- main.cvs/libmpcodecs/ad_real.c	Sun Jun 16 01:21:39 2002
+++ main.dev/libmpcodecs/ad_real.c	Wed Jul 17 17:15:49 2002
@@ -23,8 +23,6 @@
 
 LIBAD_EXTERN(real)
 
-typedef unsigned long ulong;
-
 static void *handle=NULL;
 
 void *__builtin_new(unsigned long size) {
@@ -35,16 +33,16 @@
 void *__ctype_b=NULL;
 #endif
 
-static ulong (*raCloseCodec)(ulong);
-static ulong (*raDecode)(ulong,ulong,ulong,ulong,ulong,ulong);
-static ulong (*raFlush)(ulong,ulong,ulong);
-static ulong (*raFreeDecoder)(ulong);
-static ulong (*raGetFlavorProperty)(ulong,ulong,ulong,ulong);
-//static ulong (*raGetNumberOfFlavors2)(void);
-static ulong (*raInitDecoder)(ulong,ulong);
-static ulong (*raOpenCodec2)(ulong);
-static ulong (*raSetFlavor)(ulong,ulong);
-static void  (*raSetDLLAccessPath)(ulong);
+static unsigned long (*raCloseCodec)(unsigned long);
+static unsigned long (*raDecode)(unsigned long,unsigned long,unsigned long,unsigned long,unsigned long,unsigned long);
+static unsigned long (*raFlush)(unsigned long,unsigned long,unsigned long);
+static unsigned long (*raFreeDecoder)(unsigned long);
+static unsigned long (*raGetFlavorProperty)(unsigned long,unsigned long,unsigned long,unsigned long);
+//static unsigned long (*raGetNumberOfFlavors2)(void);
+static unsigned long (*raInitDecoder)(unsigned long,unsigned long);
+static unsigned long (*raOpenCodec2)(unsigned long);
+static unsigned long (*raSetFlavor)(unsigned long,unsigned long);
+static void  (*raSetDLLAccessPath)(unsigned long);
 
 typedef struct {
     int samplerate;
diff -ur main.cvs/libmpcodecs/vd_real.c main.dev/libmpcodecs/vd_real.c
--- main.cvs/libmpcodecs/vd_real.c	Mon Jun 24 13:21:14 2002
+++ main.dev/libmpcodecs/vd_real.c	Wed Jul 17 17:15:23 2002
@@ -23,13 +23,11 @@
 LIBVD_EXTERN(real)
 
 
-typedef unsigned long ulong;
-
-ulong (*rvyuv_custom_message)(ulong,ulong);
-ulong (*rvyuv_free)(ulong);
-ulong (*rvyuv_hive_message)(ulong,ulong);
-ulong (*rvyuv_init)(ulong,ulong);
-ulong (*rvyuv_transform)(ulong,ulong,ulong,ulong,ulong);
+unsigned long (*rvyuv_custom_message)(unsigned long,unsigned long);
+unsigned long (*rvyuv_free)(unsigned long);
+unsigned long (*rvyuv_hive_message)(unsigned long,unsigned long);
+unsigned long (*rvyuv_init)(unsigned long,unsigned long);
+unsigned long (*rvyuv_transform)(unsigned long,unsigned long,unsigned long,unsigned long,unsigned long);
 
 void *rv_handle=NULL;
 
@@ -166,8 +164,8 @@
 	}
 	// setup rv30 codec (codec sub-type and image dimensions):
 	if(extrahdr[1]>=0x30000000){
-	    ulong cmsg24[4]={sh->disp_w,sh->disp_h,sh->disp_w,sh->disp_h};
-	    ulong cmsg_data[3]={0x24,1+((extrahdr[0]>>16)&7),&cmsg24};
+	    unsigned long cmsg24[4]={sh->disp_w,sh->disp_h,sh->disp_w,sh->disp_h};
+	    unsigned long cmsg_data[3]={0x24,1+((extrahdr[0]>>16)&7),&cmsg24};
 	    (*rvyuv_custom_message)(cmsg_data,sh->context);
 	}
 	mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: RealVideo codec init OK!\n");
@@ -183,10 +181,10 @@
 // decode a frame
 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
 	mp_image_t* mpi;
-	ulong result;
+	unsigned long result;
 	int *buff=(unsigned int *)((char*)data+len);
-	ulong transform_out[5];
-	ulong transform_in[6]={
+	unsigned long transform_out[5];
+	unsigned long transform_in[6]={
 		len,		// length of the packet (sub-packets appended)
 		0,		// unknown, seems to be unused
 		buff[0],	// number of sub-packets - 1


More information about the MPlayer-dev-eng mailing list