1# Zile-specific library functions 2# 3# Copyright (c) 2010 Free Software Foundation, Inc. 4# 5# This file is part of GNU Zile. 6# 7# GNU Zile is free software; you can redistribute it and/or modify it 8# under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 3, or (at your option) 10# any later version. 11# 12# GNU Zile is distributed in the hope that it will be useful, but 13# WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15# General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with GNU Zile; see the file COPYING. If not, write to the 19# Free Software Foundation, Fifth Floor, 51 Franklin Street, Boston, 20# MA 02111-1301, USA. 21 22 23# Parse re-usable C headers 24sub false { 0; } 25sub true { 1; } 26sub X { @xarg = @_; } 27$D = $O = $A = \&X; 28 29# Turn texinfo markup into plain text 30sub texi { 31 my ($s) = @_; 32 $s =~ s/\@i\{([^}]+)}/uc($1)/ge; 33 $s =~ s/\@kbd\{([^}]+)}/\1/g; 34 $s =~ s/\@samp\{([^}]+)}/\1/g; 35 $s =~ s/\@itemize%s[^\n]*\n//g; 36 $s =~ s/\@end%s[^\n]*\n//g; 37 return $s; 38} 39