carbon-config

config submodule of carbon-core-system
git clone https://ccx.te2000.cz/git/carbon-config
Log | Files | Refs

common.aat (441B)


      1 |function nl_esc(str) {
      2 |	gsub(/\n/, "\n\t", str)
      3 |	return str
      4 |}
      5 |
      6 |function C(content) {
      7 |	return "\nC\t"nl_esc(content)"\n"
      8 |}
      9 |
     10 |function content_or_rm(content) {
     11 |	print "content_or_rm is broken and deprecated" >"/dev/stderr"
     12 |	print "instead use: <variable|C:\"r\\n\">" >"/dev/stderr"
     13 |	exit 3
     14 |	# return content ? "\nC\t"nl_esc(content) : "\tr"
     15 |}
     16 |
     17 |function escape_regex(re) {
     18 |	gsub(/[][)(\\\/*+?.]/, "\\\\&", re)
     19 |   return re
     20 |}