summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/eolian/main.c3
-rw-r--r--src/lib/eolian/eo_lexer.c10
-rw-r--r--src/lib/eolian/eo_lexer.rl10
3 files changed, 23 insertions, 0 deletions
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index c15c890830..538d2de395 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -155,6 +155,9 @@ _generate_impl_c_file(char *filename, const Eolian_Class class)
155 fd = NULL; 155 fd = NULL;
156 156
157 buffer = eina_strbuf_manage_new(content); 157 buffer = eina_strbuf_manage_new(content);
158#ifdef _WIN32
159 eina_strbuf_replace_all(buffer, "\r\n", "\n");
160#endif
158 } 161 }
159 else 162 else
160 buffer = eina_strbuf_new(); 163 buffer = eina_strbuf_new();
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 5bae114fde..f172da9bc5 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -4512,6 +4512,16 @@ eo_tokenizer_database_fill(const char *filename)
4512 goto end; 4512 goto end;
4513 } 4513 }
4514 4514
4515 buffer[len] = '\0';
4516#if _WIN32
4517 {
4518 Eina_Strbuf *str_buffer = eina_strbuf_manage_new(buffer);
4519 if (eina_strbuf_replace_all(str_buffer, "\r\n", "\n"))
4520 len = eina_strbuf_length_get(str_buffer);
4521 buffer = eina_strbuf_string_steal(str_buffer);
4522 eina_strbuf_free(str_buffer);
4523 }
4524#endif
4515 if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end; 4525 if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
4516 4526
4517 if (!toknz->classes) 4527 if (!toknz->classes)
diff --git a/src/lib/eolian/eo_lexer.rl b/src/lib/eolian/eo_lexer.rl
index 2a6f4986ed..26227d7a6b 100644
--- a/src/lib/eolian/eo_lexer.rl
+++ b/src/lib/eolian/eo_lexer.rl
@@ -1378,6 +1378,16 @@ eo_tokenizer_database_fill(const char *filename)
1378 goto end; 1378 goto end;
1379 } 1379 }
1380 1380
1381 buffer[len] = '\0';
1382#if _WIN32
1383 {
1384 Eina_Strbuf *str_buffer = eina_strbuf_manage_new(buffer);
1385 if (eina_strbuf_replace_all(str_buffer, "\r\n", "\n"))
1386 len = eina_strbuf_length_get(str_buffer);
1387 buffer = eina_strbuf_string_steal(str_buffer);
1388 eina_strbuf_free(str_buffer);
1389 }
1390#endif
1381 if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end; 1391 if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
1382 1392
1383 if (!toknz->classes) 1393 if (!toknz->classes)