File: errcodes.lua

package info (click to toggle)
postgresql-pllua 1%3A2.0.10-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,316 kB
  • sloc: ansic: 14,369; sql: 2,181; makefile: 163; sh: 59; javascript: 38
file content (11 lines) | stat: -rw-r--r-- 269 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
-- errcodes.lua

local fn = ...
for line in io.lines(fn) do
	if line:match("^[^#%s]") and not line:match("^Section:") then
		local f1,f2,f3,f4 = line:match("^(%S+)%s+(%S+)%s+(%S+)%s+(%S+)%s*$")
		if f4 then
			io.write("{\n    \"",f4,"\", ",f3,"\n},\n")
		end
	end
end