]> git.sesse.net Git - fjl/blobdiff - input.h
Enable -Wall -Wextra.
[fjl] / input.h
diff --git a/input.h b/input.h
index aa4c337ca8304c6b40ba13367b00ccfd8c6b0ea7..19315e54ab3c357ceaf1f16f96f310caace75b76 100644 (file)
--- a/input.h
+++ b/input.h
@@ -87,4 +87,10 @@ static inline unsigned read_bits(struct bit_source* source, unsigned num_bits)
        return ret;
 }
 
+static inline unsigned peek_bits(struct bit_source* source, unsigned num_bits)
+{
+       assert(source->bits_available >= num_bits);
+       return (source->bits >> (BITRESERVOIR_SIZE - num_bits));
+}
+
 #endif /* !defined(_INPUT_H) */