summaryrefslogtreecommitdiff
path: root/decode_render.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-05-06 09:42:48 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-05-06 21:44:35 -0700
commit80ac8c6d04c04ec1f892883397507f32292ae590 (patch)
tree4133191d4c63cd27315491b6f82028cf3efca134 /decode_render.c
parent245871145e6a12739ed8d4512b5e2cb6b1a1721c (diff)
downloadxscope-80ac8c6d04c04ec1f892883397507f32292ae590.tar.gz
Ansify prototypes and move extern declarations to header files
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'decode_render.c')
-rw-r--r--decode_render.c76
1 files changed, 44 insertions, 32 deletions
diff --git a/decode_render.c b/decode_render.c
index 8e52d54..ccad5ee 100644
--- a/decode_render.c
+++ b/decode_render.c
@@ -35,9 +35,10 @@ unsigned char LookForRENDERFlag;
unsigned char RENDERRequest, RENDERError;
-render_decode_req(fd, buf)
-FD fd;
-unsigned char *buf;
+void
+render_decode_req (
+ FD fd,
+ unsigned char *buf)
{
short Major = IByte (&buf[0]);
short Minor = IByte (&buf[1]);
@@ -75,10 +76,11 @@ unsigned char *buf;
}
}
-render_decode_reply(fd, buf, RequestMinor)
- FD fd;
- unsigned char *buf;
- short RequestMinor;
+void
+render_decode_reply (
+ FD fd,
+ unsigned char *buf,
+ short RequestMinor)
{
switch (RequestMinor) {
case 0: RenderQueryVersionReply (fd, buf); break;
@@ -88,9 +90,10 @@ render_decode_reply(fd, buf, RequestMinor)
}
}
-render_decode_error(fd, buf)
- FD fd;
- unsigned char *buf;
+void
+render_decode_error (
+ FD fd,
+ unsigned char *buf)
{
short error = IByte(&buf[1]) - RENDERError;
@@ -105,9 +108,9 @@ render_decode_error(fd, buf)
}
}
-
-PrintPICTURE(buf)
- unsigned char *buf;
+static int
+PrintPICTURE (
+ unsigned char *buf)
{
/* print a WINDOW -- CARD32 plus 0 = None */
long n = ILong (buf);
@@ -118,8 +121,9 @@ PrintPICTURE(buf)
return(4);
}
-PrintPICTFORMAT(buf)
- unsigned char *buf;
+static int
+PrintPICTFORMAT (
+ unsigned char *buf)
{
/* print a WINDOW -- CARD32 plus 0 = None */
long n = ILong (buf);
@@ -130,8 +134,9 @@ PrintPICTFORMAT(buf)
return(4);
}
-PrintPICTFORMINFO(buf)
- unsigned char *buf;
+static int
+PrintPICTFORMINFO (
+ unsigned char *buf)
{
/* print a PictFormInfo */
long n = ILong(buf);
@@ -153,8 +158,9 @@ PrintPICTFORMINFO(buf)
return(28);
}
-PrintGLYPHSET(buf)
- unsigned char *buf;
+static int
+PrintGLYPHSET (
+ unsigned char *buf)
{
/* print a GLYPHSET -- CARD32 plus 0 = None */
long n = ILong (buf);
@@ -165,8 +171,9 @@ PrintGLYPHSET(buf)
return(4);
}
-PrintRENDERCOLOR(buf)
- unsigned char *buf;
+static int
+PrintRENDERCOLOR (
+ unsigned char *buf)
{
/* print a RENDERCOLOR */
unsigned short r, g, b, a;
@@ -179,8 +186,9 @@ PrintRENDERCOLOR(buf)
return(8);
}
-PrintFIXED(buf)
- unsigned char *buf;
+static int
+PrintFIXED (
+ unsigned char *buf)
{
/* print a PICTURE */
long n = ILong (buf);
@@ -188,8 +196,9 @@ PrintFIXED(buf)
return 4;
}
-PrintPOINTFIXED(buf)
- unsigned char *buf;
+static int
+PrintPOINTFIXED (
+ unsigned char *buf)
{
long x = ILong (buf);
long y = ILong (buf+4);
@@ -197,8 +206,9 @@ PrintPOINTFIXED(buf)
return 8;
}
-PrintTRAPEZOID(buf)
- unsigned char *buf;
+static int
+PrintTRAPEZOID (
+ unsigned char *buf)
{
/* print a TRAPEZOID */
PrintField (buf, 0, 4, FIXED, "top");
@@ -210,8 +220,9 @@ PrintTRAPEZOID(buf)
return 40;
}
-PrintTRIANGLE(buf)
- unsigned char *buf;
+static int
+PrintTRIANGLE (
+ unsigned char *buf)
{
/* print a TRIANGLE */
PrintField (buf, 0, 8, POINTFIXED, "p1");
@@ -220,10 +231,11 @@ PrintTRIANGLE(buf)
return 24;
}
-InitializeRENDER(buf)
- unsigned char *buf;
+void
+InitializeRENDER (
+ unsigned char *buf)
{
- TYPE p, DefineType ();
+ TYPE p;
RENDERRequest = (unsigned char)(buf[9]);
RENDERError = (unsigned char)(buf[11]);