File: patch.rb

package info (click to toggle)
ruby-pgplot 0.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 496 kB
  • sloc: ruby: 1,625; makefile: 77; ansic: 57; sh: 17
file content (16 lines) | stat: -rw-r--r-- 288 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'fileutils'

$src_dir = ARGV[0] || 'pgplot'

fnw = File.join($src_dir,"drivers/pndriv.c")
fnr = fnw + ".orig"

FileUtils.mv(fnw,fnr)

open(fnr,"rt") do |r|
  open(fnw,"wt") do |w|
    while s = r.gets
      w.print s.sub(/png_ptr->jmpbuf/,"png_jmpbuf(png_ptr)")
    end
  end
end