#!/bin/sed # # x2p.sed # # sed script to fix older versions of xpm so pbmplus understands # also to remove any extra comments which may also confuse pbm. # # create the appropiate header 1i\ /* XPM */\ static char *icon[] = { # extra spaces, comments, and blank lines s/^[ ]*"/"/g /^[^"]/ s/\/\*.*\*\///g /^[ ]*$/ d /^static\>/ d # some funny business with old xpms /^!/ d /^[^\/"}]/ s/.*/"&",/ # rename the transparent color to white s/\([smgc]\) *[Tt]ransparent\>/\1 white/g s/\([smgc]\) *[Nn]one\>/\1 white/g s/#[Tt]ransparent/white/g s/#[Nn]one/white/g