]> git.proxmox.com Git - mirror_ovs.git/blob - build-aux/text2c
Remove support for OpenFlow 1.6 (draft).
[mirror_ovs.git] / build-aux / text2c
1 #! /usr/bin/python
2
3 import re
4 import sys
5
6 """This utility reads its input, which should be plain text, and
7 prints it back transformed into quoted strings that may be #included
8 into C source code."""
9
10 while True:
11 line = sys.stdin.readline()
12 if not line:
13 break
14
15 s = line.replace("\\", "\\\\").replace('"', '\\"').replace("\n", "\\n")
16 print('"' + s + '"')