///////////////////////////////////////// // uncomment ONE of the following pairs // of typedefs at a time //typedef signed char mysint; //typedef unsigned char myuint; //typedef signed short mysint; //typedef unsigned short myuint; typedef signed int mysint; typedef unsigned int myuint; //typedef signed long int mysint; //typedef unsigned long int myuint; ////////////////////////////////////////// /* * saturating unsigned addition */ myuint sat_unsigned_add (myuint, myuint); /* * saturating unsigned subtraction; the second argument is subtracted * from the first */ myuint sat_unsigned_sub (myuint, myuint); /* * saturating signed addition */ mysint sat_signed_add (mysint, mysint); /* * saturating signed subtraction; the second argument is subtracted * from the first */ mysint sat_signed_sub (mysint, mysint);