Permalink
Browse files

Nuked more windows newlines.

Moved str_brick_names into strings.c and made it extern instead.
  • Loading branch information...
1 parent 8aa1af4 commit d473b85321289d85c618c6239efcf8675cdc52d2 @DusteDdk committed Jun 7, 2012
Showing with 20 additions and 17 deletions.
  1. +18 −15 strings.c
  2. +2 −2 strings.h
View
33 strings.c
@@ -18,6 +18,9 @@
#include "strings.h"
#include <string.h>
+// We reuse the "Reserved/blocker" brick as a "Remove" icon in the mousedriven editor.
+const char* str_brick_names[] = { "Nobrick", "Brick 0", "Brick 1","Brick 2","Brick 3","Brick 4","Brick 5","Brick 6","Brick 7","Brick 8","Brick 9","V. Lift", "H. Lift", "L. Oneway", "R. Oneway", "Glue", "Wall", "Remove", "Teleport" };
+
void stripNewLine(char* str)
{
int i;
@@ -49,18 +52,18 @@ int splitVals(char ch,const char* buf, char* set, char* val)
}
return(0);
}
-
-//Return position of last instance of c
-//Return 0 if none found
-int charrpos(const char* str, char c)
-{
- int i;
- for(i=strlen(str); i != 0; i--)
- {
- if(str[i]==c)
- {
- return(i);
- }
- }
- return(0);
-}
+
+//Return position of last instance of c
+//Return 0 if none found
+int charrpos(const char* str, char c)
+{
+ int i;
+ for(i=strlen(str); i != 0; i--)
+ {
+ if(str[i]==c)
+ {
+ return(i);
+ }
+ }
+ return(0);
+}
View
4 strings.h
@@ -234,8 +234,8 @@
#define STR_EDIT_PREVBRICK_KEY "Ctrl"
#endif
-//We reuse the "Reserved/blocker" brick as a "Remove" icon in the mousedriven editor.
-static const char* str_brick_names[] = { "Nobrick", "Brick 0", "Brick 1","Brick 2","Brick 3","Brick 4","Brick 5","Brick 6","Brick 7","Brick 8","Brick 9","V. Lift", "H. Lift", "L. Oneway", "R. Oneway", "Glue", "Wall", "Remove", "Teleport" };
+//This is defined in strings.c
+extern const char* str_brick_names[];
#ifdef PANDORA /// added by farox for pandora port
#define STR_EDIT_PRESS_EXIT_TO_EXIT "Press START to exit without saving."

0 comments on commit d473b85

Please sign in to comment.