diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2011-12-31 20:29:08 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2011-12-31 20:29:08 +0000 |
commit | ba03cb4aea212553f47a9da672fdd897e9f2e620 (patch) | |
tree | 27a03c72fa0a4416ad32c338947234f46aa7d296 /apps/plugins/chessbox/chessbox_pgn.c | |
parent | c003d6c3328a59d071c2497b72b3e926be086530 (diff) | |
download | rockbox-ba03cb4aea212553f47a9da672fdd897e9f2e620.tar.gz rockbox-ba03cb4aea212553f47a9da672fdd897e9f2e620.zip |
Make local functions static in clock and chessbox plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31505 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/chessbox/chessbox_pgn.c')
-rw-r--r-- | apps/plugins/chessbox/chessbox_pgn.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index 846ea41847..8b2cb1b2f2 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c | |||
@@ -37,7 +37,7 @@ size_t bufleft; | |||
37 | /* simple function to "allocate" memory in pluginbuffer. | 37 | /* simple function to "allocate" memory in pluginbuffer. |
38 | * (borrowed from dict.c) | 38 | * (borrowed from dict.c) |
39 | */ | 39 | */ |
40 | void *pl_malloc(size_t size) | 40 | static void *pl_malloc(size_t size) |
41 | { | 41 | { |
42 | void *ptr; | 42 | void *ptr; |
43 | ptr = bufptr; | 43 | ptr = bufptr; |
@@ -55,12 +55,12 @@ void *pl_malloc(size_t size) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | /* init function for pl_malloc() */ | 57 | /* init function for pl_malloc() */ |
58 | void pl_malloc_init(void) | 58 | static void pl_malloc_init(void) |
59 | { | 59 | { |
60 | bufptr = rb->plugin_get_buffer(&bufleft); | 60 | bufptr = rb->plugin_get_buffer(&bufleft); |
61 | } | 61 | } |
62 | 62 | ||
63 | void process_tag(struct pgn_game_node* game, char* buffer){ | 63 | static void process_tag(struct pgn_game_node* game, char* buffer){ |
64 | char tag_type[20]; | 64 | char tag_type[20]; |
65 | char tag_value[255]; | 65 | char tag_value[255]; |
66 | short pos=0, pos2=0; | 66 | short pos=0, pos2=0; |
@@ -95,7 +95,7 @@ void process_tag(struct pgn_game_node* game, char* buffer){ | |||
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | unsigned short get_next_token(const char* line_buffer, unsigned short initial_pos, | 98 | static unsigned short get_next_token(const char* line_buffer, unsigned short initial_pos, |
99 | char* token_buffer){ | 99 | char* token_buffer){ |
100 | unsigned short pos, token_pos=0; | 100 | unsigned short pos, token_pos=0; |
101 | for (pos = initial_pos;line_buffer[pos] == ' ' || line_buffer[pos] == '.';pos++); | 101 | for (pos = initial_pos;line_buffer[pos] == ' ' || line_buffer[pos] == '.';pos++); |
@@ -112,7 +112,7 @@ unsigned short get_next_token(const char* line_buffer, unsigned short initial_po | |||
112 | return pos; | 112 | return pos; |
113 | } | 113 | } |
114 | 114 | ||
115 | unsigned short piece_from_pgn(char pgn_piece){ | 115 | static unsigned short piece_from_pgn(char pgn_piece){ |
116 | switch (pgn_piece){ | 116 | switch (pgn_piece){ |
117 | case 'R': | 117 | case 'R': |
118 | return rook; | 118 | return rook; |
@@ -128,7 +128,7 @@ unsigned short piece_from_pgn(char pgn_piece){ | |||
128 | return no_piece; | 128 | return no_piece; |
129 | } | 129 | } |
130 | 130 | ||
131 | char pgn_from_piece(unsigned short piece, unsigned short color){ | 131 | static char pgn_from_piece(unsigned short piece, unsigned short color){ |
132 | char pgn_piece = ' '; | 132 | char pgn_piece = ' '; |
133 | switch (piece){ | 133 | switch (piece){ |
134 | case pawn: | 134 | case pawn: |
@@ -159,7 +159,7 @@ char pgn_from_piece(unsigned short piece, unsigned short color){ | |||
159 | return pgn_piece; | 159 | return pgn_piece; |
160 | } | 160 | } |
161 | 161 | ||
162 | void pgn_to_coords(struct pgn_ply_node* ply){ | 162 | static void pgn_to_coords(struct pgn_ply_node* ply){ |
163 | unsigned short str_length = rb->strlen(ply->pgn_text); | 163 | unsigned short str_length = rb->strlen(ply->pgn_text); |
164 | char str[10]; | 164 | char str[10]; |
165 | rb->strcpy(str,ply->pgn_text); | 165 | rb->strcpy(str,ply->pgn_text); |
@@ -354,7 +354,7 @@ void pgn_to_coords(struct pgn_ply_node* ply){ | |||
354 | color[locn[ply->row_from][ply->column_from]] = neutral; | 354 | color[locn[ply->row_from][ply->column_from]] = neutral; |
355 | } | 355 | } |
356 | 356 | ||
357 | void coords_to_pgn(struct pgn_ply_node* ply){ | 357 | static void coords_to_pgn(struct pgn_ply_node* ply){ |
358 | int pos = 0,i,j; | 358 | int pos = 0,i,j; |
359 | unsigned short moving_piece = board[locn[ply->row_from][ply->column_from]]; | 359 | unsigned short moving_piece = board[locn[ply->row_from][ply->column_from]]; |
360 | char unambiguous_position; | 360 | char unambiguous_position; |
@@ -545,7 +545,7 @@ static const char* get_game_text(int selected_item, void *data, | |||
545 | return buffer; | 545 | return buffer; |
546 | } | 546 | } |
547 | 547 | ||
548 | void write_pgn_token(int fhandler, char *buffer, size_t *line_length){ | 548 | static void write_pgn_token(int fhandler, char *buffer, size_t *line_length){ |
549 | if (*line_length + rb->strlen(buffer) + 1 > 80){ | 549 | if (*line_length + rb->strlen(buffer) + 1 > 80){ |
550 | rb->fdprintf(fhandler,"\n"); | 550 | rb->fdprintf(fhandler,"\n"); |
551 | *line_length = 0; | 551 | *line_length = 0; |