Navigation Menu

Skip to content

Commit

Permalink
[svn] Endline string wankery.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Mar 27, 2008
1 parent c2c742e commit a12357e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mojoshader.c
Expand Up @@ -56,6 +56,13 @@ typedef int32_t int32;

#define STATICARRAYLEN(x) ( (sizeof ((x))) / (sizeof ((x)[0])) )

#ifdef _WINDOWS // !!! FIXME: bleh
const char *endline_str = "\r\n";
#else
const char *endline_str = "\n";
#endif



// Byteswap magic...

Expand Down Expand Up @@ -2496,8 +2503,8 @@ static Context *build_context(const char *profile,
ctx->free = f;
ctx->tokens = (const uint32 *) tokenbuf;
ctx->tokencount = bufsize / sizeof (uint32);
ctx->endline = "\n";
ctx->endline_len = 1; // !!! FIXME: do "\r\n" on Windows?
ctx->endline = endline_str;
ctx->endline_len = strlen(ctx->endline);
ctx->output.str = NULL;
ctx->output.next = NULL;
ctx->output_tail = &ctx->output;
Expand Down

0 comments on commit a12357e

Please sign in to comment.