;ELC ;;; compiled by cthomp@willow on Wed Aug 25 18:02:07 1993 ;;; from file /era/era-working/editor/lisp/modes/cmacexp.el ;;; emacs version 19.8 (beta8) Lucid. ;;; bytecomp version 2.16; 8-aug-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defvar c-macro-shrink-window-p nil "\ *Non-nil means shrink the *Macroexpansion* window to fit its contents.") (defvar c-macro-always-prompt-p nil "\ *Non-nil means always prompt for preprocessor arguments.") (defvar c-macro-preprocessor "/lib/cpp -C" "\ The preprocessor used by the cmacexp package. If you change this, be sure to preserve the -C (don't strip comments) option, or to set an equivalent one.") (defvar c-macro-default-cppflags "" "\ Default cpp flags used by c-macro-expand.") (byte-code "‡" ["*Macroexpansion*" c-macro-buffer-name nil] 1) (fset 'c-macro-expand #[(start end &optional flag) "?p\n ! ! \n˚\"\n =!! !t !Q# P!\n`U| c )q!  c! Ș! !!," [flag (16) subst inbuf get-buffer c-macro-buffer-name get-buffer-create displaybuf "" expansion c-macro-always-prompt-p (16) read-string "Preprocessor arguments: " c-macro-default-cppflags buffer-read-only message "Buffer is read only: displaying expansion in alternate window" sit-for 2 nil c-macro-default-message c-macro-expansion start end c-macro-preprocessor " " "done" exchange exchange-point-and-mark buffer-disable-undo erase-buffer set-buffer-modified-p "Null expansion" c-macro-display-buffer t bury-buffer] 6 "\ Expand all C macros occurring in the region using c-macro-preprocessor. Normally display output in temp buffer. Prefix arg means replace the region with it. Prompt for a string of arguments to the preprocessor, (e.g. -DDEBUG -I ./include) when prefixed with two C-u's. It is intended for interactive use only. For non interactive use, see the c-macro-expansion function." "r\nP"]) (fset 'c-macro-display-buffer #[(retbuf) "eb ! p!! \n \np\" U? !\n ҉p!!\n  ٥!\\]^ Z!eb!,," [c-mode require view window-height get-buffer-window nil boundp view-kill-when-finished niceview popped alreadythere oldwinheight display-buffer t view-mode 1 c-macro-shrink-window-p selected-window 0 maxheight minheight oldwin select-window window-min-height screen-height 2 enlarge-window vertical-motion 1000000] 5]) (fset 'c-macro-expansion #[(start end cppcommand) "p!\n !\n\"\nƕO  \n   Ύ~ q ! #)c#`\"ݚnƕb`\"\n\n # B @cxcƔbG`\"nԪ\\\n\"##8$#8&#8($骅&\n #$骅&(, B @cxcd1P& !  @#! A k``dZ]{." [get-buffer-create " *C Macro Expansion*" buffer-file-name string-match regexp-quote default-directory 0 nil buffer-name linelist linenum filename outbuf inbuf ((kill-buffer outbuf)) buffer-read-only erase-buffer set-syntax-table c-mode-syntax-table insert-buffer-substring 1 end " " re-search-backward "\n#\\(endif\\|else\\)\\>" start move 3 parse-partial-sexp (nil nil nil 0) count-lines format "\n# %d \"%s\"\n" "^#" "line" startstat startinstring 4 startincomment 5 startafterquote "\"" "*/" "/*" "\\" call-process-region "sh" t "-c" cppcommand " 2>/dev/null" reverse search-backward replace-match ""] 11 "\ Expands the region between START and END in the current buffer using the shell command CPPCOMMAND (e.g. \"/lib/cpp -C -DDEBUG\"). Be sure to use a -C (don't strip comments) or equivalent option. Returns the output as a string."]) (fset 'c-macro-eval #[(start end &optional flag) "!! ƚ \" t !  Q#!Վq ct! E!) !#[!!!)#{똫!j!dctd\" ! ," [fboundp calc-eval require calc c-macro-always-prompt-p flag (16) read-string "Preprocessor arguments: " c-macro-default-cppflags message c-macro-default-message c-macro-expansion start end c-macro-preprocessor " " get-buffer-create " *Macro Evaluation*" evalbuf evaluation ((kill-buffer evalbuf)) nil buffer-read-only erase-buffer "Invoking calc..." t calc-eval-error buffer-string calc-language c calc-simplify-mode binary "(u)" " == " calc-word-size "(d)" calc-number-radix 16 "(x)" re-search-forward "0x\\([^,]+\\)\\(, \\|\\'\\)" 1 "0" replace-match "FALSE\\2" "TRUE\\2" copy-region-as-kill] 14 "\ Expand region using cpp and evaluate it using calc. Interactively print value in minibuffer and push it on the kill ring. With a C-u argument shows the evaluation in a variety of formats. With two C-u's prompts the user for a string of flags to the preprocessor. Non interactively returns value of region between START and END as a string. Several formats are used if optional FLAG is non-nil." "r\nP"]) (byte-code "M!" [c-macro-default-message #[nil "\n ĘĪ $" [format "Invoking %s%s%s on region..." c-macro-preprocessor c-macro-default-cppflags "" " "] 5] provide cmacexp] 2)