Comparison

util-src/ringbuffer.c @ 7835:a809dcfd0c5b

util-src/*.c: Squeeze repeated blank lines
author Kim Alvefur <zash@zash.se>
date Mon, 23 Jan 2017 18:33:35 +0100
parent 7828:b4a08a514ebc
child 7888:74187ee6ed55
comparison
equal deleted inserted replaced
7834:a2081d28bd22 7835:a809dcfd0c5b
1
2 1
3 #include <stdlib.h> 2 #include <stdlib.h>
4 #include <unistd.h> 3 #include <unistd.h>
5 #include <string.h> 4 #include <string.h>
6 #include <stdio.h> 5 #include <stdio.h>
71 } 70 }
72 71
73 return 0; 72 return 0;
74 } 73 }
75 74
76
77 int rb_read(lua_State* L) { 75 int rb_read(lua_State* L) {
78 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt"); 76 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt");
79 int r = luaL_checkinteger(L, 2); 77 int r = luaL_checkinteger(L, 2);
80 int peek = lua_toboolean(L, 3); 78 int peek = lua_toboolean(L, 3);
81 79
98 modpos(b); 96 modpos(b);
99 } 97 }
100 98
101 return 1; 99 return 1;
102 } 100 }
103
104 101
105 int rb_readuntil(lua_State* L) { 102 int rb_readuntil(lua_State* L) {
106 size_t l, m; 103 size_t l, m;
107 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt"); 104 ringbuffer* b = luaL_checkudata(L, 1, "ringbuffer_mt");
108 const char* s = luaL_checklstring(L, 2, &l); 105 const char* s = luaL_checklstring(L, 2, &l);