Re: [Zope] Backslash as line continuation in C (Unix)
Hung Jung Lu writes:
... I ran into troubles in the compilation process because of the usage of backslash \ as line continuation. (This is used in #def preprocessor macro statements.) When I remove the backslashes and join the lines, it compiles fine....
Does anyone know any other better solution than go into the code and explicitly remove the backslashes? Is there any gcc option that recognizes backslashes are line-joining characters? Or is there another character used in gcc for joining lines? Any other suggestions? Backslashes *ARE* line-joining characters for gcc -- without any options!
I expect, that your backslashes are not immediately followed by "\n" (not "\r\n"!). Then, they would not be "line joining"! This very easily happens, if you transfer a Windows source onto a Unix system. I do not know, which editor you are using under Linux. If you use "vim", then you would not see the "\r" preceeding the "\n" but you would see a "textmode" in the status line. Use ":set notextmode" and then write the file back. This would remove the "\r". You may use the "tr" utility, too, for the "\r" removal, once you determined that this indeed is the problem. Dieter
participants (1)
-
Dieter Maurer