projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aa4eb01
)
removed unused code
author
Holger Schemel
<info@artsoft.org>
Wed, 21 Feb 2024 18:22:47 +0000
(19:22 +0100)
committer
Holger Schemel
<info@artsoft.org>
Wed, 21 Feb 2024 18:22:47 +0000
(19:22 +0100)
src/files.c
patch
|
blob
|
history
diff --git
a/src/files.c
b/src/files.c
index 7b851893f1ab6eea1d5cd808fade44b29f72da5b..d3031fafb1dad2ee066f0f46cd90817bc394896f 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-6196,7
+6196,6
@@
static void LoadLevelFromFileInfo_SB(struct LevelInfo *level,
boolean invalid_playfield_char = FALSE;
boolean load_xsb_to_ces = check_special_flags("load_xsb_to_ces");
int file_level_nr = 0;
boolean invalid_playfield_char = FALSE;
boolean load_xsb_to_ces = check_special_flags("load_xsb_to_ces");
int file_level_nr = 0;
- int line_nr = 0;
int x = 0, y = 0; // initialized to make compilers happy
last_comment[0] = '\0';
int x = 0, y = 0; // initialized to make compilers happy
last_comment[0] = '\0';
@@
-6238,10
+6237,6
@@
static void LoadLevelFromFileInfo_SB(struct LevelInfo *level,
if (!getStringFromFile(file, line, MAX_LINE_LEN))
break;
if (!getStringFromFile(file, line, MAX_LINE_LEN))
break;
- // check if line was completely read and is terminated by line break
- if (strlen(line) > 0 && line[strlen(line) - 1] == '\n')
- line_nr++;
-
// cut trailing line break (this can be newline and/or carriage return)
for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--)
if ((*line_ptr == '\n' || *line_ptr == '\r') && *(line_ptr + 1) == '\0')
// cut trailing line break (this can be newline and/or carriage return)
for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--)
if ((*line_ptr == '\n' || *line_ptr == '\r') && *(line_ptr + 1) == '\0')