comparison lisp/progmodes/ebnf2ps.el @ 88123:375f2633d815

New directory
author Kenichi Handa <handa@m17n.org>
date Mon, 08 Sep 2003 11:56:09 +0000
parents 695cf19ef79e
children 68c22ea6027c
comparison
equal deleted inserted replaced
52428:27bc8b966642 88123:375f2633d815
3 ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 3 ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
4 4
5 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> 5 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
6 ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br> 6 ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
7 ;; Keywords: wp, ebnf, PostScript 7 ;; Keywords: wp, ebnf, PostScript
8 ;; Time-stamp: <2003/08/08 23:09:36 vinicius> 8 ;; Time-stamp: <2003-02-10 10:40:14 jbarranquero>
9 ;; Version: 3.6.1 9 ;; Version: 3.6.1
10 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ 10 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
11 11
12 ;; This file is part of GNU Emacs. 12 ;; This file is part of GNU Emacs.
13 13
3592 (defsubst ebnf-message-float (format-str value) 3592 (defsubst ebnf-message-float (format-str value)
3593 (message format-str 3593 (message format-str
3594 (format ebnf-message-float value))) 3594 (format ebnf-message-float value)))
3595 3595
3596 3596
3597 (defvar ebnf-total 0)
3598 (defvar ebnf-nprod 0)
3599
3600
3601 (defsubst ebnf-message-info (messag) 3597 (defsubst ebnf-message-info (messag)
3602 (message "%s...%3d%%" 3598 (message "%s...%3d%%"
3603 messag 3599 messag
3604 (round (/ (* (setq ebnf-nprod (1+ ebnf-nprod)) 100.0) ebnf-total)))) 3600 (round (/ (* (setq ebnf-nprod (1+ ebnf-nprod)) 100.0) ebnf-total))))
3605 3601
3816 'ebnf-generate-postscript))) 3812 'ebnf-generate-postscript)))
3817 3813
3818 3814
3819 (defvar ebnf-tree nil) 3815 (defvar ebnf-tree nil)
3820 (defvar ebnf-direction "R") 3816 (defvar ebnf-direction "R")
3817 (defvar ebnf-total 0)
3818 (defvar ebnf-nprod 0)
3821 3819
3822 3820
3823 (defun ebnf-generate-postscript (from to) 3821 (defun ebnf-generate-postscript (from to)
3824 (ebnf-begin-file) 3822 (ebnf-begin-file)
3825 (if ebnf-horizontal-max-height 3823 (if ebnf-horizontal-max-height
4266 (defsubst ebnf-font-height (font) 4264 (defsubst ebnf-font-height (font)
4267 (ebnf-font-select font 'line-height)) 4265 (ebnf-font-select font 'line-height))
4268 4266
4269 4267
4270 (defun ebnf-begin-job () 4268 (defun ebnf-begin-job ()
4271 (ps-printing-region nil nil nil) 4269 (ps-printing-region nil nil)
4272 (if ebnf-use-float-format 4270 (if ebnf-use-float-format
4273 (setq ebnf-format-float "%1.3f" 4271 (setq ebnf-format-float "%1.3f"
4274 ebnf-message-float "%3.2f") 4272 ebnf-message-float "%3.2f")
4275 (setq ebnf-format-float "%s" 4273 (setq ebnf-format-float "%s"
4276 ebnf-message-float "%s")) 4274 ebnf-message-float "%s"))
5294 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 5292 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5295 5293
5296 5294
5297 (provide 'ebnf2ps) 5295 (provide 'ebnf2ps)
5298 5296
5299 ;;; arch-tag: 148bc8af-5398-468b-b922-eeb7afef3e4f
5300 ;;; ebnf2ps.el ends here 5297 ;;; ebnf2ps.el ends here