Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Visibility changes for future DSO and add a buffer I forgot

  • Loading branch information...
commit aaef489697d479dde3dd93e08d7895ba7fa11007 1 parent f063297
@tene authored
View
2  Makefile
@@ -1,4 +1,4 @@
-CFLAGS := -Wall -Werror -g -ggdb -std=c99 -I. -ltinfo
+CFLAGS := -Wall -Werror -g -ggdb -fvisibility=hidden -std=c99 -I. -ltinfo
OBJS := npraises.o gridfluid.o
PROGS := test
View
2  gridfluid.c
@@ -11,6 +11,7 @@ struct gridfluid {
uint8_t y;
float gravity;
gridfluid_cell_t *grid;
+ gridfluid_cell_t *nextgrid;
};
#define GF_CELL(gf,cx,cy) (gf->grid[cx + cy*gf->x])
@@ -18,6 +19,7 @@ struct gridfluid {
gridfluid_t gridfluid_create_empty_scene(uint8_t x, uint8_t y) {
gridfluid_t gf = calloc(1, sizeof(struct gridfluid));
gf->grid = calloc(x*y, sizeof(gridfluid_cell_t));
+ gf->nextgrid = calloc(x*y, sizeof(gridfluid_cell_t));
for (uint8_t i = 1; i < x-1; i++) {
for (uint8_t j = 1; j < y-1; j++) {
gridfluid_set_empty(gf, i, j);
View
4 gridfluid.h
@@ -3,6 +3,8 @@
#include <stdint.h>
+#pragma GCC visibility push(default)
+
typedef enum e_gridfluid_state {
GF_BOUNDARY,
GF_EMPTY,
@@ -22,4 +24,6 @@ void gridfluid_set_empty(gridfluid_t gf, uint8_t x, uint8_t y);
void gridfluid_set_gravity(gridfluid_t gf, float g);
uint8_t gridfluid_get_type(gridfluid_t gf, uint8_t x, uint8_t y);
+#pragma GCC visibility pop
+
#endif
View
3  npraises.c
@@ -35,7 +35,8 @@ void set_bg(uint8_t c) {
putp(tiparm(set_a_background, c));
}
-struct termios term_settings;
+static struct termios term_settings;
+
int setup_screen() {
int rv;
struct termios my_settings;
View
4 npraises.h
@@ -6,6 +6,8 @@
#include <stdint.h>
#include <term.h>
+#pragma GCC visibility push(default)
+
uint8_t rgb_f(float r, float g, float b);
uint8_t gray_f(float v);
@@ -20,4 +22,6 @@ void cleanup_screen();
void curs_xy(uint8_t x, uint8_t y);
+#pragma GCC visibility pop
+
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.