changeset 1091:988a3397839e

Move functions around for saner order.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 02 Mar 2015 20:30:25 +0200
parents e0fb6fa1c689
children 03322ee5bb32
files src/dmbstr.c
diffstat 1 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmbstr.c	Mon Mar 02 20:28:25 2015 +0200
+++ b/src/dmbstr.c	Mon Mar 02 20:30:25 2015 +0200
@@ -7,12 +7,6 @@
 #include "dmbstr.h"
 
 
-static BOOL dmPutByteFILE(DMBitStreamContext *ctx, const Uint8 val)
-{
-    return fputc(val, (FILE *) ctx->fp) == val;
-}
-
-
 void dmInitBitStreamContext(DMBitStreamContext *ctx)
 {
     ctx->outBuf       = 0;
@@ -21,20 +15,6 @@
 }
 
 
-int dmInitBitStreamFILE(DMBitStreamContext *ctx, FILE *fp)
-{
-    if (ctx == NULL || fp == NULL)
-        return DMERR_NULLPTR;
-
-    ctx->putByte = dmPutByteFILE;
-    ctx->fp      = (void *) fp;
-
-    dmInitBitStreamContext(ctx);
-
-    return DMERR_OK;
-}
-
-
 BOOL dmPutBits(DMBitStreamContext *ctx, const int val, const int n)
 {
     int i;
@@ -74,3 +54,23 @@
   
   return 0;
 }
+
+
+static BOOL dmPutByteFILE(DMBitStreamContext *ctx, const Uint8 val)
+{
+    return fputc(val, (FILE *) ctx->fp) == val;
+}
+
+
+int dmInitBitStreamFILE(DMBitStreamContext *ctx, FILE *fp)
+{
+    if (ctx == NULL || fp == NULL)
+        return DMERR_NULLPTR;
+
+    ctx->putByte = dmPutByteFILE;
+    ctx->fp      = (void *) fp;
+
+    dmInitBitStreamContext(ctx);
+
+    return DMERR_OK;
+}