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