Conversation
otherwise windows will turn every \n into a \r\n tuple, which when output later gives mixed line endings in the output file.
several fixes are needed for PellesC:
- before including stdio.h we need a magic define to get fmemopen()
prototype
to produce include file PellesC can then actually use we need to
- add size for unsigned char[] member, otherwise PellesC throws error
#2139 - too many initializers.
- turn string literal data into { 0, 1, 2...} style numeric array for
unsigned char[] member.
theoretically, form2hdr could have been compiled with a different
compiler, but we simply assume that when it is used it's used for
both form2hdr compilation and for files generated by it.
this makes sure our \n's come out as \n, not \r\n, so output of lex is identical whether it was compiled for windos or a proper OS, i.e. using proper unix line endings.
and WEOF is actually the right to use in combination with getwc(). we should actually also use wint_t rather than int to pick widechars off the input stream, but this remains on the TODO list for now.
- let user specify config.mak to override defaults
- add a couple variables so config.mak can contain the following
setup for my pellescc[0] project:
ifeq ($(WIN),1)
CC = pellescc
AR = pellesar
RANLIB = true
HOSTRUN = wine
EXE_EXT = .exe
endif
and make WIN=1 then does the right thing.
[0]: https://github.com/rofl0r/pellescc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #4