Subject: cdl.el - simple CDL utility functions

From: [email-masked] (Ata Etemadi)
Date: Mon, 13 Sep 93 22:20:27 BST

G'Day 

These are two simple functions for manipulating CDL files. CDL is a language
for representing data objects. This language is used by netCDF (Network Common 
Data Format) and HDF-netCDF (Hierarchical Data Format) portable tagged binary
formats. For further information contact [email-masked] or alterna-
tively. ftp to ftp.ncsa.uiuc.edu and look in HDF directory for HDF-netCDF or
unidata.ucar.edu and look in the netCDF directory. My grateful thanks to Jonathan
R. Ferro from CMU for his invaluable help.

	adios
		Ata <(|)>.
;;-----------------------------------------------------------------------------
;;
;; CDL utility functions for Gnu Emacs
;;
;; Copyright (C) 1993    Ataollah Etemadi,
;;                       Space and Atmospheric Physics Group,
;;                       Blackett Laboratory,
;;                       Imperial College of Science, Technology and Medicine
;;                       Prince Consort Road,
;;                       London SW7 2BZ.
;;
;;    This program is free software; you can redistribute it and/or
;;    modify it under the terms of the GNU General Public License as
;;    published by the Free Software Foundation; either version 1, or
;;    any later version.
;;
;;    This program is distributed in the hope that it will be useful,
;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;    GNU General Public License for more details.
;;
;;    You should have received a copy of the GNU General Public License
;;    along with this program; if not, write to the Free Software
;;    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;;
;;    Note: This program has been exempted from the requirement of
;;          paragraph 2c of the General Public License.
;;
;;-----------------------------------------------------------------------------

(defun cdl-get-file (filename)
    "Run input through ncdump and insert contents of file into buffer after 
     point. Return to start of insert"
  (interactive "fCDF file: ")
          (message "ncdump in progress...")
          (setq start (point))
          (call-process  "ncdump" nil t nil (expand-file-name filename))
          (goto-char start)
          (message "done.")
)  ; end-defun

(defun cdl-put-region (filename)
    "Run region through ncgen and insert results into a new buffer."
  (interactive "FNew CDF file: ")
          (message "ncgen in progress...")
          (setq start (point))
          (setq end   (mark))
  (call-process-region
            start end "ncgen" nil nil nil "-o" (expand-file-name filename))
          (message "done.")
)  ; end-defun

Keywords: 

-- 
| Mail          Dr Ata Etemadi, Blackett Laboratory,                          |
|               Space and Atmospheric Physics Group,                          |
|               Imperial College of Science, Technology, and Medicine,        |
|               Prince Consort Road, London SW7 2BZ, ENGLAND                  |
| Internet/Arpanet/Earn/Bitnet [email-masked] or [email-masked]  |
| Span                              SPVA::atae       or     MSSLC:atae        |
| UUCP/Usenet                       [email-masked]        |