File: ex2.lua

package info (click to toggle)
luasocket 3.0~rc1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,144 kB
  • ctags: 995
  • sloc: ansic: 4,059; makefile: 268; sh: 116
file content (11 lines) | stat: -rw-r--r-- 233 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
function filter.cycle(lowlevel, context, extra)
  return function(chunk)
    local ret
    ret, context = lowlevel(context, chunk, extra)
    return ret
  end
end

function normalize(marker)
  return filter.cycle(eol, 0, marker)
end