Commit bcd03d62 authored by PoroCYon's avatar PoroCYon Committed by PoroCYon
Browse files

Changed all occurrences of \r\n into \n

parent 2521c33c
......@@ -10,9 +10,11 @@
<RootNamespace>glsl_minifier</RootNamespace>
<AssemblyName>shader_minifier</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Name>Shader Minifier</Name>
<TargetFrameworkProfile />
<TargetFSharpCoreVersion>4.3.0.0</TargetFSharpCoreVersion>
<TargetFSharpCoreVersion>4.0.0.0</TargetFSharpCoreVersion>
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
......@@ -89,4 +91,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
</Project>
......@@ -32,14 +32,14 @@ let printHeader data asAList =
if not asAList then
fprintfn out "#ifndef %s" macroName
fprintfn out "# define %s" macroName
fprintfn out "#define %s" macroName
for ty, name, newName in List.sort !exportedValues do
// let newName = Printer.identTable.[int newName]
if ty = "" then
fprintfn out "# define VAR_%s \"%s\"" (name.ToUpper()) newName
fprintfn out "#define VAR_%s \"%s\"" (name.ToUpper()) newName
else
fprintfn out "# define %c_%s \"%s\"" (System.Char.ToUpper ty.[0]) (name.ToUpper()) newName
fprintfn out "#define %c_%s \"%s\"" (System.Char.ToUpper ty.[0]) (name.ToUpper()) newName
fprintfn out ""
for file, code in data do
......@@ -48,7 +48,7 @@ let printHeader data asAList =
fprintfn out "// %s" file
fprintfn out "\"%s\"," (Printer.print code)
else
fprintfn out "const char *%s =\r\n \"%s\";" name (Printer.print code)
fprintfn out "const char *%s =\n \"%s\";" name (Printer.print code)
fprintfn out ""
if not asAList then fprintfn out "#endif // %s" macroName
......@@ -74,7 +74,7 @@ let printJSHeader data =
fprintfn out ""
for file, code in data do
let name = (Path.GetFileName file).Replace(".", "_")
fprintfn out "var %s =\r\n \"%s\"" name (Printer.print code)
fprintfn out "var %s =\n \"%s\"" name (Printer.print code)
fprintfn out ""
let printNasmHeader data =
......@@ -92,7 +92,7 @@ let printNasmHeader data =
fprintfn out ""
for file, code in data do
let name = (Path.GetFileName file).Replace(".", "_")
fprintfn out "_%s:\r\n\tdb '%s', 0" name (Printer.print code)
fprintfn out "_%s:\n\tdb '%s', 0" name (Printer.print code)
fprintfn out ""
let print data = function
......
......@@ -157,9 +157,9 @@ let nl =
else
match targetOutput with
| Text -> ""
| CHeader | CList -> out "\"\r\n%s\"" wh.[0 .. 2 * n]
| JS -> out "\" +\r\n%s\"" wh.[0 .. 2 * n]
| Nasm -> out "'\r\n\tdb%s'" wh.[0 .. 2 * n]
| CHeader | CList -> out "\"\n%s\"" wh.[0 .. 2 * n]
| JS -> out "\" +\n%s\"" wh.[0 .. 2 * n]
| Nasm -> out "'\n\tdb%s'" wh.[0 .. 2 * n]
let escape (s: string) =
match targetOutput with
......
......@@ -52,7 +52,7 @@ let stripSpaces str =
write c
space <- false
if macro then result.Append("\n") |> ignore
if macro then result.Append('\n') |> ignore
result.ToString()
let hasInlinePrefix (s:string) = s.StartsWith("i_")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment