Initial revision
[bpt/emacs.git] / lisp / cdl.el
1 ;;; cdl.el -- Common Data Language (CDL) utility functions for Gnu Emacs
2
3 ;; Copyright (C) 1993 Free Software Foundation, Inc.
4
5 ;; This file is part of GNU Emacs.
6
7 ;; GNU Emacs is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 2, or (at your option)
10 ;; any later version.
11
12 ;; GNU Emacs is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
16
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GNU Emacs; see the file COPYING. If not, write to
19 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20
21 ;;; Code:
22
23 (defun cdl-get-file (filename)
24 "Run file through ncdump and insert result into buffer after point."
25 (interactive "fCDF file: ")
26 (message "ncdump in progress...")
27 (let ((start (point)))
28 (call-process "ncdump" nil t nil (expand-file-name filename))
29 (goto-char start))
30 (message "ncdump in progress...done"))
31
32 (defun cdl-put-region (filename start end)
33 "Run region through ncgen and write results into a file."
34 (interactive "FNew CDF file: \nr")
35 (message "ncgen in progress...")
36 (call-process-region start end "ncgen"
37 nil nil nil "-o" (expand-file-name filename))
38 (message "ncgen in progress...done"))
39
40 ;;; cdl.el ends here.