Now on revision 108403. ------------------------------------------------------------ revno: 108403 author: Reto Zimmermann committer: Stefan Monnier branch nick: trunk timestamp: Sun 2012-05-27 23:42:18 -0400 message: * lisp/progmodes/vhdl-mode.el: Sync with upstream 3.33.28. http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html#release-notes-3.33 diff: === modified file '.bzrignore' --- .bzrignore 2012-05-12 18:03:18 +0000 +++ .bzrignore 2012-05-28 03:42:18 +0000 @@ -150,3 +150,4 @@ src/gl-stamp lisp/mh-e/mh-autoloads.el lisp/mh-e/mh-cus-load.el +lib/stdalign.h === modified file 'etc/NEWS' --- etc/NEWS 2012-05-26 19:55:07 +0000 +++ etc/NEWS 2012-05-28 03:42:18 +0000 @@ -95,6 +95,12 @@ * Changes in Specialized Modes and Packages in Emacs 24.2 +** VHDL-mode +- Support for ghdl (free vhdl compiler). Now default. +- Add/update support for VHDL-AMS packages. +- Update to VHDL'02 standard. +- Accept \r and \f as whitespace. + ** Diff mode Faces for changes now use the same diff color scheme as in modern VCSes === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-27 17:31:31 +0000 +++ lisp/ChangeLog 2012-05-28 03:42:18 +0000 @@ -1,3 +1,8 @@ +2012-05-28 Stefan Monnier + + * progmodes/vhdl-mode.el: Sync with upstream 3.33.28. + http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html#release-notes-3.33 + 2012-05-27 Juanma Barranquero * version.el (motif-version-string, gtk-version-string) @@ -14,9 +19,9 @@ 2012-05-27 Eli Zaretskii - * mail/sendmail.el (mail-yank-region): Recognize - rmail-yank-current-message in addition to insert-buffer. Fixes - mail-mode's "C-c C-r" that otherwise does nothing when invoked in + * mail/sendmail.el (mail-yank-region): + Recognize rmail-yank-current-message in addition to insert-buffer. + Fixes mail-mode's "C-c C-r" that otherwise does nothing when invoked in a *mail* buffer created through rmail-start-mail with sendmail as mail-user-agent. === modified file 'lisp/progmodes/vhdl-mode.el' --- lisp/progmodes/vhdl-mode.el 2012-04-09 13:05:48 +0000 +++ lisp/progmodes/vhdl-mode.el 2012-05-28 03:42:18 +0000 @@ -13,10 +13,10 @@ ;; filed in the Emacs bug reporting system against this file, a copy ;; of the bug report be sent to the maintainer's email address. -(defconst vhdl-version "3.33.6" +(defconst vhdl-version "3.33.28" "VHDL Mode version number.") -(defconst vhdl-time-stamp "2005-08-30" +(defconst vhdl-time-stamp "2010-09-22" "VHDL Mode time stamp for last update.") ;; This file is part of GNU Emacs. @@ -72,13 +72,13 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Emacs Versions -;; supported: GNU Emacs 20.X/21.X/22.X, XEmacs 20.X/21.X -;; tested on: GNU Emacs 20.4, XEmacs 21.1 (marginally) +;; supported: GNU Emacs 20.X/21.X/22.X,23.X, XEmacs 20.X/21.X +;; tested on: GNU Emacs 20.4/21.3/22.1,23.X, XEmacs 21.1 (marginally) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Installation -;; Prerequisites: GNU Emacs 20.X/21.X/22.X, XEmacs 20.X/21.X. +;; Prerequisites: GNU Emacs 20.X/21.X/22.X/23.X, XEmacs 20.X/21.X. ;; Put `vhdl-mode.el' into the `site-lisp' directory of your Emacs installation ;; or into an arbitrary directory that is added to the load path by the @@ -93,7 +93,7 @@ ;; Add the following lines to the `site-start.el' file in the `site-lisp' ;; directory of your Emacs installation or to your Emacs start-up file `.emacs' -;; (not required in Emacs 20.X): +;; (not required in Emacs 20 and higher): ;; (autoload 'vhdl-mode "vhdl-mode" "VHDL Mode" t) ;; (setq auto-mode-alist (cons '("\\.vhdl?\\'" . vhdl-mode) auto-mode-alist)) @@ -184,7 +184,7 @@ \".*\" \"\" inserts empty string") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; User variables +;; User variables (customization options) (defgroup vhdl nil "Customizations for VHDL Mode." @@ -210,6 +210,17 @@ (defcustom vhdl-compiler-alist '( + ("ADVance MS" "vacom" "-work \\1" "make" "-f \\1" + nil "valib \\1; vamap \\2 \\1" "./" "work/" "Makefile" "adms" + ("\\s-\\([0-9]+\\):" 0 1 0) ("Compiling file \\(.+\\)" 1) + ("ENTI/\\1.vif" "ARCH/\\1-\\2.vif" "CONF/\\1.vif" + "PACK/\\1.vif" "BODY/\\1.vif" upcase)) + ;; Aldec + ;; COMP96 ERROR COMP96_0078: "Unknown identifier "Addr_Bits"." "" 40 30 + ("Aldec" "vcom" "-93 -work \\1" "make" "-f \\1" + nil "vlib \\1; vmap \\2 \\1" "./" "work/" "Makefile" "aldec" + (".+?[ \t]+\\(?:ERROR\\)[^:]+:.+?\\(?:.+\"\\(.+?\\)\"[ \t]+\\([0-9]+\\)\\)" 1 2 0) ("" 0) + nil) ;; Cadence Leapfrog: cv -file test.vhd ;; duluth: *E,430 (test.vhd,13): identifier (POSITIV) is not declared ("Cadence Leapfrog" "cv" "-work \\1 -file" "make" "-f \\1" @@ -225,6 +236,12 @@ ("ncvhdl_p: \\*E,\\w+ (\\(.+\\),\\([0-9]+\\)|\\([0-9]+\\)):" 1 2 3) ("" 0) ("\\1/entity/pc.db" "\\2/\\1/pc.db" "\\1/configuration/pc.db" "\\1/package/pc.db" "\\1/body/pc.db" downcase)) + ;; ghdl vhdl: ghdl test.vhd + ("GHDL" "ghdl" "-i --workdir=\\1 --ieee=synopsys -fexplicit " "make" "-f \\1" + nil "mkdir \\1" "./" "work/" "Makefile" "ghdl" + ("ghdl_p: \\*E,\\w+ (\\(.+\\),\\([0-9]+\\)|\\([0-9]+\\)):" 1 2 3) ("" 0) + ("\\1/entity" "\\2/\\1" "\\1/configuration" + "\\1/package" "\\1/body" downcase)) ;; Ikos Voyager: analyze test.vhd ;; analyze test.vhd ;; E L4/C5: this library unit is inaccessible @@ -236,10 +253,11 @@ ;; ModelSim, Model Technology: vcom test.vhd ;; ERROR: test.vhd(14): Unknown identifier: positiv ;; WARNING[2]: test.vhd(85): Possible infinite loop + ;; ** Warning: [4] ../src/emacsvsim.vhd(43): An abstract ... ;; ** Error: adder.vhd(190): Unknown identifier: ctl_numb ("ModelSim" "vcom" "-93 -work \\1" "make" "-f \\1" nil "vlib \\1; vmap \\2 \\1" "./" "work/" "Makefile" "modelsim" - ("\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*: \\(.+\\)(\\([0-9]+\\)):" 2 3 0) ("" 0) + ("\\(ERROR\\|WARNING\\|\\*\\* Error\\|\\*\\* Warning\\)[^:]*:\\( *\[[0-9]+\]\\)? \\(.+\\)(\\([0-9]+\\)):" 3 4 0) ("" 0) ("\\1/_primary.dat" "\\2/\\1.dat" "\\1/_primary.dat" "\\1/_primary.dat" "\\1/body.dat" downcase)) ;; ProVHDL, Synopsys LEDA: provhdl -w work -f test.vhd @@ -321,6 +339,12 @@ ("\\*\\*Error: LINE \\([0-9]+\\) \\*\\*\\*" 0 1 0) ("^ *Compiling \"\\(.+\\)\" " 1) nil) + ;; Xilinx XST: + ;; ERROR:HDLParsers:164 - "test.vhd" Line 3. parse error + ("Xilinx XST" "xflow" "" "make" "-f \\1" + nil "mkdir \\1" "./" "work/" "Makefile" "xilinx" + ("^ERROR:HDLParsers:[0-9]+ - \"\\(.+\\)\" Line \\([0-9]+\\)\." 1 2 0) ("" 0) + nil) ) "List of available VHDL compilers and their properties. Each list entry specifies the following items for a compiler: @@ -428,7 +452,7 @@ (vhdl-custom-set variable value 'vhdl-update-mode-menu)) :group 'vhdl-compile) -(defcustom vhdl-compiler "ModelSim" +(defcustom vhdl-compiler "GHDL" "Specifies the VHDL compiler to be used for syntax analysis. Select a compiler name from the ones defined in option `vhdl-compiler-alist'." :type (let ((alist vhdl-compiler-alist) list) @@ -450,6 +474,17 @@ :type 'boolean :group 'vhdl-compile) +(defcustom vhdl-makefile-default-targets '("all" "clean" "library") + "List of default target names in Makefiles. +Automatically generated Makefiles include three default targets to compile +the entire design, clean the entire design and to create the design library. +This option allows to change the names of these targets to avoid conflicts +with other user Makefiles." + :type '(list (string :tag "Compile entire design") + (string :tag "Clean entire design ") + (string :tag "Create design library")) + :group 'vhdl-compile) + (defcustom vhdl-makefile-generation-hook nil "Functions to run at the end of Makefile generation. Allows to insert user specific parts into a Makefile. @@ -647,11 +682,11 @@ :group 'vhdl-port :group 'vhdl-compose) -(defcustom vhdl-standard '(87 nil) +(defcustom vhdl-standard '(93 nil) "VHDL standards used. Basic standard: VHDL'87 : IEEE Std 1076-1987 - VHDL'93 : IEEE Std 1076-1993 + VHDL'93/02 : IEEE Std 1076-1993/2002 Additional standards: VHDL-AMS : IEEE Std 1076.1 (analog-mixed-signal) Math packages: IEEE Std 1076.2 (`math_real', `math_complex') @@ -660,7 +695,7 @@ \"Activate Options\"." :type '(list (choice :tag "Basic standard" (const :tag "VHDL'87" 87) - (const :tag "VHDL'93" 93)) + (const :tag "VHDL'93/02" 93)) (set :tag "Additional standards" :indent 2 (const :tag "VHDL-AMS" ams) (const :tag "Math packages" math))) @@ -730,6 +765,14 @@ (const :tag "Always" always)) :group 'vhdl-style) +(defcustom vhdl-array-index-record-field-in-sensitivity-list t + "Non-nil means include array indices / record fields in sensitivity list. +If a signal read in a process is a record field or pointed to by an array +index, the record field or array index is included with the record name in +the sensitivity list (e.g. \"in1(0)\", \"in2.f0\"). +Otherwise, only the record name is included (e.g. \"in1\", \"in2\")." + :type 'boolean + :group 'vhdl-style) (defgroup vhdl-naming nil "Customizations for naming conventions." @@ -916,7 +959,8 @@ The following keywords for template generation are supported: : replaced by the name of the buffer : replaced by the user name and email address - \(`user-full-name', `mail-host-address', `user-mail-address') + \(`user-full-name',`mail-host-address', `user-mail-address') + : replaced by the user full name (`user-full-name') : replaced by user login name (`user-login-name') : replaced by contents of option `vhdl-company-name' : replaced by the current date @@ -999,11 +1043,12 @@ "Customizations for sequential processes." :group 'vhdl-template) -(defcustom vhdl-reset-kind 'async +(defcustom vhdl-reset-kind 'async "Specifies which kind of reset to use in sequential processes." :type '(choice (const :tag "None" none) (const :tag "Synchronous" sync) - (const :tag "Asynchronous" async)) + (const :tag "Asynchronous" async) + (const :tag "Query" query)) :group 'vhdl-sequential-process) (defcustom vhdl-reset-active-high nil @@ -1563,22 +1608,25 @@ :group 'vhdl-highlight) (defcustom vhdl-special-syntax-alist - '(("generic/constant" "\\w+_[cg]" "Gold3" "BurlyWood1") - ("type" "\\w+_t" "ForestGreen" "PaleGreen") - ("variable" "\\w+_v" "Grey50" "Grey80")) + '(("generic/constant" "\\<\\w+_[cg]\\>" "Gold3" "BurlyWood1" nil) + ("type" "\\<\\w+_t\\>" "ForestGreen" "PaleGreen" nil) + ("variable" "\\<\\w+_v\\>" "Grey50" "Grey80" nil)) "List of special syntax to be highlighted. If option `vhdl-highlight-special-words' is non-nil, words with the specified syntax (as regular expression) are highlighted in the corresponding color. Name : string of words and spaces Regexp : regular expression describing word syntax - (e.g. \"\\\w+_c\" matches word with suffix \"_c\") + (e.g. \"\\\\=\<\\\w+_c\\\\=\>\" matches word with suffix \"_c\") + expression must start with \"\\\\=\<\" and end with \"\\\\=\>\" + if only whole words should be matched (no substrings) Color (light): foreground color for light background (matching color examples: Gold3, Grey50, LimeGreen, Tomato, LightSeaGreen, DodgerBlue, Gold, PaleVioletRed) Color (dark) : foreground color for dark background (matching color examples: BurlyWood1, Grey80, Green, Coral, AquaMarine2, LightSkyBlue1, Yellow, PaleVioletRed1) + In comments : If non-nil, words are also highlighted inside comments Can be used for visual support of naming conventions, such as highlighting different kinds of signals (e.g. \"Clk50\", \"Rst_n\") or objects (e.g. @@ -1593,7 +1641,8 @@ (string :tag "Name ") (regexp :tag "Regexp " "\\w+_") (string :tag "Color (light)") - (string :tag "Color (dark) "))) + (string :tag "Color (dark) ") + (boolean :tag "In comments "))) :set (lambda (variable value) (vhdl-custom-set variable value 'vhdl-font-lock-init)) :group 'vhdl-highlight) @@ -1794,6 +1843,14 @@ :type 'boolean :group 'vhdl-misc) +(defcustom vhdl-indent-comment-like-next-code-line t + "*Non-nil means comment lines are indented like the following code line. +Otherwise, comment lines are indented like the preceding code line. +Indenting comment lines like the following code line gives nicer indentation +when comments precede the code that they refer to." + :type 'boolean + :group 'vhdl-misc) + (defcustom vhdl-word-completion-case-sensitive nil "Non-nil means word completion using `TAB' is case sensitive. That is, `TAB' completes words that start with the same letters and case. @@ -1833,6 +1890,7 @@ (custom-add-to-group 'vhdl-related 'paren-showing 'custom-group)) (custom-add-to-group 'vhdl-related 'ps-print 'custom-group) (custom-add-to-group 'vhdl-related 'speedbar 'custom-group) +(custom-add-to-group 'vhdl-related 'comment-style 'custom-variable) (custom-add-to-group 'vhdl-related 'line-number-mode 'custom-variable) (unless (featurep 'xemacs) (custom-add-to-group 'vhdl-related 'transient-mark-mode 'custom-variable)) @@ -1841,6 +1899,15 @@ (custom-add-to-group 'vhdl-related 'user-mail-address 'custom-variable) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Hidden user variables + +(defvar vhdl-compile-absolute-path nil + "If non-nil, use absolute instead of relative path for compiled files.") + +(defvar vhdl-comment-display-line-char ?- + "Character to use in comment display line.") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Internal variables (defvar vhdl-menu-max-size 20 @@ -3270,9 +3337,6 @@ (list (append '("Package") - (when (vhdl-standard-p 'math) - '(["math_complex" vhdl-template-package-math-complex t] - ["math_real" vhdl-template-package-math-real t])) '(["numeric_bit" vhdl-template-package-numeric-bit t] ["numeric_std" vhdl-template-package-numeric-std t] ["std_logic_1164" vhdl-template-package-std-logic-1164 t] @@ -3283,8 +3347,22 @@ ["std_logic_unsigned" vhdl-template-package-std-logic-unsigned t] ["std_logic_misc" vhdl-template-package-std-logic-misc t] ["std_logic_textio" vhdl-template-package-std-logic-textio t] - "--" - ["Insert Package..." vhdl-template-insert-package + "--") + (when (vhdl-standard-p 'ams) + '(["fundamental_constants" vhdl-template-package-fundamental-constants t] + ["material_constants" vhdl-template-package-material-constants t] + ["energy_systems" vhdl-template-package-energy-systems t] + ["electrical_systems" vhdl-template-package-electrical-systems t] + ["mechanical_systems" vhdl-template-package-mechanical-systems t] + ["radiant_systems" vhdl-template-package-radiant-systems t] + ["thermal_systems" vhdl-template-package-thermal-systems t] + ["fluidic_systems" vhdl-template-package-fluidic-systems t] + "--")) + (when (vhdl-standard-p 'math) + '(["math_complex" vhdl-template-package-math-complex t] + ["math_real" vhdl-template-package-math-real t] + "--")) + '(["Insert Package..." vhdl-template-insert-package :keys "C-c C-i C-p"]))) '(("Directive" ["translate_on" vhdl-template-directive-translate-on t] @@ -3417,6 +3495,7 @@ ["Buffer" vhdl-beautify-buffer t]) ("Fix" ["Generic/Port Clause" vhdl-fix-clause t] + ["Generic/Port Clause Buffer" vhdl-fix-clause t] "--" ["Case Region" vhdl-fix-case-region (mark)] ["Case Buffer" vhdl-fix-case-buffer t] @@ -3449,11 +3528,13 @@ ("Mode" ["Electric Mode" (progn (customize-set-variable 'vhdl-electric-mode - (not vhdl-electric-mode))) + (not vhdl-electric-mode)) + (vhdl-mode-line-update)) :style toggle :selected vhdl-electric-mode :keys "C-c C-m C-e"] ["Stutter Mode" (progn (customize-set-variable 'vhdl-stutter-mode - (not vhdl-stutter-mode))) + (not vhdl-stutter-mode)) + (vhdl-mode-line-update)) :style toggle :selected vhdl-stutter-mode :keys "C-c C-m C-s"] ["Indent Tabs Mode" (progn (customize-set-variable 'vhdl-indent-tabs-mode @@ -3515,6 +3596,8 @@ (customize-set-variable 'vhdl-compile-use-local-error-regexp (not vhdl-compile-use-local-error-regexp)) :style toggle :selected vhdl-compile-use-local-error-regexp] + ["Makefile Default Targets..." + (customize-option 'vhdl-makefile-default-targets) t] ["Makefile Generation Hook..." (customize-option 'vhdl-makefile-generation-hook) t] ["Default Library Name" (customize-option 'vhdl-default-library) t] @@ -3527,7 +3610,7 @@ (list '87 (cadr vhdl-standard))) (vhdl-activate-customizations)) :style radio :selected (eq '87 (car vhdl-standard))] - ["VHDL'93" + ["VHDL'93/02" (progn (customize-set-variable 'vhdl-standard (list '93 (cadr vhdl-standard))) (vhdl-activate-customizations)) @@ -3580,6 +3663,10 @@ ["Always" (customize-set-variable 'vhdl-use-direct-instantiation 'always) :style radio :selected (eq 'always vhdl-use-direct-instantiation)]) + ["Include Array Index and Record Field in Sensitivity List" + (customize-set-variable 'vhdl-array-index-record-field-in-sensitivity-list + (not vhdl-array-index-record-field-in-sensitivity-list)) + :style toggle :selected vhdl-array-index-record-field-in-sensitivity-list] "--" ["Customize Group..." (customize-group 'vhdl-style) t]) ("Naming" @@ -3676,7 +3763,10 @@ :style radio :selected (eq 'sync vhdl-reset-kind)] ["Asynchronous" (customize-set-variable 'vhdl-reset-kind 'async) - :style radio :selected (eq 'async vhdl-reset-kind)]) + :style radio :selected (eq 'async vhdl-reset-kind)] + ["Query" + (customize-set-variable 'vhdl-reset-kind 'query) + :style radio :selected (eq 'query vhdl-reset-kind)]) ["Reset is Active High" (customize-set-variable 'vhdl-reset-active-high (not vhdl-reset-active-high)) @@ -3966,6 +4056,10 @@ (customize-set-variable 'vhdl-indent-syntax-based (not vhdl-indent-syntax-based)) :style toggle :selected vhdl-indent-syntax-based] + ["Indent Comments Like Next Code Line" + (customize-set-variable 'vhdl-indent-comment-like-next-code-line + (not vhdl-indent-comment-like-next-code-line)) + :style toggle :selected vhdl-indent-comment-like-next-code-line] ["Word Completion is Case Sensitive" (customize-set-variable 'vhdl-word-completion-case-sensitive (not vhdl-word-completion-case-sensitive)) @@ -4009,7 +4103,7 @@ "^\\s-*\\(\\(\\(impure\\|pure\\)\\s-+\\|\\)function\\|procedure\\)\\s-+\\(\"?\\(\\w\\|\\s_\\)+\"?\\)" 4) ("Instance" - "^\\s-*\\(\\(\\w\\|\\s_\\)+\\s-*:\\(\\s-\\|\n\\)*\\(\\w\\|\\s_\\)+\\)\\(\\s-\\|\n\\)+\\(generic\\|port\\)\\s-+map\\>" + "^\\s-*\\(\\(\\w\\|\\s_\\)+\\s-*:\\(\\s-\\|\n\\)*\\(entity\\s-+\\(\\w\\|\\s_\\)+\\.\\)?\\(\\w\\|\\s_\\)+\\)\\(\\s-\\|\n\\)+\\(generic\\|port\\)\\s-+map\\>" 1) ("Component" "^\\s-*\\(component\\)\\s-+\\(\\(\\w\\|\\s_\\)+\\)" @@ -4193,8 +4287,10 @@ with a comment in between. `--CR' comments out code on that line. Re-hitting CR comments out following lines. - `C-c c' comments out a region if not commented out, - uncomments a region if already commented out. + `C-c C-c' comments out a region if not commented out, + uncomments a region if already commented out. Option + `comment-style' defines where the comment characters + should be placed (beginning of line, indent, etc.). You are prompted for comments after object definitions (i.e. signals, variables, constants, ports) and after subprogram and process @@ -4215,7 +4311,8 @@ `TAB' indents a line if at the beginning of the line. The amount of indentation is specified by option `vhdl-basic-offset'. `C-c C-i C-l' always indents the current line (is bound to `TAB' if option - `vhdl-intelligent-tab' is nil). + `vhdl-intelligent-tab' is nil). If a region is active, `TAB' indents + the entire region. Indentation can be done for a group of lines (`C-c C-i C-g'), a region \(`M-C-\\') or the entire buffer (menu). Argument and port lists are @@ -4229,6 +4326,10 @@ Syntax-based indentation can be very slow in large files. Option `vhdl-indent-syntax-based' allows to use faster but simpler indentation. + Option `vhdl-indent-comment-like-next-code-line' controls whether + comment lines are indented like the preceding or like the following code + line. + ALIGNMENT: The alignment functions align operators, keywords, and inline comments @@ -4357,12 +4458,12 @@ STRUCTURAL COMPOSITION: - Enables simple structural composition. `C-c C-c C-n' creates a skeleton + Enables simple structural composition. `C-c C-m C-n' creates a skeleton for a new component. Subcomponents (i.e. component declaration and instantiation) can be automatically placed from a previously read port - \(`C-c C-c C-p') or directly from the hierarchy browser (`P'). Finally, + \(`C-c C-m C-p') or directly from the hierarchy browser (`P'). Finally, all subcomponents can be automatically connected using internal signals - and ports (`C-c C-c C-w') following these rules: + and ports (`C-c C-m C-w') following these rules: - subcomponent actual ports with same name are considered to be connected by a signal (internal signal or port) - signals that are only inputs to subcomponents are considered as @@ -4383,25 +4484,25 @@ Component declarations can be placed in a components package (option `vhdl-use-components-package') which can be automatically generated for - an entire directory or project (`C-c C-c M-p'). The VHDL'93 direct + an entire directory or project (`C-c C-m M-p'). The VHDL'93 direct component instantiation is also supported (option `vhdl-use-direct-instantiation'). -| Configuration declarations can automatically be generated either from -| the menu (`C-c C-c C-f') (for the architecture the cursor is in) or from -| the speedbar menu (for the architecture under the cursor). The -| configurations can optionally be hierarchical (i.e. include all -| component levels of a hierarchical design, option -| `vhdl-compose-configuration-hierarchical') or include subconfigurations -| (option `vhdl-compose-configuration-use-subconfiguration'). For -| subcomponents in hierarchical configurations, the most-recently-analyzed -| (mra) architecture is selected. If another architecture is desired, it -| can be marked as most-recently-analyzed (speedbar menu) before -| generating the configuration. -| -| Note: Configurations of subcomponents (i.e. hierarchical configuration -| declarations) are currently not considered when displaying -| configurations in speedbar. + Configuration declarations can automatically be generated either from + the menu (`C-c C-m C-f') (for the architecture the cursor is in) or from + the speedbar menu (for the architecture under the cursor). The + configurations can optionally be hierarchical (i.e. include all + component levels of a hierarchical design, option + `vhdl-compose-configuration-hierarchical') or include subconfigurations + (option `vhdl-compose-configuration-use-subconfiguration'). For + subcomponents in hierarchical configurations, the most-recently-analyzed + (mra) architecture is selected. If another architecture is desired, it + can be marked as most-recently-analyzed (speedbar menu) before + generating the configuration. + + Note: Configurations of subcomponents (i.e. hierarchical configuration + declarations) are currently not considered when displaying + configurations in speedbar. See the options group `vhdl-compose' for all relevant user options. @@ -4433,11 +4534,13 @@ The Makefile's default target \"all\" compiles the entire design, the target \"clean\" removes it and the target \"library\" creates the - library directory if not existent. The Makefile also includes a target - for each primary library unit which allows selective compilation of this - unit, its secondary units and its subhierarchy (example: compilation of - a design specified by a configuration). User specific parts can be - inserted into a Makefile with option `vhdl-makefile-generation-hook'. + library directory if not existent. These target names can be customized + by option `vhdl-makefile-default-targets'. The Makefile also includes a + target for each primary library unit which allows selective compilation + of this unit, its secondary units and its subhierarchy (example: + compilation of a design specified by a configuration). User specific + parts can be inserted into a Makefile with option + `vhdl-makefile-generation-hook'. Limitations: - Only library units and dependencies within the current library are @@ -4483,7 +4586,7 @@ VHDL STANDARDS: The VHDL standards to be used are specified in option `vhdl-standard'. - Available standards are: VHDL'87/'93, VHDL-AMS, and Math Packages. + Available standards are: VHDL'87/'93(02), VHDL-AMS, and Math Packages. KEYWORD CASE: @@ -4559,6 +4662,9 @@ - Out parameters of procedures are considered to be read. Use option `vhdl-entity-file-name' to specify the entity file name \(used to obtain the port names). + Use option `vhdl-array-index-record-field-in-sensitivity-list' to + specify whether to include array indices and record fields in + sensitivity lists. CODE FIXING: @@ -4632,16 +4738,17 @@ to above mailing lists by sending an email to . VHDL Mode is officially distributed at -URL `http://opensource.ethz.ch/emacs/vhdl-mode.html' +http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html where the latest version can be found. Known problems: --------------- -- Indentation bug in simultaneous if- and case-statements (VHDL-AMS). - XEmacs: Incorrect start-up when automatically opening speedbar. - XEmacs: Indentation in XEmacs 21.4 (and higher). +- Indentation incorrect for new 'postponed' VHDL keyword. +- Indentation incorrect for 'protected body' construct. The VHDL Mode Authors @@ -4764,7 +4871,7 @@ ;;; Keywords and standardized words ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defconst vhdl-93-keywords +(defconst vhdl-02-keywords '( "abs" "access" "after" "alias" "all" "and" "architecture" "array" "assert" "attribute" @@ -4779,7 +4886,7 @@ "map" "mod" "nand" "new" "next" "nor" "not" "null" "of" "on" "open" "or" "others" "out" - "package" "port" "postponed" "procedure" "process" "pure" + "package" "port" "postponed" "procedure" "process" "protected" "pure" "range" "record" "register" "reject" "rem" "report" "return" "rol" "ror" "select" "severity" "shared" "signal" "sla" "sll" "sra" "srl" "subtype" @@ -4789,7 +4896,7 @@ "wait" "when" "while" "with" "xnor" "xor" ) - "List of VHDL'93 keywords.") + "List of VHDL'02 keywords.") (defconst vhdl-ams-keywords '( @@ -4822,7 +4929,7 @@ ) "List of Verilog keywords as candidate for additional reserved words.") -(defconst vhdl-93-types +(defconst vhdl-02-types '( "boolean" "bit" "bit_vector" "character" "severity_level" "integer" "real" "time" "natural" "positive" "string" "line" "text" "side" @@ -4830,25 +4937,72 @@ "std_logic" "std_logic_vector" "std_ulogic" "std_ulogic_vector" ) - "List of VHDL'93 standardized types.") + "List of VHDL'02 standardized types.") (defconst vhdl-ams-types + ;; standards: IEEE Std 1076.1-2007, IEEE Std 1076.1.1-2004 '( + ;; package `standard' "domain_type" "real_vector" - ;; from `nature_pkg' package - "voltage" "current" "electrical" "position" "velocity" "force" - "mechanical_vf" "mechanical_pf" "rotvel" "torque" "rotational" - "pressure" "flowrate" "fluid" - ) + ;; package `energy_systems' + "energy" "power" "periodicity" "real_across" "real_through" "unspecified" + "unspecified_vector" "energy_vector" "power_vector" "periodicity_vector" + "real_across_vector" "real_through_vector" + ;; package `electrical_systems' + "voltage" "current" "charge" "resistance" "conductance" "capacitance" + "mmf" "electric_flux" "electric_flux_density" "electric_field_strength" + "magnetic_flux" "magnetic_flux_density" "magnetic_field_strength" + "inductance" "reluctance" "electrical" "electrical_vector" "magnetic" + "magnetic_vector" "voltage_vector" "current_vector" "mmf_vector" + "magnetic_flux_vector" "charge_vector" "resistance_vector" + "conductance_vector" "capacitance_vector" "electric_flux_vector" + "electric_flux_density_vector" "electric_field_strength_vector" + "magnetic_flux_density_vector" "magnetic_field_strength_vector" + "inductance_vector" "reluctance_vector" "ground" + ;; package `mechanical_systems' + "displacement" "force" "velocity" "acceleration" "mass" "stiffness" + "damping" "momentum" "angle" "torque" "angular_velocity" + "angular_acceleration" "moment_inertia" "angular_momentum" + "angular_stiffness" "angular_damping" "translational" + "translational_vector" "translational_velocity" + "translational_velocity_vector" "rotational" "rotational_vector" + "rotational_velocity" "rotational_velocity_vector" "displacement_vector" + "force_vector" "velocity_vector" "force_velocity_vector" "angle_vector" + "torque_vector" "angular_velocity_vector" "torque_velocity_vector" + "acceleration_vector" "mass_vector" "stiffness_vector" "damping_vector" + "momentum_vector" "angular_acceleration_vector" "moment_inertia_vector" + "angular_momentum_vector" "angular_stiffness_vector" + "angular_damping_vector" "anchor" "translational_v_ref" + "rotational_v_ref" "translational_v" "rotational_v" + ;; package `radiant_systems' + "illuminance" "luminous_flux" "luminous_intensity" "irradiance" "radiant" + "radiant_vector" "luminous_intensity_vector" "luminous_flux_vector" + "illuminance_vector" "irradiance_vector" + ;; package `thermal_systems' + "temperature" "heat_flow" "thermal_capacitance" "thermal_resistance" + "thermal_conductance" "thermal" "thermal_vector" "temperature_vector" + "heat_flow_vector" "thermal_capacitance_vector" + "thermal_resistance_vector" "thermal_conductance_vector" + ;; package `fluidic_systems' + "pressure" "vflow_rate" "mass_flow_rate" "volume" "density" "viscosity" + "fresistance" "fconductance" "fcapacitance" "inertance" "cfresistance" + "cfcapacitance" "cfinertance" "cfconductance" "fluidic" "fluidic_vector" + "compressible_fluidic" "compressible_fluidic_vector" "pressure_vector" + "vflow_rate_vector" "mass_flow_rate_vector" "volume_vector" + "density_vector" "viscosity_vector" "fresistance_vector" + "fconductance_vector" "fcapacitance_vector" "inertance_vector" + "cfresistance_vector" "cfconductance_vector" "cfcapacitance_vector" + "cfinertance_vector" + ) "List of VHDL-AMS standardized types.") (defconst vhdl-math-types '( - "complex" "complex_polar" + "complex" "complex_polar" "positive_real" "principal_value" ) "List of Math Packages standardized types.") -(defconst vhdl-93-attributes +(defconst vhdl-02-attributes '( "base" "left" "right" "high" "low" "pos" "val" "succ" "pred" "leftof" "rightof" "range" "reverse_range" @@ -4858,7 +5012,7 @@ "simple_name" "instance_name" "path_name" "foreign" ) - "List of VHDL'93 standardized attributes.") + "List of VHDL'02 standardized attributes.") (defconst vhdl-ams-attributes '( @@ -4869,7 +5023,7 @@ ) "List of VHDL-AMS standardized attributes.") -(defconst vhdl-93-enum-values +(defconst vhdl-02-enum-values '( "true" "false" "note" "warning" "error" "failure" @@ -4878,7 +5032,7 @@ "fs" "ps" "ns" "us" "ms" "sec" "min" "hr" "right" "left" ) - "List of VHDL'93 standardized enumeration values.") + "List of VHDL'02 standardized enumeration values.") (defconst vhdl-ams-enum-values '( @@ -4888,22 +5042,38 @@ ) "List of VHDL-AMS standardized enumeration values.") +(defconst vhdl-ams-constants + ;; standard: IEEE Std 1076.1.1-2004 + '( + ;; package `fundamental_constants' + "phys_q" "phys_eps0" "phys_mu0" "phys_k" "phys_gravity" "phys_ctok" + "phys_c" "phys_h" "phys_h_over_2_pi" "yocto" "zepto" "atto" "femto" + "pico" "nano" "micro" "milli" "centi" "deci" "deka" "hecto" "kilo" "mega" + "giga" "tera" "peta" "exa" "zetta" "yotta" "deca" + ;; package `material_constants' + "phys_eps_si" "phys_eps_sio2" "phys_e_si" "phys_e_sio2" "phys_e_poly" + "phys_nu_si" "phys_nu_poly" "phys_rho_poly" "phys_rho_sio2" + "ambient_temperature" "ambient_pressure" "ambient_illuminance" + ) + "List of VHDL-AMS standardized constants.") + (defconst vhdl-math-constants + ;; standard: IEEE Std 1076.2-1996 '( - "math_e" "math_1_over_e" - "math_pi" "math_two_pi" "math_1_over_pi" - "math_half_pi" "math_q_pi" "math_3_half_pi" - "math_log_of_2" "math_log_of_10" "math_log2_of_e" "math_log10_of_e" - "math_sqrt2" "math_sqrt1_2" "math_sqrt_pi" - "math_deg_to_rad" "math_rad_to_deg" - "cbase_1" "cbase_j" "czero" + "math_1_over_e" "math_1_over_pi" "math_1_over_sqrt_2" "math_2_pi" + "math_3_pi_over_2" "math_cbase_1" "math_cbase_j" "math_czero" + "math_deg_to_rad" "math_e" "math_log10_of_e" "math_log2_of_e" + "math_log_of_10" "math_log_of_2" "math_pi" "math_pi_over_2" + "math_pi_over_3" "math_pi_over_4" "math_rad_to_deg" "math_sqrt_2" + "math_sqrt_pi" ) "List of Math Packages standardized constants.") -(defconst vhdl-93-functions +(defconst vhdl-02-functions '( "now" "resolved" "rising_edge" "falling_edge" - "read" "readline" "write" "writeline" "endfile" + "read" "readline" "hread" "oread" "write" "writeline" "hwrite" "owrite" + "endfile" "resize" "is_X" "std_match" "shift_left" "shift_right" "rotate_left" "rotate_right" "to_unsigned" "to_signed" "to_integer" @@ -4913,25 +5083,27 @@ "shl" "shr" "ext" "sxt" "deallocate" ) - "List of VHDL'93 standardized functions.") + "List of VHDL'02 standardized functions.") (defconst vhdl-ams-functions '( + ;; package `standard' "frequency" ) "List of VHDL-AMS standardized functions.") (defconst vhdl-math-functions + ;; standard: IEEE Std 1076.2-1996 '( - "sign" "ceil" "floor" "round" "trunc" "fmax" "fmin" "uniform" - "sqrt" "cbrt" "exp" "log" - "sin" "cos" "tan" "arcsin" "arccos" "arctan" - "sinh" "cosh" "tanh" "arcsinh" "arccosh" "arctanh" - "cmplx" "complex_to_polar" "polar_to_complex" "arg" "conj" + "arccos" "arccosh" "arcsin" "arcsinh" "arctan" "arctanh" "arg" + "cbrt" "ceil" "cmplx" "complex_to_polar" "conj" "cos" "cosh" "exp" + "floor" "get_principal_value" "log" "log10" "log2" "polar_to_complex" + "realmax" "realmin" "round" "sign" "sin" "sinh" "sqrt" + "tan" "tanh" "trunc" "uniform" ) "List of Math Packages standardized functions.") -(defconst vhdl-93-packages +(defconst vhdl-02-packages '( "std_logic_1164" "numeric_std" "numeric_bit" "standard" "textio" @@ -4939,12 +5111,13 @@ "std_logic_misc" "std_logic_textio" "ieee" "std" "work" ) - "List of VHDL'93 standardized packages and libraries.") + "List of VHDL'02 standardized packages and libraries.") (defconst vhdl-ams-packages '( - ;; from `nature_pkg' package - "nature_pkg" + "fundamental_constants" "material_constants" "energy_systems" + "electrical_systems" "mechanical_systems" "radiant_systems" + "thermal_systems" "fluidic_systems" ) "List of VHDL-AMS standardized packages and libraries.") @@ -4990,6 +5163,9 @@ (defvar vhdl-enum-values-regexp nil "Regexp for VHDL standardized enumeration values.") +(defvar vhdl-constants-regexp nil + "Regexp for VHDL standardized constants.") + (defvar vhdl-functions-regexp nil "Regexp for VHDL standardized functions.") @@ -5002,29 +5178,50 @@ (defvar vhdl-directive-keywords-regexp nil "Regexp for compiler directive keywords.") +(defun vhdl-upcase-list (condition list) + "Upcase all elements in LIST based on CONDITION." + (when condition + (let ((tmp-list list)) + (while tmp-list + (setcar tmp-list (upcase (car tmp-list))) + (setq tmp-list (cdr tmp-list))))) + list) + (defun vhdl-words-init () "Initialize reserved words." (setq vhdl-keywords - (append vhdl-93-keywords - (when (vhdl-standard-p 'ams) vhdl-ams-keywords))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-keywords) + (append vhdl-02-keywords + (when (vhdl-standard-p 'ams) vhdl-ams-keywords)))) (setq vhdl-types - (append vhdl-93-types - (when (vhdl-standard-p 'ams) vhdl-ams-types) - (when (vhdl-standard-p 'math) vhdl-math-types))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-types) + (append vhdl-02-types + (when (vhdl-standard-p 'ams) vhdl-ams-types) + (when (vhdl-standard-p 'math) vhdl-math-types)))) (setq vhdl-attributes - (append vhdl-93-attributes - (when (vhdl-standard-p 'ams) vhdl-ams-attributes))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-attributes) + (append vhdl-02-attributes + (when (vhdl-standard-p 'ams) vhdl-ams-attributes)))) (setq vhdl-enum-values - (append vhdl-93-enum-values - (when (vhdl-standard-p 'ams) vhdl-ams-enum-values))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-enum-values) + (append vhdl-02-enum-values + (when (vhdl-standard-p 'ams) vhdl-ams-enum-values)))) (setq vhdl-constants - (append (when (vhdl-standard-p 'math) vhdl-math-constants))) + (vhdl-upcase-list + (and vhdl-highlight-case-sensitive vhdl-upper-case-constants) + (append (when (vhdl-standard-p 'ams) vhdl-ams-constants) + (when (vhdl-standard-p 'math) vhdl-math-constants) + '("")))) (setq vhdl-functions - (append vhdl-93-functions + (append vhdl-02-functions (when (vhdl-standard-p 'ams) vhdl-ams-functions) (when (vhdl-standard-p 'math) vhdl-math-functions))) (setq vhdl-packages - (append vhdl-93-packages + (append vhdl-02-packages (when (vhdl-standard-p 'ams) vhdl-ams-packages) (when (vhdl-standard-p 'math) vhdl-math-packages))) (setq vhdl-reserved-words @@ -5039,6 +5236,8 @@ (concat "\\<\\(" (regexp-opt vhdl-attributes) "\\)\\>")) (setq vhdl-enum-values-regexp (concat "\\<\\(" (regexp-opt vhdl-enum-values) "\\)\\>")) + (setq vhdl-constants-regexp + (concat "\\<\\(" (regexp-opt vhdl-constants) "\\)\\>")) (setq vhdl-functions-regexp (concat "\\<\\(" (regexp-opt vhdl-functions) "\\)\\>")) (setq vhdl-packages-regexp @@ -5090,7 +5289,7 @@ class. Putting underscore in word class breaks forward word movement behavior that users are familiar with.") -(defconst vhdl-case-header-key "case[( \t\n][^;=>]+[) \t\n]is" +(defconst vhdl-case-header-key "case[( \t\n\r\f][^;=>]+[) \t\n\r\f]is" "Regexp describing a case statement header key.") (defconst vhdl-label-key @@ -5318,6 +5517,17 @@ "Check if point is in a string." (eq (vhdl-in-literal) 'string)) +(defun vhdl-in-quote-p () + "Check if point is in a quote ('x')." + (or (and (> (point) (point-min)) + (< (1+ (point)) (point-max)) + (= (char-before (point)) ?\') + (= (char-after (1+ (point))) ?\')) + (and (> (1- (point)) (point-min)) + (< (point) (point-max)) + (= (char-before (1- (point))) ?\') + (= (char-after (point)) ?\')))) + (defun vhdl-in-literal () "Determine if point is in a VHDL literal." (save-excursion @@ -5328,6 +5538,12 @@ ((vhdl-beginning-of-macro) 'pound) (t nil))))) +(defun vhdl-in-extended-identifier-p () + "Determine if point is inside extended identifier (delimited by '\')." + (save-match-data + (and (save-excursion (re-search-backward "\\\\" (vhdl-point 'bol) t)) + (save-excursion (re-search-forward "\\\\" (vhdl-point 'eol) t))))) + (defun vhdl-forward-comment (&optional direction) "Skip all comments (including whitespace). Skip backwards if DIRECTION is negative, skip forward otherwise." @@ -5335,20 +5551,30 @@ (if (and direction (< direction 0)) ;; skip backwards (progn - (skip-chars-backward " \t\n") + (skip-chars-backward " \t\n\r\f") (while (re-search-backward "^[^\"-]*\\(\\(-?\"[^\"]*\"\\|-[^\"-]\\)[^\"-]*\\)*\\(--\\)" (vhdl-point 'bol) t) (goto-char (match-beginning 3)) - (skip-chars-backward " \t\n"))) + (skip-chars-backward " \t\n\r\f"))) ;; skip forwards - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (while (looking-at "--.*") (goto-char (match-end 0)) - (skip-chars-forward " \t\n")))) + (skip-chars-forward " \t\n\r\f")))) ;; XEmacs hack: work around buggy `forward-comment' in XEmacs 21.4+ (unless (and (featurep 'xemacs) (string< "21.2" emacs-version)) (defalias 'vhdl-forward-comment 'forward-comment)) +(defun vhdl-back-to-indentation () + "Move point to the first non-whitespace character on this line." + (interactive) + (beginning-of-line 1) + (skip-syntax-forward " " (vhdl-point 'eol))) + +;; XEmacs hack: work around old `back-to-indentation' in XEmacs +(when (featurep 'xemacs) + (defalias 'back-to-indentation 'vhdl-back-to-indentation)) + ;; This is the best we can do in Win-Emacs. (defun vhdl-win-il (&optional lim) "Determine if point is in a VHDL literal." @@ -5513,7 +5739,7 @@ (and (save-excursion (forward-sexp) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (not (looking-at "is\\b[^_]"))) (save-excursion (backward-sexp) @@ -5553,12 +5779,12 @@ "is")))) (defconst vhdl-begin-fwd-re - "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\|units\\|record\\|for\\)\\b\\([^_]\\|\\'\\)" + "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|protected\\(\\s-+body\\)?\\|for\\)\\b\\([^_]\\|\\'\\)" "A regular expression for searching forward that matches all known \"begin\" keywords.") (defconst vhdl-begin-bwd-re - "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\|units\\|record\\|for\\)\\b[^_]" + "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|protected\\(\\s-+body\\)?\\|for\\)\\b[^_]" "A regular expression for searching backward that matches all known \"begin\" keywords.") @@ -5591,21 +5817,21 @@ (and (/= (following-char) ?\;) (not (looking-at "is\\|begin\\|process\\|procedural\\|block"))))) t) - ;; "begin", "then": - ((looking-at "be\\|t") + ;; "begin", "then", "use": + ((looking-at "be\\|t\\|use") t) ;; "else": ((and (looking-at "e") ;; make sure that the "else" isn't inside a ;; conditional signal assignment. (save-excursion - (re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move) + (vhdl-re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move) (or (eq (following-char) ?\;) (eq (point) lim)))) t) ;; "block", "generate", "loop", "process", "procedural", - ;; "units", "record": - ((and (looking-at "bl\\|[glpur]") + ;; "units", "record", "protected body": + ((and (looking-at "block\\|generate\\|loop\\|process\\|procedural\\|protected\\(\\s-+body\\)?\\|units\\|record") (save-excursion (backward-sexp) (not (looking-at "end\\s-+\\w")))) @@ -5633,7 +5859,7 @@ (cond ((looking-at "is\\|block\\|generate\\|process\\|procedural") "begin") - ((looking-at "then") + ((looking-at "then\\|use") "") (t "end"))) @@ -5648,6 +5874,9 @@ of an identifier that just happens to contain a \"begin\" keyword." (save-excursion (and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (not (vhdl-in-literal)) (vhdl-begin-p lim) @@ -5670,8 +5899,8 @@ (vhdl-beginning-of-statement-1 lim) (vhdl-backward-skip-label lim) (vhdl-first-word (point))))))) - ;; "component", "units", "record": - ((looking-at "[cur]") + ;; "component", "units", "record", "protected body": + ((looking-at "component\\|units\\|protected\\(\\s-+body\\)?\\|record") ;; The first end found will close the block (vector "end" nil)) ;; "block", "process", "procedural": @@ -5683,8 +5912,8 @@ (vhdl-backward-skip-label lim) (vhdl-first-word (point)))))) ;; "then": - ((looking-at "t") - (vector "elsif\\|else\\|end\\s-+if" + ((looking-at "t\\|use") + (vector "elsif\\|else\\|end\\s-+\\(if\\|use\\)" (and (vhdl-last-word (point)) (or (vhdl-first-word (point)) (save-excursion @@ -5730,25 +5959,25 @@ (vhdl-end-p lim)) (if (looking-at "el") ;; "else", "elsif": - (vector "if\\|elsif" (vhdl-first-word (point)) "then" nil) + (vector "if\\|elsif" (vhdl-first-word (point)) "then\\|use" nil) ;; "end ...": (setq pos (point)) (forward-sexp) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (cond ;; "end if": ((looking-at "if\\b[^_]") (vector "else\\|elsif\\|if" (vhdl-first-word pos) - "else\\|then" nil)) + "else\\|then\\|use" nil)) ;; "end component": ((looking-at "component\\b[^_]") (vector (buffer-substring (match-beginning 1) (match-end 1)) (vhdl-first-word pos) nil nil)) - ;; "end units", "end record": - ((looking-at "\\(units\\|record\\)\\b[^_]") + ;; "end units", "end record", "end protected": + ((looking-at "\\(units\\|record\\|protected\\(\\s-+body\\)?\\)\\b[^_]") (vector (buffer-substring (match-beginning 1) (match-end 1)) (vhdl-first-word pos) @@ -5805,38 +6034,38 @@ (cond ((looking-at "block\\|process\\|procedural") (if (save-excursion (forward-sexp) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (= (following-char) ?\()) (forward-sexp 2) (forward-sexp)) - (when (looking-at "[ \t\n]*is") + (when (looking-at "[ \t\n\r\f]*is") (goto-char (match-end 0))) (point)) ((looking-at "component") (forward-sexp 2) - (when (looking-at "[ \t\n]*is") + (when (looking-at "[ \t\n\r\f]*is") (goto-char (match-end 0))) (point)) ((looking-at "for") (forward-sexp 2) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (while (looking-at "[,:(]") (forward-sexp) - (skip-chars-forward " \t\n")) + (skip-chars-forward " \t\n\r\f")) (point)) (t nil) ))) (defconst vhdl-trailer-re - "\\b\\(is\\|then\\|generate\\|loop\\|record\\)\\b[^_]") + "\\b\\(is\\|then\\|generate\\|loop\\|record\\|protected\\(\\s-+body\\)?\\|use\\)\\b[^_]") (defconst vhdl-statement-fwd-re - "\\b\\(if\\|for\\|while\\)\\b\\([^_]\\|\\'\\)" + "\\b\\(if\\|for\\|while\\|loop\\)\\b\\([^_]\\|\\'\\)" "A regular expression for searching forward that matches all known \"statement\" keywords.") (defconst vhdl-statement-bwd-re - "\\b\\(if\\|for\\|while\\)\\b[^_]" + "\\b\\(if\\|for\\|while\\|loop\\)\\b[^_]" "A regular expression for searching backward that matches all known \"statement\" keywords.") @@ -5852,7 +6081,7 @@ ;; Make sure it's the start of a parameter specification. (save-excursion (forward-sexp 2) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (looking-at "in\\b[^_]")) ;; Make sure it's not an "end for". (save-excursion @@ -5871,7 +6100,7 @@ t) )) -(defconst vhdl-case-alternative-re "when[( \t\n][^;=>]+=>" +(defconst vhdl-case-alternative-re "when[( \t\n\r\f][^;=>]+=>" "Regexp describing a case statement alternative key.") (defun vhdl-case-alternative-p (&optional lim) @@ -5908,6 +6137,9 @@ (cond ;; "begin" keyword: ((and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (vhdl-begin-p lim)) (setq foundp 'begin)) @@ -5931,7 +6163,7 @@ (save-excursion (while (> count 0) ;; skip whitespace - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") ;; Check for an unbalanced "end" keyword (if (and (looking-at vhdl-end-fwd-re) (/= (preceding-char) ?_) @@ -6007,6 +6239,10 @@ nil (backward-sexp) (if (and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion + (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (not (vhdl-in-literal)) (vhdl-begin-p lim)) @@ -6278,7 +6514,7 @@ (re-search-forward vhdl-e-o-s-re)) (defconst vhdl-b-o-s-re - (concat ";\\|\(\\|\)\\|\\bwhen\\b[^_]\\|" + (concat ";[^_]\\|\([^_]\\|\)[^_]\\|\\bwhen\\b[^_]\\|" vhdl-begin-bwd-re "\\|" vhdl-statement-bwd-re)) (defun vhdl-beginning-of-statement-1 (&optional lim) @@ -6299,7 +6535,7 @@ (while (and (not donep) (not (bobp)) ;; look backwards for a statement boundary - (re-search-backward vhdl-b-o-s-re lim 'move)) + (progn (forward-char) (re-search-backward vhdl-b-o-s-re lim 'move))) (if (or (= (preceding-char) ?_) (vhdl-in-literal)) (backward-char) @@ -6319,13 +6555,17 @@ (vhdl-forward-syntactic-ws here) (setq donep t)))) ;; If we are looking at a semicolon, then stop - ((eq (following-char) ?\;) + ((and (eq (following-char) ?\;) (not (vhdl-in-quote-p))) (progn (forward-char) (vhdl-forward-syntactic-ws here) (setq donep t))) ;; If we are looking at a "begin", then stop ((and (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion + (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (/= (preceding-char) ?_) (vhdl-begin-p nil)) ;; If it's a leader "begin", then find the @@ -6576,6 +6816,10 @@ (setq begin-after-ip (and (not literal) (looking-at vhdl-begin-fwd-re) + (or (not (looking-at "\\")) + (save-excursion + (back-to-indentation) + (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>"))) (vhdl-begin-p))) (setq end-after-ip (and (not literal) @@ -6624,7 +6868,8 @@ ((progn (vhdl-backward-syntactic-ws lim) (or (bobp) - (= (preceding-char) ?\;))) + (and (= (preceding-char) ?\;) + (not (vhdl-in-quote-p))))) (vhdl-add-syntax 'statement placeholder)) ;; CASE 2D: we are looking at a top-level statement-cont (t @@ -6662,6 +6907,10 @@ (save-excursion (vhdl-beginning-of-statement-1 containing-sexp) (skip-chars-backward " \t(") + (while (and (= (preceding-char) ?\;) + (not (vhdl-in-quote-p))) + (vhdl-beginning-of-statement-1 containing-sexp) + (skip-chars-backward " \t(")) (<= (point) containing-sexp))) (goto-char containing-sexp) (vhdl-add-syntax 'arglist-cont-nonempty (vhdl-point 'boi))) @@ -6730,7 +6979,7 @@ (save-excursion (goto-char new) (eq new (progn (back-to-indentation) (point))))) - (setq placeholder new))) + (setq placeholder new))) (vhdl-add-syntax 'statement-cont placeholder) (if begin-after-ip (vhdl-add-syntax 'block-open))) @@ -6891,7 +7140,7 @@ (let* ((relpos (cdr langelem)) (assignp (save-excursion (goto-char (vhdl-point 'boi)) - (and (re-search-forward "\\(<\\|:\\)=" + (and (re-search-forward "\\(<\\|:\\|=\\)=" (vhdl-point 'eol) t) (- (point) (vhdl-point 'boi))))) (curcol (progn @@ -6900,7 +7149,7 @@ foundp) (while (and (not foundp) (< (point) (vhdl-point 'eol))) - (re-search-forward "\\(<\\|:\\)=\\|(" (vhdl-point 'eol) 'move) + (re-search-forward "\\(<\\|:\\|=\\)=\\|(" (vhdl-point 'eol) 'move) (if (vhdl-in-literal) (forward-char) (if (= (preceding-char) ?\() @@ -7001,7 +7250,8 @@ (interactive) (if (and (= (preceding-char) ? ) (vhdl-in-comment-p)) (indent-new-comment-line) - (when (and (>= (preceding-char) ?a) (<= (preceding-char) ?z)) + (when (and (>= (preceding-char) ?a) (<= (preceding-char) ?z) + (not (vhdl-in-comment-p))) (vhdl-fix-case-word -1)) (newline-and-indent))) @@ -7011,6 +7261,7 @@ (interactive) (let* ((syntax (and vhdl-indent-syntax-based (vhdl-get-syntactic-context))) (pos (- (point-max) (point))) + (is-comment nil) (indent (if syntax ;; indent syntax-based @@ -7018,6 +7269,15 @@ (>= (vhdl-get-offset (car syntax)) comment-column)) ;; special case: comments at or right of comment-column (vhdl-get-offset (car syntax)) + ;; align comments like following code line + (when vhdl-indent-comment-like-next-code-line + (save-excursion + (while (eq (caar syntax) 'comment) + (setq is-comment t) + (beginning-of-line 2) + (setq syntax (vhdl-get-syntactic-context))))) + (when is-comment + (setq syntax (cons (cons 'comment nil) syntax))) (apply '+ (mapcar 'vhdl-get-offset syntax))) ;; indent like previous nonblank line (save-excursion (beginning-of-line) @@ -7026,10 +7286,13 @@ (shift-amt (- indent (current-indentation)))) (and vhdl-echo-syntactic-information-p (message "syntax: %s, indent= %d" syntax indent)) - (unless (zerop shift-amt) - (delete-region (vhdl-point 'bol) (vhdl-point 'boi)) - (beginning-of-line) - (indent-to indent)) + (let ((has-formfeed + (save-excursion (beginning-of-line) (looking-at "\\s-*\f")))) + (when (or (not (zerop shift-amt)) has-formfeed) + (delete-region (vhdl-point 'bol) (vhdl-point 'boi)) + (beginning-of-line) + (when has-formfeed (insert "\f")) + (indent-to indent))) (if (< (point) (vhdl-point 'boi)) (back-to-indentation) ;; If initial point was within line's indentation, position after @@ -7040,7 +7303,7 @@ (vhdl-update-progress-info "Indenting" (vhdl-current-line)) shift-amt)) -(defun vhdl-indent-region (beg end column) +(defun vhdl-indent-region (beg end &optional column) "Indent region as VHDL code. Adds progress reporting to `indent-region'." (interactive "r\nP") @@ -7055,7 +7318,7 @@ "Indent whole buffer as VHDL code. Calls `indent-region' for whole buffer and adds progress reporting." (interactive) - (vhdl-indent-region (point-min) (point-max) nil)) + (vhdl-indent-region (point-min) (point-max))) (defun vhdl-indent-group () "Indent group of lines between empty lines." @@ -7068,7 +7331,7 @@ (if (re-search-forward vhdl-align-group-separate nil t) (point-marker) (point-max-marker))))) - (vhdl-indent-region beg end nil))) + (vhdl-indent-region beg end))) (defun vhdl-indent-sexp (&optional endpos) "Indent each line of the list starting just after point. @@ -7131,21 +7394,23 @@ (defconst vhdl-align-alist '( ;; after some keywords - (vhdl-mode "^\\s-*\\(constant\\|quantity\\|signal\\|subtype\\|terminal\\|type\\|variable\\)[ \t]" - "^\\s-*\\(constant\\|quantity\\|signal\\|subtype\\|terminal\\|type\\|variable\\)\\([ \t]+\\)" 2) + (vhdl-mode "^\\s-*\\(across\\|constant\\|quantity\\|signal\\|subtype\\|terminal\\|through\\|type\\|variable\\)[ \t]" + "^\\s-*\\(across\\|constant\\|quantity\\|signal\\|subtype\\|terminal\\|through\\|type\\|variable\\)\\([ \t]+\\)" 2) ;; before ':' (vhdl-mode ":[^=]" "\\([ \t]*\\):[^=]") ;; after direction specifications (vhdl-mode ":[ \t]*\\(in\\|out\\|inout\\|buffer\\|\\)\\>" ":[ \t]*\\(in\\|out\\|inout\\|buffer\\|\\)\\([ \t]+\\)" 2) ;; before "==", ":=", "=>", and "<=" - (vhdl-mode "[<:=]=" "\\([ \t]*\\)[<:=]=" 1) ; since "<= ... =>" can occur + (vhdl-mode "[<:=]=" "\\([ \t]*\\)\\??[<:=]=" 1) ; since "<= ... =>" can occur (vhdl-mode "=>" "\\([ \t]*\\)=>" 1) - (vhdl-mode "[<:=]=" "\\([ \t]*\\)[<:=]=" 1) ; since "=> ... <=" can occur + (vhdl-mode "[<:=]=" "\\([ \t]*\\)\\??[<:=]=" 1) ; since "=> ... <=" can occur ;; before some keywords (vhdl-mode "[ \t]after\\>" "[^ \t]\\([ \t]+\\)after\\>" 1) (vhdl-mode "[ \t]when\\>" "[^ \t]\\([ \t]+\\)when\\>" 1) (vhdl-mode "[ \t]else\\>" "[^ \t]\\([ \t]+\\)else\\>" 1) + (vhdl-mode "[ \t]across\\>" "[^ \t]\\([ \t]+\\)across\\>" 1) + (vhdl-mode "[ \t]through\\>" "[^ \t]\\([ \t]+\\)through\\>" 1) ;; before "=>" since "when/else ... =>" can occur (vhdl-mode "=>" "\\([ \t]*\\)=>" 1) ) @@ -7195,7 +7460,7 @@ (forward-list) (setq end (point)) (goto-char (1+ beg)) - (skip-chars-forward " \t\n") + (skip-chars-forward " \t\n\r\f") (setq beg (point)))) ;; run FUNCTION (if beg @@ -7280,8 +7545,14 @@ bol (setq begin (progn (beginning-of-line) (point)))) (while (< bol end) (save-excursion - (when (and (re-search-forward match eol t) - (not (vhdl-in-literal))) + (when (and (vhdl-re-search-forward match eol t) + (save-excursion + (goto-char (match-beginning 0)) + (forward-char) + (and (not (vhdl-in-literal)) + (not (vhdl-in-quote-p)) + (not (vhdl-in-extended-identifier-p)))) + (not (looking-at "\\s-*$"))) (setq distance (- (match-beginning substr) bol)) (when (> distance max) (setq max distance)))) @@ -7295,8 +7566,16 @@ (goto-char (setq bol begin)) (setq eol (point-at-eol)) (while (> lines 0) - (when (and (re-search-forward match eol t) - (not (vhdl-in-literal))) + (when (and (vhdl-re-search-forward match eol t) + (save-excursion + (goto-char (match-beginning 0)) + (forward-char) + (and (not (vhdl-in-literal)) + (not (vhdl-in-quote-p)) + (not (vhdl-in-extended-identifier-p)))) + (not (looking-at "\\s-*$")) + (> (match-beginning 0) ; not if at boi + (save-excursion (back-to-indentation) (point)))) (setq width (- (match-end substr) (match-beginning substr))) (setq distance (- (match-beginning substr) bol)) (goto-char (match-beginning substr)) @@ -7449,7 +7728,7 @@ ;; search for comment start positions and lengths (while (< (point) end) (when (and (not (looking-at "^\\s-*\\(begin\\|end\\)\\>")) - (looking-at "^\\(.*[^ \t\n-]+\\)\\s-*\\(--.*\\)$") + (looking-at "^\\(.*[^ \t\n\r\f-]+\\)\\s-*\\(--.*\\)$") (not (save-excursion (goto-char (match-beginning 2)) (vhdl-in-literal)))) (setq start (+ (- (match-end 1) (match-beginning 1)) spacing)) @@ -7474,7 +7753,7 @@ (while (< (point) end) (setq cur-start nil) (when (and (not (looking-at "^\\s-*\\(begin\\|end\\)\\>")) - (or (and (looking-at "^\\(.*[^ \t\n-]+\\)\\(\\s-*\\)\\(--.*\\)$") + (or (and (looking-at "^\\(.*[^ \t\n\r\f-]+\\)\\(\\s-*\\)\\(--.*\\)$") (not (save-excursion (goto-char (match-beginning 3)) (vhdl-in-literal)))) @@ -7582,32 +7861,35 @@ (setq end (point-marker)) ;; have no space before and one space after `,' and ';' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\(\\s-*\\([,;]\\)\\)" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\s-*\\([,;]\\)\\)" end t) (if (match-string 1) (goto-char (match-end 1)) - (replace-match "\\3 " nil nil nil 3))) + (replace-match "\\3 " nil nil nil 2))) ;; have no space after `(' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\((\\)\\s-+" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\((\\)\\s-+" end t) (if (match-string 1) (goto-char (match-end 1)) (replace-match "\\2"))) ;; have no space before `)' (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|^\\s-+\\)\\|\\s-+\\()\\)" end t) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\|^\\s-+\\)\\|\\s-+\\()\\)" end t) (if (match-string 1) (goto-char (match-end 1)) (replace-match "\\2"))) ;; surround operator symbols by one space (goto-char beg) - (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t) - (if (match-string 1) - (goto-char (match-end 1)) + (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\|\\\\[^\\\n]*[\\\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|\\??=\\|\\??<<\\|\\??>>\\|\\??<\\|\\??>\\|:=\\|\\??<=\\|\\??>=\\|=>\\|\\??/=\\|\\?\\?\\)\\([^=>]\\|$\\)\\)" end t) + (if (or (match-string 1) + (<= (match-beginning 0) ; not if at boi + (save-excursion (back-to-indentation) (point)))) + (goto-char (match-end 0)) (replace-match "\\3 \\4 \\5") (goto-char (match-end 2)))) ;; eliminate multiple spaces and spaces at end of line (goto-char beg) (while (or (and (looking-at "--.*\n") (re-search-forward "--.*\n" end t)) + (and (looking-at "--.*") (re-search-forward "--.*" end t)) (and (looking-at "\"") (re-search-forward "\"[^\"\n]*[\"\n]" end t)) (and (looking-at "\\s-+$") (re-search-forward "\\s-+$" end t) (progn (replace-match "" nil nil) t)) @@ -7618,6 +7900,7 @@ (progn (replace-match " " nil nil) t)) (and (looking-at "\\s-+") (re-search-forward "\\s-+" end t) (progn (replace-match " " nil nil) t)) + (and (looking-at "-") (re-search-forward "-" end t)) ; (re-search-forward "[^ \t-]+" end t)))) (re-search-forward "[^ \t\"-]+" end t)))) (unless no-message (message "Fixing up whitespace...done"))) @@ -7639,7 +7922,7 @@ `vhdl-fix-case-buffer'." (interactive "r") (setq end (save-excursion (goto-char end) (point-marker))) - (vhdl-indent-region beg end nil) + (vhdl-indent-region beg end) (let ((vhdl-align-groups t)) (vhdl-align-region beg end)) (vhdl-fix-case-region beg end)) @@ -7720,7 +8003,7 @@ (vhdl-prepare-search-2 (end-of-line) ;; look whether in process - (if (not (and (re-search-backward "^\\s-*\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(process\\|end\\s-+process\\)\\>" nil t) + (if (not (and (re-search-backward "^\\s-*\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(process\\|end\\s-+process\\)\\>" nil t) (equal (upcase (match-string 2)) "PROCESS") (save-excursion (re-search-forward "^\\s-*end\\s-+process\\>" nil t)))) (error "ERROR: Not within a process") @@ -7735,7 +8018,7 @@ (vhdl-prepare-search-2 (goto-char (point-min)) (message "Updating sensitivity lists...") - (while (re-search-forward "^\\s-*\\(\\w+[ \t\n]*:[ \t\n]*\\)?process\\>" nil t) + (while (re-search-forward "^\\s-*\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?process\\>" nil t) (goto-char (match-beginning 0)) (condition-case nil (vhdl-update-sensitivity-list) (error ""))) (message "Updating sensitivity lists...done")))) @@ -7744,9 +8027,13 @@ "Update sensitivity list." (let ((proc-beg (point)) (proc-end (re-search-forward "^\\s-*end\\s-+process\\>" nil t)) - (proc-mid (re-search-backward "^\\s-*begin\\>" nil t)) + (proc-mid (vhdl-re-search-backward + "\\(\\(\\\\)\\|^\\s-*process\\>\\)" nil t)) seq-region-list) (cond + ;; error if 'begin' keyword missing + ((not (match-string 2)) + (error "ERROR: No 'begin' keyword found")) ;; search for wait statement (no sensitivity list allowed) ((progn (goto-char proc-mid) (vhdl-re-search-forward "\\" proc-end t)) @@ -7780,19 +8067,19 @@ ;; case expression ((re-search-forward "^\\s-*case\\>" proc-end t) (re-search-forward "\\" proc-end t)) - ;; parameter list of procedure call - ((and (re-search-forward "^\\s-*\\w+[ \t\n]*(" proc-end t) + ;; parameter list of procedure call, array index + ((and (re-search-forward "^\\s-*\\(\\w\\|\\.\\)+[ \t\n\r\f]*(" proc-end t) (1- (point))) (progn (backward-char) (forward-sexp) (while (looking-at "(") (forward-sexp)) (point))))) - name read-list sens-list signal-list + name field read-list sens-list signal-list sens-beg sens-end beg end margin) ;; scan for signals in old sensitivity list (goto-char proc-beg) (re-search-forward "\\" proc-mid t) - (if (not (looking-at "[ \t\n]*(")) + (if (not (looking-at "[ \t\n\r\f]*(")) (setq sens-beg (point)) - (setq sens-beg (re-search-forward "\\([ \t\n]*\\)([ \t\n]*" nil t)) + (setq sens-beg (re-search-forward "\\([ \t\n\r\f]*\\)([ \t\n\r\f]*" nil t)) (goto-char (match-end 1)) (forward-sexp) (setq sens-end (1- (point))) @@ -7825,15 +8112,17 @@ (< (point) (caar tmp-list))) (setq tmp-list (cdr tmp-list))) (and tmp-list (< (point) (cdar tmp-list)))))) - (while (vhdl-re-search-forward "[^'\"]\\<\\([a-zA-Z]\\w*\\)\\>[ \t\n]*\\('\\(\\w+\\)\\|\\(=>\\)\\)?" end t) + (while (vhdl-re-search-forward "[^'\".]\\<\\([a-zA-Z]\\w*\\)\\(\\(\\.\\w+\\|[ \t\n\r\f]*([^)]*)\\)*\\)[ \t\n\r\f]*\\('\\(\\w+\\)\\|\\(=>\\)\\)?" end t) (setq name (match-string 1)) - (when (and (not (match-string 4)) ; not when formal parameter - (not (and (match-string 3) ; not event attribute - (not (member (downcase (match-string 3)) + (when vhdl-array-index-record-field-in-sensitivity-list + (setq field (match-string 2))) + (when (and (not (match-string 6)) ; not when formal parameter + (not (and (match-string 5) ; not event attribute + (not (member (downcase (match-string 5)) '("event" "last_event" "transaction"))))) (member (downcase name) signal-list)) - (unless (member-ignore-case name read-list) - (setq read-list (cons name read-list)))) + (unless (member-ignore-case (concat name field) read-list) + (setq read-list (cons (concat name field) read-list)))) (goto-char (match-end 1))))) (setq scan-regions-list (cdr scan-regions-list))) ;; update sensitivity list @@ -7879,17 +8168,17 @@ (goto-char (point-min)) (if (not (re-search-forward (concat "^entity\\s-+" entity-name "\\>") nil t)) (error "ERROR: Entity \"%s\" not found:\n --> see option `vhdl-entity-file-name'" entity-name) - (when (setq beg (re-search-forward - "^\\s-*port[ \t\n]*(" + (when (setq beg (vhdl-re-search-forward + "\\" nil t)) t)) (setq end (save-excursion (backward-char) (forward-sexp) (point))) (vhdl-forward-syntactic-ws) (while (< (point) end) - (when (looking-at "signal[ \t\n]+") + (when (looking-at "signal[ \t\n\r\f]+") (goto-char (match-end 0))) - (while (looking-at "\\(\\w+\\)[ \t\n,]+") + (while (looking-at "\\(\\w+\\)[ \t\n\r\f,]+") (setq signal-list (cons (downcase (match-string 1)) signal-list)) (goto-char (match-end 0)) @@ -7908,12 +8197,12 @@ (when (= 0 (nth 0 (parse-partial-sexp beg (point)))) (if (match-string 2) ;; scan signal name - (while (looking-at "[ \t\n,]+\\(\\w+\\)") + (while (looking-at "[ \t\n\r\f,]+\\(\\w+\\)") (setq signal-list (cons (downcase (match-string 1)) signal-list)) (goto-char (match-end 0))) ;; scan alias name, check is alias of (declared) signal - (when (and (looking-at "[ \t\n]+\\(\\w+\\)[^;]*\\")) - (when (eq vhdl-reset-kind 'async) + (when (eq reset-kind 'query) + (setq reset-kind + (if (eq (vhdl-decision-query + "" "(a)synchronous or (s)ynchronous reset?" t) ?a) + 'async + 'sync))) + (when (eq reset-kind 'async) (insert ", ") (setq reset (or (and (not (equal "" vhdl-reset-name)) (progn (insert vhdl-reset-name) vhdl-reset-name)) @@ -9257,7 +9567,7 @@ (unless (vhdl-standard-p '87) (vhdl-insert-keyword " IS")) (insert "\n") (vhdl-template-begin-end "PROCESS" label margin) - (when seq (setq reset (vhdl-template-seq-process clock reset))) + (when seq (setq reset (vhdl-template-seq-process clock reset reset-kind))) (when vhdl-prompt-for-comments (setq final-pos (point-marker)) (vhdl-prepare-search-2 @@ -9589,13 +9899,13 @@ (in-arglist (vhdl-in-argument-list-p))) (vhdl-prepare-search-2 (if (or (save-excursion - (and (vhdl-re-search-backward - "\\" - nil t) - (not (progn (backward-word 1) (looking-at "\\"))))) + (progn (vhdl-beginning-of-block) + (looking-at "\\s-*\\(\\w+\\s-*:\\s-*\\)?\\<\\(\\"))) (save-excursion (backward-word 1) (looking-at "\\"))) (vhdl-insert-keyword "VARIABLE ") - (vhdl-insert-keyword "SHARED VARIABLE "))) + (if (vhdl-standard-p '87) + (error "ERROR: Not within sequential block") + (vhdl-insert-keyword "SHARED VARIABLE ")))) (when (vhdl-template-field "names" nil t start (point)) (insert " : ") (when in-arglist (vhdl-template-field "[IN | OUT | INOUT]" " " t)) @@ -9692,14 +10002,16 @@ (concat (if vhdl-clock-rising-edge "rising" "falling") " clock edge"))))) -(defun vhdl-template-seq-process (clock reset) +(defun vhdl-template-seq-process (clock reset reset-kind) "Insert a template for the body of a sequential process." (let ((margin (current-indentation)) position) (vhdl-insert-keyword "IF ") - (when (eq vhdl-reset-kind 'async) + (when vhdl-conditions-in-parenthesis (insert "(")) + (when (eq reset-kind 'async) (insert reset " = " (if vhdl-reset-active-high vhdl-one-string vhdl-zero-string)) + (when vhdl-conditions-in-parenthesis (insert ")")) (vhdl-insert-keyword " THEN") (vhdl-comment-insert-inline (concat "asynchronous reset (active " @@ -9707,7 +10019,8 @@ (insert "\n") (indent-to (+ margin vhdl-basic-offset)) (setq position (point)) (insert "\n") (indent-to margin) - (vhdl-insert-keyword "ELSIF ")) + (vhdl-insert-keyword "ELSIF ") + (when vhdl-conditions-in-parenthesis (insert "("))) (if (eq vhdl-clock-edge-condition 'function) (insert (if vhdl-clock-rising-edge "rising" "falling") "_edge(" clock ")") @@ -9715,17 +10028,20 @@ (vhdl-insert-keyword " AND ") (insert clock " = " (if vhdl-clock-rising-edge vhdl-one-string vhdl-zero-string))) + (when vhdl-conditions-in-parenthesis (insert ")")) (vhdl-insert-keyword " THEN") (vhdl-comment-insert-inline (concat (if vhdl-clock-rising-edge "rising" "falling") " clock edge")) (insert "\n") (indent-to (+ margin vhdl-basic-offset)) - (when (eq vhdl-reset-kind 'sync) + (when (eq reset-kind 'sync) (vhdl-insert-keyword "IF ") + (when vhdl-conditions-in-parenthesis (insert "(")) (setq reset (or (and (not (equal "" vhdl-reset-name)) (progn (insert vhdl-reset-name) vhdl-reset-name)) (vhdl-template-field "reset name") "")) (insert " = " (if vhdl-reset-active-high vhdl-one-string vhdl-zero-string)) + (when vhdl-conditions-in-parenthesis (insert ")")) (vhdl-insert-keyword " THEN") (vhdl-comment-insert-inline (concat "synchronous reset (active " @@ -9737,7 +10053,7 @@ (insert "\n") (indent-to (+ margin (* 2 vhdl-basic-offset))) (insert "\n") (indent-to (+ margin vhdl-basic-offset)) (vhdl-insert-keyword "END IF;")) - (when (eq vhdl-reset-kind 'none) + (when (eq reset-kind 'none) (setq position (point))) (insert "\n") (indent-to margin) (vhdl-insert-keyword "END IF;") @@ -9761,21 +10077,11 @@ (insert library ";") (when package (insert "\n") - (indent-to margin))) - (when package - (vhdl-insert-keyword "USE ") - (insert library "." package) - (vhdl-insert-keyword ".ALL;"))))) - -(defun vhdl-template-package-math-complex () - "Insert specification of `math_complex' package." - (interactive) - (vhdl-template-standard-package "ieee" "math_complex")) - -(defun vhdl-template-package-math-real () - "Insert specification of `math_real' package." - (interactive) - (vhdl-template-standard-package "ieee" "math_real")) + (indent-to margin)))) + (when package + (vhdl-insert-keyword "USE ") + (insert library "." package) + (vhdl-insert-keyword ".ALL;")))) (defun vhdl-template-package-numeric-bit () "Insert specification of `numeric_bit' package." @@ -9822,6 +10128,56 @@ (interactive) (vhdl-template-standard-package "std" "textio")) +(defun vhdl-template-package-fundamental-constants () + "Insert specification of `fundamental_constants' package." + (interactive) + (vhdl-template-standard-package "ieee" "fundamental_constants")) + +(defun vhdl-template-package-material-constants () + "Insert specification of `material_constants' package." + (interactive) + (vhdl-template-standard-package "ieee" "material_constants")) + +(defun vhdl-template-package-energy-systems () + "Insert specification of `energy_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "energy_systems")) + +(defun vhdl-template-package-electrical-systems () + "Insert specification of `electrical_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "electrical_systems")) + +(defun vhdl-template-package-mechanical-systems () + "Insert specification of `mechanical_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "mechanical_systems")) + +(defun vhdl-template-package-radiant-systems () + "Insert specification of `radiant_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "radiant_systems")) + +(defun vhdl-template-package-thermal-systems () + "Insert specification of `thermal_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "thermal_systems")) + +(defun vhdl-template-package-fluidic-systems () + "Insert specification of `fluidic_systems' package." + (interactive) + (vhdl-template-standard-package "ieee" "fluidic_systems")) + +(defun vhdl-template-package-math-complex () + "Insert specification of `math_complex' package." + (interactive) + (vhdl-template-standard-package "ieee" "math_complex")) + +(defun vhdl-template-package-math-real () + "Insert specification of `math_real' package." + (interactive) + (vhdl-template-standard-package "ieee" "math_real")) + (defun vhdl-template-directive (directive) "Insert directive." (unless (= (current-indentation) (current-column)) @@ -9900,6 +10256,9 @@ (insert (user-full-name)) (when user-mail-address (insert " <" user-mail-address ">"))) (goto-char beg) + (while (search-forward "" end t) + (replace-match (user-full-name) t t)) + (goto-char beg) (while (search-forward "" end t) (replace-match (user-login-name) t t)) (goto-char beg) @@ -9915,7 +10274,7 @@ (while (search-forward "" end t) (replace-match (concat "VHDL" (cond ((vhdl-standard-p '87) "'87") - ((vhdl-standard-p '93) "'93")) + ((vhdl-standard-p '93) "'93/02")) (when (vhdl-standard-p 'ams) ", VHDL-AMS") (when (vhdl-standard-p 'math) ", Math Packages")) t t)) (goto-char beg) @@ -10021,9 +10380,10 @@ "Displays one line of dashes." (interactive) (while (= (preceding-char) ?-) (delete-char -2)) + (insert "--") (let* ((col (current-column)) (len (- end-comment-column col))) - (insert-char ?- len))) + (insert-char vhdl-comment-display-line-char len))) (defun vhdl-comment-append-inline () "Append empty inline comment to current line." @@ -10084,7 +10444,7 @@ (goto-char beg) (beginning-of-line) (setq beg (point)) - (if (looking-at comment-start) + (if (looking-at (concat "\\s-*" comment-start)) (comment-region beg end '(4)) (comment-region beg end)))) @@ -10119,7 +10479,7 @@ (goto-char beg) (beginning-of-line) (while (< (point) end) - (when (looking-at "^.*[^ \t\n-]+\\(\\s-*--.*\\)$") + (when (looking-at "^.*[^ \t\n\r\f-]+\\(\\s-*--.*\\)$") (delete-region (match-beginning 1) (match-end 1))) (beginning-of-line 2)))) @@ -10323,9 +10683,9 @@ (self-insert-command count) (cond ((>= (current-column) (+ 2 end-comment-column)) (backward-char 1) - (skip-chars-backward "^ \t\n") + (skip-chars-backward "^ \t\n\r\f") (indent-new-comment-line) - (skip-chars-forward "^ \t\n") + (skip-chars-forward "^ \t\n\r\f") (forward-char 1)) ((>= (current-column) end-comment-column) (indent-new-comment-line)) @@ -10369,7 +10729,9 @@ (vhdl-fix-case-region-1 position (point) vhdl-upper-case-attributes (concat "'" vhdl-attributes-regexp)) (vhdl-fix-case-region-1 position (point) vhdl-upper-case-enum-values - vhdl-enum-values-regexp)) + vhdl-enum-values-regexp) + (vhdl-fix-case-region-1 position (point) vhdl-upper-case-constants + vhdl-constants-regexp)) (when (or (not (equal string "")) (not optional)) (insert (or follow-string ""))) (if (equal string "") nil string))) @@ -10455,55 +10817,57 @@ (defun vhdl-beginning-of-block () "Move cursor to the beginning of the enclosing block." (let (pos) - (save-excursion - (beginning-of-line) - ;; search backward for block beginning or end - (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t)) - ;; not consider subprogram declarations - (or (and (match-string 5) - (save-match-data - (save-excursion - (goto-char (match-end 5)) - (forward-word 1) - (vhdl-forward-syntactic-ws) - (when (looking-at "(") - (forward-sexp)) - (re-search-forward "\\\\|\\(;\\)" nil t)) - (match-string 1))) - ;; not consider configuration specifications - (and (match-string 6) - (save-match-data - (save-excursion - (vhdl-end-of-block) - (beginning-of-line) - (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) - (match-string 2)) - ;; skip subblock if block end found - (vhdl-beginning-of-block))) + (vhdl-prepare-search-2 + (save-excursion + (beginning-of-line) + ;; search backward for block beginning or end + (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + ;; not consider subprogram declarations + (or (and (match-string 5) + (save-match-data + (save-excursion + (goto-char (match-end 5)) + (forward-word 1) + (vhdl-forward-syntactic-ws) + (when (looking-at "(") + (forward-sexp)) + (re-search-forward "\\\\|\\(;\\)" nil t)) + (match-string 1))) + ;; not consider configuration specifications + (and (match-string 6) + (save-match-data + (save-excursion + (vhdl-end-of-block) + (beginning-of-line) + (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) + (match-string 2)) + ;; skip subblock if block end found + (vhdl-beginning-of-block)))) (when pos (goto-char pos)))) (defun vhdl-end-of-block () "Move cursor to the end of the enclosing block." (let (pos) - (save-excursion - (end-of-line) - ;; search forward for block beginning or end - (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t)) - ;; not consider subprogram declarations - (or (and (match-string 5) - (save-match-data - (save-excursion (re-search-forward "\\\\|\\(;\\)" nil t)) - (match-string 1))) - ;; not consider configuration specifications - (and (match-string 6) - (save-match-data - (save-excursion - (vhdl-end-of-block) - (beginning-of-line) - (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) - (not (match-string 2))) - ;; skip subblock if block beginning found - (vhdl-end-of-block))) + (vhdl-prepare-search-2 + (save-excursion + (end-of-line) + ;; search forward for block beginning or end + (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + ;; not consider subprogram declarations + (or (and (match-string 5) + (save-match-data + (save-excursion (re-search-forward "\\\\|\\(;\\)" nil t)) + (match-string 1))) + ;; not consider configuration specifications + (and (match-string 6) + (save-match-data + (save-excursion + (vhdl-end-of-block) + (beginning-of-line) + (not (looking-at "^\\s-*end\\s-+\\(for\\|generate\\|loop\\)\\>")))))))) + (not (match-string 2))) + ;; skip subblock if block beginning found + (vhdl-end-of-block)))) (when pos (goto-char pos)))) (defun vhdl-sequential-statement-p () @@ -10518,7 +10882,7 @@ (< start (point))) ;; ... a sequential block (progn (vhdl-beginning-of-block) - (looking-at "^\\s-*\\(\\(\\w+[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(\\w+[ \t\n]+\\)?\\(procedural\\|process\\)\\)\\>"))))))) + (looking-at "^\\s-*\\(\\(\\w+[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(\\w+[ \t\n\r\f]+\\)?\\(procedural\\|process\\)\\)\\>"))))))) (defun vhdl-in-argument-list-p () "Check if within an argument list." @@ -10542,7 +10906,9 @@ (progn (insert " ") (unexpand-abbrev) - (delete-char -1)) + (backward-word 1) + (vhdl-case-word 1) + (delete-char 1)) (if (not vhdl-electric-mode) (progn (insert " ") @@ -10821,7 +11187,10 @@ (defun vhdl-parse-string (string &optional optional) "Check that the text following point matches the regexp in STRING." (if (looking-at string) - (goto-char (match-end 0)) + (progn (goto-char (match-end 0)) + (when (vhdl-in-literal) + (end-of-line)) + (point)) (unless optional (throw 'parse (format "ERROR: Syntax error near line %s, expecting \"%s\"" (vhdl-current-line) string))) @@ -10919,7 +11288,9 @@ port-dir (car port-dir-car)) (setcar port-dir-car (cond ((equal port-dir "in") "out") + ((equal port-dir "IN") "OUT") ((equal port-dir "out") "in") + ((equal port-dir "OUT") "IN") (t port-dir))) (setq port-list (cdr port-list))) (setq vhdl-port-reversed-direction (not vhdl-port-reversed-direction)) @@ -10949,20 +11320,23 @@ (message "Reading port of %s \"%s\"..." decl-type name) (vhdl-forward-syntactic-ws) ;; parse generic clause - (when (vhdl-parse-string "generic[ \t\n]*(" t) + (when (vhdl-parse-string "generic[ \t\n\r\f]*(" t) ;; parse group comment and spacing (setq group-comment (vhdl-parse-group-comment)) - (setq end-of-list (vhdl-parse-string ")[ \t\n]*;[ \t\n]*" t)) + (setq end-of-list (vhdl-parse-string ")[ \t\n\r\f]*;[ \t\n\r\f]*" t)) (while (not end-of-list) ;; parse names (accept extended identifiers) - (vhdl-parse-string "\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*") + (vhdl-parse-string "\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*") (setq names (list (match-string-no-properties 1))) - (while (vhdl-parse-string ",[ \t\n]*\\(\\w+\\)[ \t\n]*" t) + (while (vhdl-parse-string ",[ \t\n\r\f]*\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*" t) (setq names (append names (list (match-string-no-properties 1))))) ;; parse type - (vhdl-parse-string ":[ \t\n]*\\([^():;\n]+\\)") + (vhdl-parse-string ":[ \t\n\r\f]*\\([^():;\n]+\\)") (setq type (match-string-no-properties 1)) + (when (vhdl-in-comment-p) ; if stuck in comment + (setq type (concat type (and (vhdl-parse-string ".*") + (match-string-no-properties 0))))) (setq comment nil) (while (looking-at "(") (setq type @@ -10980,7 +11354,7 @@ (setq type (substring type 0 (match-end 1))) ;; parse initialization expression (setq init nil) - (when (vhdl-parse-string ":=[ \t\n]*" t) + (when (vhdl-parse-string ":=[ \t\n\r\f]*" t) (vhdl-parse-string "\\([^();\n]*\\)") (setq init (match-string-no-properties 1)) (while (looking-at "(") @@ -11014,28 +11388,31 @@ ;; parse group comment and spacing (setq group-comment (vhdl-parse-group-comment)))) ;; parse port clause - (when (vhdl-parse-string "port[ \t\n]*(" t) + (when (vhdl-parse-string "port[ \t\n\r\f]*(" t) ;; parse group comment and spacing (setq group-comment (vhdl-parse-group-comment)) - (setq end-of-list (vhdl-parse-string ")[ \t\n]*;[ \t\n]*" t)) + (setq end-of-list (vhdl-parse-string ")[ \t\n\r\f]*;[ \t\n\r\f]*" t)) (while (not end-of-list) ;; parse object (setq object - (and (vhdl-parse-string "\\<\\(signal\\|quantity\\|terminal\\)\\>[ \t\n]*" t) + (and (vhdl-parse-string "\\<\\(signal\\|quantity\\|terminal\\)\\>[ \t\n\r\f]*" t) (match-string-no-properties 1))) ;; parse names (accept extended identifiers) - (vhdl-parse-string "\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*") + (vhdl-parse-string "\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*") (setq names (list (match-string-no-properties 1))) - (while (vhdl-parse-string ",[ \t\n]*\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*" t) + (while (vhdl-parse-string ",[ \t\n\r\f]*\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*" t) (setq names (append names (list (match-string-no-properties 1))))) ;; parse direction - (vhdl-parse-string ":[ \t\n]*") + (vhdl-parse-string ":[ \t\n\r\f]*") (setq direct - (and (vhdl-parse-string "\\<\\(in\\|out\\|inout\\|buffer\\|linkage\\)\\>[ \t\n]+" t) + (and (vhdl-parse-string "\\<\\(in\\|out\\|inout\\|buffer\\|linkage\\)\\>[ \t\n\r\f]+" t) (match-string-no-properties 1))) ;; parse type (vhdl-parse-string "\\([^();\n]+\\)") (setq type (match-string-no-properties 1)) + (when (vhdl-in-comment-p) ; if stuck in comment + (setq type (concat type (and (vhdl-parse-string ".*") + (match-string-no-properties 0))))) (setq comment nil) (while (looking-at "(") (setq type (concat type @@ -11313,7 +11690,7 @@ (setq port-list (cdr port-list)) (insert (if port-list "," ");")) ;; paste comment - (when (or vhdl-include-direction-comments + (when (or (and vhdl-include-direction-comments (nth 2 port)) vhdl-include-type-comments (and vhdl-include-port-comments (nth 4 port))) (vhdl-comment-insert-inline @@ -11454,12 +11831,17 @@ ;; paste type (insert " : " (nth 3 port)) ;; paste initialization (inputs only) - (when (and initialize (equal "IN" (upcase (nth 2 port)))) - (insert " := " (if (string-match "(.+)" (nth 3 port)) - "(others => '0')" "'0'"))) + (when (and initialize (nth 2 port) (equal "IN" (upcase (nth 2 port)))) + (insert " := " + (cond ((string-match "integer" (nth 3 port)) "0") + ((string-match "natural" (nth 3 port)) "0") + ((string-match "positive" (nth 3 port)) "0") + ((string-match "real" (nth 3 port)) "0.0") + ((string-match "(.+)" (nth 3 port)) "(others => '0')") + (t "'0'")))) (insert ";") ;; paste comment - (when (or vhdl-include-direction-comments + (when (or (and vhdl-include-direction-comments (nth 2 port)) (and vhdl-include-port-comments (nth 4 port))) (vhdl-comment-insert-inline (concat @@ -11495,8 +11877,14 @@ (setq name (car (nth 0 port))) (insert (vhdl-replace-string vhdl-actual-port-name name)) ;; paste initialization - (insert " <= " (if (string-match "(.+)" (nth 3 port)) - "(others => '0')" "'0'") ";")) + (insert " <= " + (cond ((string-match "integer" (nth 3 port)) "0") + ((string-match "natural" (nth 3 port)) "0") + ((string-match "positive" (nth 3 port)) "0") + ((string-match "real" (nth 3 port)) "0.0") + ((string-match "(.+)" (nth 3 port)) "(others => '0')") + (t "'0'")) + ";")) (setq port-list (cdr port-list)) (when (and port-list (equal "IN" (upcase (nth 2 (car port-list))))) @@ -11609,7 +11997,9 @@ ;; paste custom declarations (unless (equal "" vhdl-testbench-declarations) (insert "\n") - (vhdl-insert-string-or-file vhdl-testbench-declarations)) + (setq position (point)) + (vhdl-insert-string-or-file vhdl-testbench-declarations) + (vhdl-indent-region position (point))) (setq position (point)) (insert "\n\n") (vhdl-comment-display-line) (insert "\n") @@ -11638,7 +12028,9 @@ ;; paste custom statements (unless (equal "" vhdl-testbench-statements) (insert "\n") - (vhdl-insert-string-or-file vhdl-testbench-statements)) + (setq position (point)) + (vhdl-insert-string-or-file vhdl-testbench-statements) + (vhdl-indent-region position (point))) (insert "\n") (indent-to vhdl-basic-offset) (unless (eq vhdl-testbench-create-files 'none) @@ -11707,8 +12099,8 @@ ;; check if within function declaration (setq pos (point)) (end-of-line) - (when (looking-at "[ \t\n]*\\((\\|;\\|is\\>\\)") (goto-char (match-end 0))) - (unless (and (re-search-backward "^\\s-*\\(\\(procedure\\)\\|\\(\\(pure\\|impure\\)\\s-+\\)?function\\)\\s-+\\(\"?\\w+\"?\\)[ \t\n]*\\(\\((\\)\\|;\\|is\\>\\)" nil t) + (when (looking-at "[ \t\n\r\f]*\\((\\|;\\|is\\>\\)") (goto-char (match-end 0))) + (unless (and (re-search-backward "^\\s-*\\(\\(procedure\\)\\|\\(\\(pure\\|impure\\)\\s-+\\)?function\\)\\s-+\\(\"?\\w+\"?\\)[ \t\n\r\f]*\\(\\((\\)\\|;\\|is\\>\\)" nil t) (goto-char (match-end 0)) (save-excursion (backward-char) (forward-sexp) @@ -11721,21 +12113,21 @@ ;; parse parameter list (setq group-comment (vhdl-parse-group-comment)) (setq end-of-list (or end-of-list - (vhdl-parse-string ")[ \t\n]*\\(;\\|\\(is\\|return\\)\\>\\)" t))) + (vhdl-parse-string ")[ \t\n\r\f]*\\(;\\|\\(is\\|return\\)\\>\\)" t))) (while (not end-of-list) ;; parse object (setq object - (and (vhdl-parse-string "\\(constant\\|signal\\|variable\\|file\\|quantity\\|terminal\\)[ \t\n]*" t) + (and (vhdl-parse-string "\\(constant\\|signal\\|variable\\|file\\|quantity\\|terminal\\)[ \t\n\r\f]*" t) (match-string-no-properties 1))) ;; parse names (accept extended identifiers) - (vhdl-parse-string "\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*") + (vhdl-parse-string "\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*") (setq names (list (match-string-no-properties 1))) - (while (vhdl-parse-string ",[ \t\n]*\\(\\w+\\|\\\\[^\\]+\\\\\\)[ \t\n]*" t) + (while (vhdl-parse-string ",[ \t\n\r\f]*\\(\\\\[^\\]+\\\\\\|\\w+\\)[ \t\n\r\f]*" t) (setq names (append names (list (match-string-no-properties 1))))) ;; parse direction - (vhdl-parse-string ":[ \t\n]*") + (vhdl-parse-string ":[ \t\n\r\f]*") (setq direct - (and (vhdl-parse-string "\\(in\\|out\\|inout\\|buffer\\|linkage\\)[ \t\n]+" t) + (and (vhdl-parse-string "\\(in\\|out\\|inout\\|buffer\\|linkage\\)[ \t\n\r\f]+" t) (match-string-no-properties 1))) ;; parse type (vhdl-parse-string "\\([^():;\n]+\\)") @@ -11757,7 +12149,7 @@ (setq type (substring type 0 (match-end 1))) ;; parse initialization expression (setq init nil) - (when (vhdl-parse-string ":=[ \t\n]*" t) + (when (vhdl-parse-string ":=[ \t\n\r\f]*" t) (vhdl-parse-string "\\([^();\n]*\\)") (setq init (match-string-no-properties 1)) (while (looking-at "(") @@ -11787,7 +12179,7 @@ (vhdl-parse-string "\\(;\\|\\(is\\|\\(return\\)\\)\\>\\)\\s-*") ;; parse return type (when (match-string 3) - (vhdl-parse-string "[ \t\n]*\\(.+\\)[ \t\n]*\\(;\\|is\\>\\)\\s-*") + (vhdl-parse-string "[ \t\n\r\f]*\\(.+\\)[ \t\n\r\f]*\\(;\\|is\\>\\)\\s-*") (setq return-type (match-string-no-properties 1)) (when (and return-type (string-match "\\(\\s-*--\\s-*\\)\\(.*\\)" return-type)) @@ -12015,17 +12407,15 @@ (defalias 'he-list-beg 'vhdl-he-list-beg)) ;; function for expanding abbrevs and dabbrevs -(defun vhdl-expand-abbrev (arg)) -(fset 'vhdl-expand-abbrev (make-hippie-expand-function - '(try-expand-dabbrev - try-expand-dabbrev-all-buffers - vhdl-try-expand-abbrev))) +(defalias 'vhdl-expand-abbrev (make-hippie-expand-function + '(try-expand-dabbrev + try-expand-dabbrev-all-buffers + vhdl-try-expand-abbrev))) ;; function for expanding parenthesis -(defun vhdl-expand-paren (arg)) -(fset 'vhdl-expand-paren (make-hippie-expand-function - '(try-expand-list - try-expand-list-all-buffers))) +(defalias 'vhdl-expand-paren (make-hippie-expand-function + '(try-expand-list + try-expand-list-all-buffers))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Case fixing @@ -12049,7 +12439,7 @@ (< vhdl-progress-interval (- (nth 1 (current-time)) last-update))) (message "Fixing case... (%2d%s)" - (+ (* count 25) (/ (* 25 (- (point) beg)) (- end beg))) + (+ (* count 20) (/ (* 20 (- (point) beg)) (- end beg))) "%") (setq last-update (nth 1 (current-time))))) (goto-char end))))) @@ -12066,6 +12456,8 @@ beg end vhdl-upper-case-attributes (concat "'" vhdl-attributes-regexp) 2) (vhdl-fix-case-region-1 beg end vhdl-upper-case-enum-values vhdl-enum-values-regexp 3) + (vhdl-fix-case-region-1 + beg end vhdl-upper-case-constants vhdl-constants-regexp 4) (when vhdl-progress-interval (message "Fixing case...done"))) (defun vhdl-fix-case-buffer () @@ -12091,6 +12483,9 @@ (upcase-word 1)) (when (and vhdl-upper-case-enum-values (looking-at vhdl-enum-values-regexp)) + (upcase-word 1)) + (when (and vhdl-upper-case-constants + (looking-at vhdl-constants-regexp)) (upcase-word 1))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -12205,6 +12600,9 @@ (interactive) (let ((no-stats 0) (no-code-lines 0) + (no-empty-lines 0) + (no-comm-lines 0) + (no-comments 0) (no-lines (count-lines (point-min) (point-max)))) (save-excursion ;; count statements @@ -12218,15 +12616,40 @@ (while (not (eobp)) (unless (looking-at "^\\s-*\\(--.*\\)?$") (setq no-code-lines (1+ no-code-lines))) - (beginning-of-line 2))) + (beginning-of-line 2)) + ;; count empty lines + (goto-char (point-min)) + (while (and (re-search-forward "^\\s-*$" nil t) + (not (eq (point) (point-max)))) + (if (match-string 1) + (goto-char (match-end 1)) + (setq no-empty-lines (1+ no-empty-lines)) + (unless (eq (point) (point-max)) + (forward-char)))) + ;; count comment-only lines + (goto-char (point-min)) + (while (re-search-forward "^\\s-*--.*" nil t) + (if (match-string 1) + (goto-char (match-end 1)) + (setq no-comm-lines (1+ no-comm-lines)))) + ;; count comments + (goto-char (point-min)) + (while (re-search-forward "--.*" nil t) + (if (match-string 1) + (goto-char (match-end 1)) + (setq no-comments (1+ no-comments))))) ;; print results (message "\n\ File statistics: \"%s\"\n\ ---------------------\n\ -# statements : %5d\n\ -# code lines : %5d\n\ -# total lines : %5d\n\ " - (buffer-file-name) no-stats no-code-lines no-lines) +# statements : %5d\n\ +# code lines : %5d\n\ +# empty lines : %5d\n\ +# comment lines : %5d\n\ +# comments : %5d\n\ +# total lines : %5d\n\ " + (buffer-file-name) no-stats no-code-lines no-empty-lines + no-comm-lines no-comments no-lines) (unless vhdl-emacs-21 (vhdl-show-messages)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -12390,18 +12813,18 @@ (concat "\\(^\\)\\s-*\\(" ;; generic/port clause - "\\(generic\\|port\\)[ \t\n]*(\\|" + "\\(generic\\|port\\)[ \t\n\r\f]*(\\|" ;; component "component\\>\\|" ;; component instantiation - "\\(\\w\\|\\s_\\)+[ \t\n]*:[ \t\n]*" - "\\(\\(component\\|configuration\\|entity\\)[ \t\n]+\\)?" - "\\(\\w\\|\\s_\\)+\\([ \t\n]*(\\(\\w\\|\\s_\\)+)\\)?[ \t\n]*" - "\\(generic\\|port\\)[ \t\n]+map[ \t\n]*(\\|" + "\\(\\w\\|\\s_\\)+[ \t\n\r\f]*:[ \t\n\r\f]*" + "\\(\\(component\\|configuration\\|entity\\)[ \t\n\r\f]+\\)?" + "\\(\\w\\|\\s_\\)+\\([ \t\n\r\f]*(\\(\\w\\|\\s_\\)+)\\)?[ \t\n\r\f]*" + "\\(generic\\|port\\)[ \t\n\r\f]+map[ \t\n\r\f]*(\\|" ;; subprogram "\\(function\\|procedure\\)\\>\\|" ;; process, block - "\\(\\(\\w\\|\\s_\\)+[ \t\n]*:[ \t\n]*\\)?\\(process\\|block\\)\\>\\|" + "\\(\\(\\w\\|\\s_\\)+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(process\\|block\\)\\>\\|" ;; configuration declaration "configuration\\>" "\\)") @@ -12414,7 +12837,7 @@ (beginning-of-line) (cond ;; generic/port clause - ((looking-at "^\\s-*\\(generic\\|port\\)[ \t\n]*(") + ((looking-at "^\\s-*\\(generic\\|port\\)[ \t\n\r\f]*(") (goto-char (match-end 0)) (backward-char) (forward-sexp)) @@ -12424,16 +12847,16 @@ ;; component instantiation ((looking-at (concat - "^\\s-*\\w+\\s-*:[ \t\n]*" - "\\(\\(component\\|configuration\\|entity\\)[ \t\n]+\\)?" - "\\w+\\(\\s-*(\\w+)\\)?[ \t\n]*" - "\\(generic\\|port\\)\\s-+map[ \t\n]*(")) + "^\\s-*\\w+\\s-*:[ \t\n\r\f]*" + "\\(\\(component\\|configuration\\|entity\\)[ \t\n\r\f]+\\)?" + "\\w+\\(\\s-*(\\w+)\\)?[ \t\n\r\f]*" + "\\(generic\\|port\\)\\s-+map[ \t\n\r\f]*(")) (goto-char (match-end 0)) (backward-char) (forward-sexp) (setq pos (point)) (vhdl-forward-syntactic-ws) - (when (looking-at "port\\s-+map[ \t\n]*(") + (when (looking-at "port\\s-+map[ \t\n\r\f]*(") (goto-char (match-end 0)) (backward-char) (forward-sexp) @@ -12585,7 +13008,7 @@ ;; highlight labels of common constructs (list (concat - "^\\s-*\\(\\w+\\)\\s-*:[ \t\n]*\\(\\(" + "^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*\\(\\(" "assert\\|block\\|case\\|exit\\|for\\|if\\|loop\\|next\\|null\\|" "postponed\\|process\\|" (when (vhdl-standard-p 'ams) "procedural\\|") @@ -12596,14 +13019,14 @@ ;; highlight label and component name of component instantiations (list (concat - "^\\s-*\\(\\w+\\)\\s-*:[ \t\n]*\\(\\w+\\)" - "\\(\\s-*\\(--[^\n]*\\)?$\\|\\s-+\\(generic\\|port\\)\\s-+map\\>\\)") + "^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*\\(\\w+\\)[ \t\n\r\f]*" + "\\(--[^\n]*[ \t\n\r\f]+\\)*\\(generic\\|port\\)\\s-+map\\>") '(1 font-lock-function-name-face) '(2 font-lock-function-name-face)) ;; highlight label and instantiated unit of component instantiations (list (concat - "^\\s-*\\(\\w+\\)\\s-*:[ \t\n]*" + "^\\s-*\\(\\w+\\)\\s-*:[ \t\n\r\f]*" "\\(component\\|configuration\\|entity\\)\\s-+" "\\(\\w+\\)\\(\\.\\(\\w+\\)\\)?\\(\\s-*(\\(\\w+\\))\\)?") '(1 font-lock-function-name-face) '(3 font-lock-function-name-face) @@ -12638,7 +13061,7 @@ (list (concat "^\\s-*for\\s-+\\(\\w+\\(,\\s-*\\w+\\)*\\)\\>\\s-*" - "\\(:[ \t\n]*\\(\\w+\\)\\|[^i \t]\\)") + "\\(:[ \t\n\r\f]*\\(\\w+\\)\\|[^i \t]\\)") '(1 font-lock-function-name-face) '(4 font-lock-function-name-face nil t)) ;; highlight names in library clauses @@ -12662,8 +13085,8 @@ ;; highlight type/nature name in (sub)type/(sub)nature declarations (list (concat - "^\\s-*\\(sub\\)?\\(nature\\|type\\)\\s-+\\(\\w+\\)") - 3 'font-lock-type-face) + "^\\s-*\\(\\(sub\\)?\\(nature\\|type\\)\\|end\\s-+\\(record\\|protected\\)\\)\\s-+\\(\\w+\\)") + 5 'font-lock-type-face) ;; highlight signal/variable/constant declaration names (list "\\(:[^=]\\)" @@ -12867,6 +13290,7 @@ (list vhdl-functions-regexp 1 'vhdl-font-lock-function-face) (list vhdl-packages-regexp 1 'vhdl-font-lock-function-face) (list vhdl-enum-values-regexp 1 'vhdl-font-lock-enumvalue-face) + (list vhdl-constants-regexp 1 'font-lock-constant-face) (list vhdl-keywords-regexp 1 'font-lock-keyword-face))) ;; highlight words with special syntax. (setq vhdl-font-lock-keywords-3 @@ -12875,9 +13299,10 @@ (while syntax-alist (setq keywords (cons - (cons (concat "\\<\\(" (nth 1 (car syntax-alist)) "\\)\\>") + (list (concat "\\(" (nth 1 (car syntax-alist)) "\\)") 1 (vhdl-function-name - "vhdl-font-lock" (nth 0 (car syntax-alist)) "face")) + "vhdl-font-lock" (nth 0 (car syntax-alist)) "face") + (nth 4 (car syntax-alist))) keywords)) (setq syntax-alist (cdr syntax-alist))) keywords)) @@ -13066,7 +13491,7 @@ (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|entity\\|package\\)\\>" nil t) (while (and (re-search-backward "^[ \t]*\\(end\\|use\\)\\>" nil t) (equal "USE" (upcase (match-string 1)))) - (when (looking-at "^[ \t]*use[ \t\n]*\\(\\w+\\)\\.\\(\\w+\\)\\.\\w+") + (when (looking-at "^[ \t]*use[ \t\n\r\f]*\\(\\w+\\)\\.\\(\\w+\\)\\.\\w+") (setq lib-alist (cons (cons (match-string-no-properties 1) (vhdl-match-string-downcase 2)) lib-alist)))))) @@ -13140,7 +13565,7 @@ (setq big-files t)) ;; scan for entities (goto-char (point-min)) - (while (re-search-forward "^[ \t]*entity[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*entity[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((ent-name (match-string-no-properties 1)) (ent-key (downcase ent-name)) (ent-entry (aget ent-alist ent-key t)) @@ -13157,7 +13582,7 @@ lib-alist))))) ;; scan for architectures (goto-char (point-min)) - (while (re-search-forward "^[ \t]*architecture[ \t\n]+\\(\\w+\\)[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*architecture[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((arch-name (match-string-no-properties 1)) (arch-key (downcase arch-name)) (ent-name (match-string-no-properties 2)) @@ -13183,7 +13608,7 @@ arch-key (nth 5 ent-entry)))))) ;; scan for configurations (goto-char (point-min)) - (while (re-search-forward "^[ \t]*configuration[ \t\n]+\\(\\w+\\)[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*configuration[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((conf-name (match-string-no-properties 1)) (conf-key (downcase conf-name)) (conf-entry (aget conf-alist conf-key t)) @@ -13195,7 +13620,7 @@ arch-key comp-conf-list inst-key-list inst-comp-key inst-ent-key inst-arch-key inst-conf-key inst-lib-key) - (when (vhdl-re-search-forward "\\" nil t) + (while (re-search-forward "^[ \t]*package[ \t\n\r\f]+\\(body[ \t\n\r\f]+\\)?\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((pack-name (match-string-no-properties 2)) (pack-key (downcase pack-name)) (is-body (match-string-no-properties 1)) @@ -13250,7 +13675,7 @@ ;; scan for context clauses (setq lib-alist (vhdl-scan-context-clause)) ;; scan for component and subprogram declarations/bodies - (while (re-search-forward "^[ \t]*\\(component\\|function\\|procedure\\)[ \t\n]+\\(\\w+\\|\".*\"\\)" end-of-unit t) + (while (re-search-forward "^[ \t]*\\(component\\|function\\|procedure\\)[ \t\n\r\f]+\\(\\w+\\|\".*\"\\)" end-of-unit t) (if (equal (upcase (match-string 1)) "COMPONENT") (setq comp-name (match-string-no-properties 2) comp-alist @@ -13286,7 +13711,7 @@ (setq big-files t)) ;; scan for architectures (goto-char (point-min)) - (while (re-search-forward "^[ \t]*architecture[ \t\n]+\\(\\w+\\)[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) + (while (re-search-forward "^[ \t]*architecture[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) (let* ((ent-name (match-string-no-properties 2)) (ent-key (downcase ent-name)) (arch-name (match-string-no-properties 1)) @@ -13300,12 +13725,12 @@ inst-alist inst-path) ;; scan for contained instantiations (while (and (re-search-forward - (concat "^[ \t]*\\(\\w+\\)[ \t\n]*:[ \t\n]*\\(" - "\\(\\w+\\)[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*\\(generic\\|port\\)[ \t\n]+map\\>\\|" - "component[ \t\n]+\\(\\w+\\)\\|" - "\\(\\(entity\\)\\|configuration\\)[ \t\n]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n]*(\\(\\w+\\))\\)?\\|" + (concat "^[ \t]*\\(\\w+\\)[ \t\n\r\f]*:[ \t\n\r\f]*\\(" + "\\(\\w+\\)[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*\\(generic\\|port\\)[ \t\n\r\f]+map\\>\\|" + "component[ \t\n\r\f]+\\(\\w+\\)\\|" + "\\(\\(entity\\)\\|configuration\\)[ \t\n\r\f]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n\r\f]*(\\(\\w+\\))\\)?\\|" "\\(\\(for\\|if\\)\\>[^;:]+\\\\|block\\>\\)\\)\\|" - "\\(^[ \t]*end[ \t\n]+\\(generate\\|block\\)\\>\\)") end-of-unit t) + "\\(^[ \t]*end[ \t\n\r\f]+\\(generate\\|block\\)\\>\\)") end-of-unit t) (or (not limit-hier-inst-no) (<= (setq inst-no (1+ inst-no)) limit-hier-inst-no))) @@ -13349,8 +13774,8 @@ ;; scan for contained configuration specifications (goto-char beg-of-unit) (while (re-search-forward - (concat "^[ \t]*for[ \t\n]+\\(\\w+\\([ \t\n]*,[ \t\n]*\\w+\\)*\\)[ \t\n]*:[ \t\n]*\\(\\w+\\)[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*" - "use[ \t\n]+\\(\\(entity\\)\\|configuration\\)[ \t\n]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n]*(\\(\\w+\\))\\)?") end-of-unit t) + (concat "^[ \t]*for[ \t\n\r\f]+\\(\\w+\\([ \t\n\r\f]*,[ \t\n\r\f]*\\w+\\)*\\)[ \t\n\r\f]*:[ \t\n\r\f]*\\(\\w+\\)[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*" + "use[ \t\n\r\f]+\\(\\(entity\\)\\|configuration\\)[ \t\n\r\f]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n\r\f]*(\\(\\w+\\))\\)?") end-of-unit t) (let* ((inst-comp-name (match-string-no-properties 3)) (inst-ent-key (and (match-string 6) @@ -13362,7 +13787,7 @@ (inst-lib-key (vhdl-match-string-downcase 8)) (inst-key-list (split-string (vhdl-match-string-downcase 1) - "[ \t\n]*,[ \t\n]*")) + "[ \t\n\r\f]*,[ \t\n\r\f]*")) (tmp-inst-alist inst-alist) inst-entry) (while tmp-inst-alist @@ -15347,7 +15772,7 @@ (read-from-minibuffer "architecture name: " nil vhdl-minibuffer-local-map) (vhdl-replace-string vhdl-compose-architecture-name ent-name))) - ent-file-name arch-file-name ent-buffer arch-buffer project) + ent-file-name arch-file-name ent-buffer arch-buffer project end-pos) (message "Creating component \"%s(%s)\"..." ent-name arch-name) ;; open entity file (unless (eq vhdl-compose-create-files 'none) @@ -15364,6 +15789,7 @@ ;; insert header (if vhdl-compose-include-header (progn (vhdl-template-header) + (setq end-pos (point)) (goto-char (point-max))) (vhdl-comment-display-line) (insert "\n\n")) ;; insert library clause @@ -15390,6 +15816,7 @@ ;; open architecture file (if (not (eq vhdl-compose-create-files 'separate)) (insert "\n") + (goto-char (or end-pos (point-min))) (setq ent-buffer (current-buffer)) (setq arch-file-name (concat (vhdl-replace-string vhdl-architecture-file-name @@ -15434,7 +15861,7 @@ (if (and vhdl-compose-include-header (not (equal vhdl-file-footer ""))) (vhdl-template-footer) (vhdl-comment-display-line) (insert "\n")) - (goto-char (point-min)) + (goto-char (or end-pos (point-min))) (setq arch-buffer (current-buffer)) (when ent-buffer (set-buffer ent-buffer) (save-buffer)) (set-buffer arch-buffer) (save-buffer) @@ -15453,8 +15880,8 @@ (error "ERROR: No port has been read") (save-excursion (vhdl-prepare-search-2 - (unless (or (re-search-backward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) - (re-search-forward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t)) + (unless (or (re-search-backward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) + (re-search-forward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)) (error "ERROR: No architecture found")) (let* ((ent-name (match-string 1)) (ent-file-name @@ -15471,13 +15898,13 @@ (car vhdl-port-list) "\\>") nil t))) (re-search-forward "^begin\\>" nil) (beginning-of-line) - (skip-chars-backward " \t\n") + (skip-chars-backward " \t\n\r\f") (insert "\n\n") (indent-to vhdl-basic-offset) (vhdl-port-paste-component t)) ;; place component instantiation (re-search-forward "^end\\>" nil) (beginning-of-line) - (skip-chars-backward " \t\n") + (skip-chars-backward " \t\n\r\f") (insert "\n\n") (indent-to vhdl-basic-offset) (vhdl-port-paste-instance nil t t) ;; place use clause for used packages @@ -15486,7 +15913,7 @@ (when (file-exists-p ent-file-name) (find-file ent-file-name)) (goto-char (point-min)) - (unless (re-search-forward (concat "^entity[ \t\n]+" ent-name "[ \t\n]+is\\>") nil t) + (unless (re-search-forward (concat "^entity[ \t\n\r\f]+" ent-name "[ \t\n\r\f]+is\\>") nil t) (error "ERROR: Entity not found: \"%s\"" ent-name)) (goto-char (match-beginning 0)) (if (and (save-excursion @@ -15505,8 +15932,8 @@ (interactive) (save-excursion (vhdl-prepare-search-2 - (unless (or (re-search-backward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t) - (re-search-forward "^architecture[ \t\n]+\\w+[ \t\n]+of[ \t\n]+\\(\\w+\\)[ \t\n]+is\\>" nil t)) + (unless (or (re-search-backward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t) + (re-search-forward "^architecture[ \t\n\r\f]+\\w+[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)) (error "ERROR: No architecture found")) (let* ((ent-name (match-string 1)) (ent-file-name @@ -15532,11 +15959,11 @@ ;; process all instances (goto-char arch-stat-pos) (while (re-search-forward - (concat "^[ \t]*\\(\\w+\\)[ \t\n]*:[ \t\n]*\\(" - "\\(component[ \t\n]+\\)?\\(\\w+\\)" - "[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n]+map\\|" - "\\(\\(entity\\)\\|configuration\\)[ \t\n]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n]*(\\(\\w+\\))\\)?" - "[ \t\n]+\\(--[^\n]*\n[ \t\n]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n]+map\\)[ \t\n]*(") arch-end-pos t) + (concat "^[ \t]*\\(\\w+\\)[ \t\n\r\f]*:[ \t\n\r\f]*\\(" + "\\(component[ \t\n\r\f]+\\)?\\(\\w+\\)" + "[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n\r\f]+map\\|" + "\\(\\(entity\\)\\|configuration\\)[ \t\n\r\f]+\\(\\(\\w+\\)\\.\\)?\\(\\w+\\)\\([ \t\n\r\f]*(\\(\\w+\\))\\)?" + "[ \t\n\r\f]+\\(--[^\n]*\n[ \t\n\r\f]*\\)*\\(\\(generic\\)\\|port\\)[ \t\n\r\f]+map\\)[ \t\n\r\f]*(") arch-end-pos t) (setq inst-name (match-string-no-properties 1) comp-name (match-string-no-properties 4) comp-ent-name (match-string-no-properties 12) @@ -15548,7 +15975,7 @@ (when vhdl-use-components-package pack-file-name) t (save-excursion (goto-char (point-min)) - (unless (re-search-forward (concat "^\\s-*component[ \t\n]+" comp-name "\\>") nil t) + (unless (re-search-forward (concat "^\\s-*component[ \t\n\r\f]+" comp-name "\\>") nil t) (error "ERROR: Component declaration not found: \"%s\"" comp-name)) (vhdl-port-copy))) ;; ... from entity declaration (direct instantiation) @@ -15559,7 +15986,7 @@ comp-ent-file-name t (save-excursion (goto-char (point-min)) - (unless (re-search-forward (concat "^\\s-*entity[ \t\n]+" comp-ent-name "\\>") nil t) + (unless (re-search-forward (concat "^\\s-*entity[ \t\n\r\f]+" comp-ent-name "\\>") nil t) (error "ERROR: Entity declaration not found: \"%s\"" comp-ent-name)) (vhdl-port-copy)))) (vhdl-port-flatten t) @@ -15571,7 +15998,7 @@ (when has-generic ;; process all constants in generic map (vhdl-forward-syntactic-ws) - (while (vhdl-parse-string "\\(\\(\\w+\\)[ \t\n]*=>[ \t\n]*\\)?\\(\\w+\\),?" t) + (while (vhdl-parse-string "\\(\\(\\w+\\)[ \t\n\r\f]*=>[ \t\n\r\f]*\\)?\\(\\w+\\),?" t) (setq constant-name (match-string-no-properties 3)) (setq constant-entry (cons constant-name @@ -15589,10 +16016,10 @@ (unless (match-string 1) (setq generic-alist (cdr generic-alist))) (vhdl-forward-syntactic-ws)) - (vhdl-re-search-forward "\\[ \t\n]*\\)?\\(\\w+\\),?" t) + (while (vhdl-parse-string "\\(\\(\\w+\\)[ \t\n\r\f]*=>[ \t\n\r\f]*\\)?\\(\\w+\\),?" t) (setq signal-name (match-string-no-properties 3)) (setq signal-entry (cons signal-name (if (match-string 1) @@ -15638,7 +16065,7 @@ ;; prepare signal insertion (vhdl-goto-marker arch-decl-pos) (forward-line 1) - (re-search-forward "^\\s-*-- Internal signal declarations[ \t\n]*-*\n" arch-stat-pos t) + (re-search-forward "^\\s-*-- Internal signal declarations[ \t\n\r\f]*-*\n" arch-stat-pos t) (setq signal-pos (point-marker)) (while (progn (vhdl-forward-syntactic-ws) (looking-at "signal\\>")) @@ -15649,10 +16076,10 @@ (when (file-exists-p ent-file-name) (find-file ent-file-name)) (goto-char (point-min)) - (unless (re-search-forward (concat "^entity[ \t\n]+" ent-name "[ \t\n]+is\\>") nil t) + (unless (re-search-forward (concat "^entity[ \t\n\r\f]+" ent-name "[ \t\n\r\f]+is\\>") nil t) (error "ERROR: Entity not found: \"%s\"" ent-name)) ;; prepare generic clause insertion - (unless (and (re-search-forward "\\(^\\s-*generic[ \t\n]*(\\)\\|^end\\>" nil t) + (unless (and (re-search-forward "\\(^\\s-*generic[ \t\n\r\f]*(\\)\\|^end\\>" nil t) (match-string 1)) (goto-char (match-beginning 0)) (indent-to vhdl-basic-offset) @@ -15670,7 +16097,7 @@ (setq generic-beg-pos (point-marker) generic-pos (point-marker) generic-inst-pos (point-marker) generic-end-pos (point-marker)) ;; prepare port clause insertion - (unless (and (re-search-forward "\\(^\\s-*port[ \t\n]*(\\)\\|^end\\>" nil t) + (unless (and (re-search-forward "\\(^\\s-*port[ \t\n\r\f]*(\\)\\|^end\\>" nil t) (match-string 1)) (goto-char (match-beginning 0)) (indent-to vhdl-basic-offset) @@ -15894,7 +16321,8 @@ (message "Generating components package \"%s\"...done\n File created: \"%s\"" pack-name pack-file-name))) -(defun vhdl-compose-configuration-architecture (ent-name arch-name inst-alist +(defun vhdl-compose-configuration-architecture (ent-name arch-name ent-alist + conf-alist inst-alist &optional insert-conf) "Generate block configuration for architecture." (let ((margin (current-indentation)) @@ -15970,7 +16398,7 @@ (nth 3 ent-entry)) (indent-to (+ margin vhdl-basic-offset)) (vhdl-compose-configuration-architecture - (nth 0 ent-entry) arch-name + (nth 0 ent-entry) arch-name ent-alist conf-alist (nth 3 (aget (nth 3 ent-entry) (downcase arch-name) t)))))) ;; insert component configuration end (indent-to margin) @@ -16052,7 +16480,8 @@ (vhdl-insert-keyword " IS\n") (indent-to vhdl-basic-offset) ;; insert block configuration (for architecture) - (vhdl-compose-configuration-architecture ent-name arch-name inst-alist t) + (vhdl-compose-configuration-architecture + ent-name arch-name ent-alist conf-alist inst-alist t) (vhdl-insert-keyword "END ") (insert conf-name ";") (when conf-file-name ;; insert footer and save @@ -16072,6 +16501,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (using `compile.el') +(defvar vhdl-compile-post-command "" + "String appended to compile command after file name.") + (defun vhdl-makefile-name () "Return the Makefile name of the current project or the current compiler if no project is defined." @@ -16226,9 +16658,11 @@ (compiler (or (aget vhdl-compiler-alist vhdl-compiler nil) (error "ERROR: No such compiler: \"%s\"" vhdl-compiler))) (command (nth 0 compiler)) - (file-name (buffer-file-name)) + (default-directory (vhdl-compile-directory)) + (file-name (if vhdl-compile-absolute-path + (buffer-file-name) + (file-relative-name (buffer-file-name)))) (options (vhdl-get-compile-options project compiler file-name)) - (default-directory (vhdl-compile-directory)) compilation-process-setup-function) (unless (file-directory-p default-directory) (error "ERROR: Compile directory does not exist: \"%s\"" default-directory)) @@ -16236,14 +16670,18 @@ (when (string-match " " file-name) (setq file-name (concat "\"" file-name "\""))) ;; print out file name if compiler does not - (setq vhdl-compile-file-name (buffer-file-name)) + (setq vhdl-compile-file-name (if vhdl-compile-absolute-path + (buffer-file-name) + (file-relative-name (buffer-file-name)))) (when (and (= 0 (nth 1 (nth 10 compiler))) (= 0 (nth 1 (nth 11 compiler)))) (setq compilation-process-setup-function 'vhdl-compile-print-file-name)) ;; run compilation (if options (when command - (compile (concat command " " options " " file-name))) + (compile (concat command " " options " " file-name + (unless (equal vhdl-compile-post-command "") + (concat " " vhdl-compile-post-command))))) (vhdl-warning "Your project settings tell me not to compile this file")))) (defvar vhdl-make-target "all" @@ -16551,6 +16989,8 @@ (insert "\n\n# Define compilation command and options\n" "\nCOMPILE = " (nth 0 compiler) "\nOPTIONS = " (vhdl-get-compile-options project compiler nil) + (if (equal vhdl-compile-post-command "") "" + (concat "\nPOST-COMPILE = " vhdl-compile-post-command)) "\n") ;; insert library paths (setq library-directory @@ -16580,16 +17020,16 @@ (setq unit-list tmp-list) ;; insert `make all' rule (insert "\n\n\n# Rule for compiling entire design\n" - "\nall :" - " \\\n\t\tlibrary" + "\n" (nth 0 vhdl-makefile-default-targets) " :" + " \\\n\t\t" (nth 2 vhdl-makefile-default-targets) " \\\n\t\t$(ALL_UNITS)\n") ;; insert `make clean' rule (insert "\n\n# Rule for cleaning entire design\n" - "\nclean : " + "\n" (nth 1 vhdl-makefile-default-targets) " : " "\n\t-rm -f $(ALL_UNITS)\n") ;; insert `make library' rule (insert "\n\n# Rule for creating library directory\n" - "\nlibrary :" + "\n" (nth 2 vhdl-makefile-default-targets) " :" " \\\n\t\t$(LIBRARY-" work-library ")\n" "\n$(LIBRARY-" work-library ") :" "\n\t" @@ -16597,6 +17037,11 @@ (cons "\\(.*\\)\n\\(.*\\)" (nth 5 compiler)) (concat "$(LIBRARY-" work-library ")\n" (vhdl-work-library))) "\n") + ;; insert '.PHONY' declaration + (insert "\n\n.PHONY : " + (nth 0 vhdl-makefile-default-targets) " " + (nth 1 vhdl-makefile-default-targets) " " + (nth 2 vhdl-makefile-default-targets) "\n") ;; insert rule for each library unit (insert "\n\n# Rules for compiling single library units and their subhierarchy\n") (while prim-list @@ -16611,7 +17056,7 @@ (unless (equal unit-key unit-name) (insert " \\\n" unit-name)) (insert " :" - " \\\n\t\tlibrary" + " \\\n\t\t" (nth 2 vhdl-makefile-default-targets) " \\\n\t\t$(UNIT-" work-library "-" unit-key ")") (while second-list (insert " \\\n\t\t$(UNIT-" work-library "-" (car second-list) ")") @@ -16653,7 +17098,9 @@ (if options (insert "\n\t$(COMPILE) " (if (eq options 'default) "$(OPTIONS)" options) " " - (nth 0 rule) "\n") + (nth 0 rule) + (if (equal vhdl-compile-post-command "") "" + " $(POST-COMPILE)") "\n") (setq tmp-list target-list) (while target-list (insert "\n\t@touch $(UNIT-" work-library "-" (car target-list) ")" @@ -16712,6 +17159,7 @@ 'vhdl-compiler-alist 'vhdl-compiler 'vhdl-compile-use-local-error-regexp + 'vhdl-makefile-default-targets 'vhdl-makefile-generation-hook 'vhdl-default-library 'vhdl-standard @@ -16722,6 +17170,7 @@ 'vhdl-upper-case-enum-values 'vhdl-upper-case-constants 'vhdl-use-direct-instantiation + 'vhdl-array-index-record-field-in-sensitivity-list 'vhdl-compose-configuration-name 'vhdl-entity-file-name 'vhdl-architecture-file-name @@ -16812,6 +17261,7 @@ 'vhdl-print-customize-faces 'vhdl-intelligent-tab 'vhdl-indent-syntax-based + 'vhdl-indent-comment-like-next-code-line 'vhdl-word-completion-case-sensitive 'vhdl-word-completion-in-minibuffer 'vhdl-underscore-is-part-of-word @@ -16851,6 +17301,17 @@ (See documentation (`C-c C-h') in section on STRUCTURAL COMPOSITION.) +Key Bindings +------------ + +For Emacs compliance the following key bindings have been changed: + +- `C-c c' -> `C-c C-c' `vhdl-comment-uncomment-region' +- `C-c f' -> `C-c C-i C-f' `vhdl-fontify-buffer' +- `C-c s' -> `C-c C-i C-s' `vhdl-statistics-buffer' +- `C-c C-c ...' -> `C-c C-m ...' `vhdl-compose-...' + + User Options ------------ @@ -16864,6 +17325,12 @@ Specify whether hierarchical configurations should be created. `vhdl-compose-configuration-use-subconfiguration': (new) Specify whether subconfigurations should be used inside configurations. +`vhdl-makefile-default-targets': (new) + Customize names of Makefile default targets. +`vhdl-indent-comment-like-next-code-line': (new) + Specify whether comment lines are indented like following code line. +`vhdl-array-index-record-field-in-sensitivity-list': (new) + Specify whether to include array indices / record fields in sensitivity list. ") @@ -16872,19 +17339,20 @@ Reserved words in VHDL ---------------------- -VHDL'93 (IEEE Std 1076-1993): - `vhdl-93-keywords' : keywords - `vhdl-93-types' : standardized types - `vhdl-93-attributes' : standardized attributes - `vhdl-93-enum-values' : standardized enumeration values - `vhdl-93-functions' : standardized functions - `vhdl-93-packages' : standardized packages and libraries +VHDL'93/02 (IEEE Std 1076-1993/2002): + `vhdl-02-keywords' : keywords + `vhdl-02-types' : standardized types + `vhdl-02-attributes' : standardized attributes + `vhdl-02-enum-values' : standardized enumeration values + `vhdl-02-functions' : standardized functions + `vhdl-02-packages' : standardized packages and libraries -VHDL-AMS (IEEE Std 1076.1): +VHDL-AMS (IEEE Std 1076.1 / 1076.1.1): `vhdl-ams-keywords' : keywords `vhdl-ams-types' : standardized types `vhdl-ams-attributes' : standardized attributes `vhdl-ams-enum-values' : standardized enumeration values + `vhdl-ams-constants' : standardized constants `vhdl-ams-functions' : standardized functions Math Packages (IEEE Std 1076.2): ------------------------------------------------------------ revno: 108402 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2012-05-28 03:58:42 +0200 message: src/makefile.w32-in: Update dependencies. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-27 12:27:07 +0000 +++ src/ChangeLog 2012-05-28 01:58:42 +0000 @@ -1,3 +1,8 @@ +2012-05-28 Juanma Barranquero + + * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)): + Update dependencies. + 2012-05-27 Eli Zaretskii * bidi.c (bidi_mirror_char): Fix last change. === modified file 'src/makefile.w32-in' --- src/makefile.w32-in 2012-05-22 16:42:08 +0000 +++ src/makefile.w32-in 2012-05-28 01:58:42 +0000 @@ -1149,6 +1149,7 @@ $(BLD)/w32inevt.$(O) : \ $(SRC)/w32inevt.c \ + $(SRC)/termchar.h \ $(SRC)/w32heap.h \ $(BLOCKINPUT_H) \ $(CONFIG_H) \ @@ -1157,7 +1158,8 @@ $(KEYBOARD_H) \ $(LISP_H) \ $(TERMHOOKS_H) \ - $(W32TERM_H) + $(W32TERM_H) \ + $(WINDOW_H) $(BLD)/w32proc.$(O) : \ $(SRC)/w32proc.c \ @@ -1187,7 +1189,8 @@ $(DISPEXTERN_H) \ $(FRAME_H) \ $(LISP_H) \ - $(TERMHOOKS_H) + $(TERMHOOKS_H) \ + $(WINDOW_H) $(BLD)/print.$(O) : \ $(SRC)/print.c \ ------------------------------------------------------------ revno: 108401 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-05-27 17:46:33 -0700 message: Make 'configure' a bit smaller and faster. * configure.in (INSTALL_INFO): Set it with one call to AC_PATH_PROG, not three. (PKG_CONFIG): Hoist this out of PKG_CHECK_MODULES, since it's so likely that it'll be needed. (AC_CHECK_HEADERS_ONCE): Prefer to AC_CHECK_HEADERS where either works. (AC_PROG_MAKE_SET): Remove; Automake does this. (sysinfo): Do not check for this function, as it's never used. (tzset): Check for this function just once. * admin/CPP-DEFINES: Remove HAVE_SYSINFO. * m4/manywarnings.m4: Sync from gnulib, incorporating the following: 2012-05-27 manywarnings: remove duplicate -Wmultichar entry diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-27 13:42:13 +0000 +++ ChangeLog 2012-05-28 00:46:33 +0000 @@ -1,11 +1,25 @@ +2012-05-28 Paul Eggert + + Make 'configure' a bit smaller and faster. + * configure.in (INSTALL_INFO): Set it with one call to + AC_PATH_PROG, not three. + (PKG_CONFIG): Hoist this out of PKG_CHECK_MODULES, since it's + so likely that it'll be needed. + (AC_CHECK_HEADERS_ONCE): Prefer to AC_CHECK_HEADERS where either works. + (AC_PROG_MAKE_SET): Remove; Automake does this. + (sysinfo): Do not check for this function, as it's never used. + (tzset): Check for this function just once. + * m4/manywarnings.m4: Sync from gnulib, incorporating the following: + 2012-05-27 manywarnings: remove duplicate -Wmultichar entry + 2012-05-27 Eli Zaretskii * config.bat (lib): Create/update lib/stdalign.in-h and lib/sys_types.in-h. - * lib/makefile.w32-in ($(BLD)/md5.$(O)): - ($(BLD)/sha1.$(O)): - ($(BLD)/sha256.$(O)): + * lib/makefile.w32-in ($(BLD)/md5.$(O)): + ($(BLD)/sha1.$(O)): + ($(BLD)/sha256.$(O)): ($(BLD)/sha512.$(O)): Depend on $(EMACS_ROOT)/nt/inc/stdalign.h. Suggested by Christoph Scholtes . === modified file 'admin/CPP-DEFINES' --- admin/CPP-DEFINES 2012-05-22 16:20:27 +0000 +++ admin/CPP-DEFINES 2012-05-28 00:46:33 +0000 @@ -156,7 +156,6 @@ HAVE_STRFTIME HAVE_STRING_H HAVE_STRUCT_UTIMBUF -HAVE_SYSINFO HAVE_SYSV_SIGPAUSE HAVE_SYS_SELECT_H HAVE_SYS_SYSTEMINFO_H === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-05-27 09:12:09 +0000 +++ admin/ChangeLog 2012-05-28 00:46:33 +0000 @@ -1,3 +1,7 @@ +2012-05-28 Paul Eggert + + * CPP-DEFINES: Remove HAVE_SYSINFO. + 2012-05-27 Paul Eggert Assume gnulib does largefile. === modified file 'configure.in' --- configure.in 2012-05-27 09:12:09 +0000 +++ configure.in 2012-05-28 00:46:33 +0000 @@ -708,9 +708,8 @@ dnl AC_PROG_RANLIB dnl fi -AC_PATH_PROG(INSTALL_INFO, install-info) -AC_PATH_PROG(INSTALL_INFO, install-info,, /usr/sbin) -AC_PATH_PROG(INSTALL_INFO, install-info,:, /sbin) +AC_PATH_PROG(INSTALL_INFO, install-info, :, + $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin) dnl Don't use GZIP, which is used by gzip for additional parameters. AC_PATH_PROG(GZIP_PROG, gzip) @@ -1067,6 +1066,8 @@ esac +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + dnl This function definition taken from Gnome 2.0 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page @@ -1074,8 +1075,6 @@ AC_DEFUN([PKG_CHECK_MODULES], [ succeeded=no - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - if test "$PKG_CONFIG" = "no" ; then ifelse([$4], , [AC_MSG_ERROR([ *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4]) @@ -1176,10 +1175,11 @@ fi dnl checks for header files -AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h utime.h \ - linux/version.h sys/systeminfo.h \ - stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ - sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ +AC_CHECK_HEADERS_ONCE( + sys/select.h sys/time.h utime.h + linux/version.h sys/systeminfo.h + stdio_ext.h fcntl.h coff.h pty.h + sys/vlimit.h sys/resource.h sys/utsname.h pwd.h utmp.h dirent.h util.h) AC_MSG_CHECKING(if personality LINUX32 can be set) @@ -1263,7 +1263,7 @@ AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) fi -AC_CHECK_HEADERS(sys/socket.h) +AC_CHECK_HEADERS_ONCE(sys/socket.h) AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT #if HAVE_SYS_SOCKET_H #include @@ -1292,7 +1292,7 @@ #endif]) dnl Check for endianness. -AC_C_BIGENDIAN +dnl AC_C_BIGENDIAN is done by gnulib. AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], [emacs_cv_attribute_aligned], @@ -1308,7 +1308,7 @@ fi dnl check for Make feature -AC_PROG_MAKE_SET +dnl AC_PROG_MAKE_SET is done by Automake. DEPFLAGS= MKDEPDIR=":" @@ -1664,7 +1664,7 @@ dnl Check if pthreads is available. LIB_PTHREAD= -AC_CHECK_HEADERS(pthread.h) +AC_CHECK_HEADERS_ONCE(pthread.h) if test "$ac_cv_header_pthread_h"; then dnl gmalloc.c uses pthread_atfork, which is not available on older-style dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely @@ -2537,7 +2537,7 @@ AC_SUBST(LIBGPM) dnl Check for malloc/malloc.h on darwin -AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the header file.])]) +AC_CHECK_HEADERS_ONCE(malloc/malloc.h) GNUSTEP_CFLAGS= ### Use NeXTstep API to implement GUI. @@ -2642,7 +2642,7 @@ fi fi AC_CHECK_FUNCS(touchlock) -AC_CHECK_HEADERS(maillock.h) +AC_CHECK_HEADERS_ONCE(maillock.h) AC_SUBST(LIBS_MAIL) ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to @@ -2688,9 +2688,9 @@ AC_CHECK_FUNCS(gethostname \ -rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ +rename closedir mkdir rmdir getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt setsid \ -strerror fpathconf select euidaccess getpagesize tzset setlocale \ +strerror fpathconf select euidaccess getpagesize setlocale \ utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ __fpending strsignal setitimer \ sendto recvfrom getsockname getpeername \ @@ -2710,7 +2710,7 @@ [Define to 1 if you have the `__builtin_unwind_init' function.]) fi -AC_CHECK_HEADERS(sys/un.h) +AC_CHECK_HEADERS_ONCE(sys/un.h) AC_FUNC_FSEEKO @@ -2977,6 +2977,7 @@ AC_SUBST(DESLIB) AC_SUBST(KRB4LIB) +AC_CHECK_FUNCS_ONCE(tzset) AC_MSG_CHECKING(whether localtime caches TZ) AC_CACHE_VAL(emacs_cv_localtime_cache, [if test x$ac_cv_func_tzset = xyes; then === modified file 'm4/manywarnings.m4' --- m4/manywarnings.m4 2012-04-09 07:45:59 +0000 +++ m4/manywarnings.m4 2012-05-28 00:46:33 +0000 @@ -1,4 +1,4 @@ -# manywarnings.m4 serial 3 +# manywarnings.m4 serial 4 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -143,7 +143,6 @@ for gl_manywarn_item in \ -Wattributes \ -Wcoverage-mismatch \ - -Wmultichar \ -Wunused-macros \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" ------------------------------------------------------------ revno: 108400 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2012-05-27 19:31:31 +0200 message: lips/version.el (*-version-string): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-27 09:45:54 +0000 +++ lisp/ChangeLog 2012-05-27 17:31:31 +0000 @@ -1,3 +1,8 @@ +2012-05-27 Juanma Barranquero + + * version.el (motif-version-string, gtk-version-string) + (ns-version-string): Declare. + 2012-05-27 Juri Linkov * emacs-lisp/lisp-mode.el (eval-defun-2): Use `eval-sexp-add-defvars' === modified file 'lisp/version.el' --- lisp/version.el 2012-05-25 18:57:51 +0000 +++ lisp/version.el 2012-05-27 17:31:31 +0000 @@ -44,6 +44,10 @@ (defconst emacs-build-system (system-name) "Name of the system on which Emacs was built.") +(defvar motif-version-string) +(defvar gtk-version-string) +(defvar ns-version-string) + (defun emacs-version (&optional here) "Return string describing the version of Emacs that is running. If optional argument HERE is non-nil, insert string at point. ------------------------------------------------------------ revno: 108399 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-05-27 16:44:06 +0300 message: Fix the MSDOS build after gnulib update. config.bat (lib): Create/update lib/stdalign.in-h and lib/sys_types.in-h. msdos/sedlibmk.inp (GNULIB_GL_UNISTD_H_GETOPT, GNULIB_POSIX_OPENPT) (GNULIB_ISATTY, GNULIB_PTSNAME_R, GNULIB_RANDOM) (GNULIB_SETHOSTNAME, HAVE_POSIX_OPENPT, HAVE_PTSNAME_R) (HAVE_RANDOM, HAVE_SETHOSTNAME, NEXT_SYS_TYPES_H) (NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H, REPLACE_FTRUNCATE) (REPLACE_ISATTY, REPLACE_PTSNAME_R, REPLACE_RANDOM_R) (REPLACE_STRTOIMAX, STDALIGN_H, WINDOWS_64_BIT_OFF_T) (WINDOWS_64_BIT_ST_SIZE, GL_GENERATE_STDALIGN_H_TRUE) (GL_GENERATE_STDALIGN_H_FALSE): Edit as appropriate for DJGPP. (cat FOO): Edit into "sed -e '' FOO >>". diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-27 12:11:23 +0000 +++ ChangeLog 2012-05-27 13:42:13 +0000 @@ -1,5 +1,8 @@ 2012-05-27 Eli Zaretskii + * config.bat (lib): Create/update lib/stdalign.in-h and + lib/sys_types.in-h. + * lib/makefile.w32-in ($(BLD)/md5.$(O)): ($(BLD)/sha1.$(O)): ($(BLD)/sha256.$(O)): === modified file 'config.bat' --- config.bat 2012-01-19 07:21:25 +0000 +++ config.bat 2012-05-27 13:42:13 +0000 @@ -283,11 +283,13 @@ If Exist getopt.in.h update getopt.in.h getopt.in-h If Exist stdbool.in.h update stdbool.in.h stdbool.in-h If Exist signal.in.h update signal.in.h signal.in-h +If Exist stdalign.in.h update stdalign.in.h stdalign.in-h If Exist stddef.in.h update stddef.in.h stddef.in-h If Exist stdint.in.h update stdint.in.h stdint.in-h If Exist stdio.in.h update stdio.in.h stdio.in-h If Exist stdlib.in.h update stdlib.in.h stdlib.in-h If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h +If Exist sys_types.in.h update sys_types.in.h sys_types.in-h If Exist time.in.h update time.in.h time.in-h If Exist unistd.in.h update unistd.in.h unistd.in-h If Exist Makefile.in sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2012-05-25 10:21:30 +0000 +++ msdos/ChangeLog 2012-05-27 13:42:13 +0000 @@ -1,3 +1,16 @@ +2012-05-27 Eli Zaretskii + + * sedlibmk.inp (GNULIB_GL_UNISTD_H_GETOPT, GNULIB_POSIX_OPENPT) + (GNULIB_ISATTY, GNULIB_PTSNAME_R, GNULIB_RANDOM) + (GNULIB_SETHOSTNAME, HAVE_POSIX_OPENPT, HAVE_PTSNAME_R) + (HAVE_RANDOM, HAVE_SETHOSTNAME, NEXT_SYS_TYPES_H) + (NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H, REPLACE_FTRUNCATE) + (REPLACE_ISATTY, REPLACE_PTSNAME_R, REPLACE_RANDOM_R) + (REPLACE_STRTOIMAX, STDALIGN_H, WINDOWS_64_BIT_OFF_T) + (WINDOWS_64_BIT_ST_SIZE, GL_GENERATE_STDALIGN_H_TRUE) + (GL_GENERATE_STDALIGN_H_FALSE): Edit as appropriate for DJGPP. + (cat FOO): Edit into "sed -e '' FOO >>". + 2012-05-25 Eli Zaretskii * sed6.inp (INFO_EXT): Edit to .info. === modified file 'msdos/sedlibmk.inp' --- msdos/sedlibmk.inp 2012-04-14 05:04:54 +0000 +++ msdos/sedlibmk.inp 2012-05-27 13:42:13 +0000 @@ -93,6 +93,13 @@ # s/'\; \\ *$/' >> $@-t/ # } # +# . If the recipe for generating a header file uses 'cat', replace it with +# +# sed -e '' +# +# (if needed; there's already an edit command that should take care of +# this). +# # The following Awk script is useful for editing portions of # autogen/Makefile.in into Sed commands that define the corresponding # variables to zero (which is what is required in the absolute @@ -202,11 +209,12 @@ /^GNULIB_GETLOGIN *=/s/@GNULIB_GETLOGIN@/0/ /^GNULIB_GETLOGIN_R *=/s/@GNULIB_GETLOGIN_R@/0/ /^GNULIB_GETPAGESIZE *=/s/@GNULIB_GETPAGESIZE@/0/ -/^GNULIB_GETS *=/s/@GNULIB_GETS@/0/ +/^GNULIB_GL_UNISTD_H_GETOPT *=/s/@GNULIB_GL_UNISTD_H_GETOPT@/1/ /^GNULIB_GETSUBOPT *=/s/@GNULIB_GETSUBOPT@/0/ /^GNULIB_GETUSERSHELL *=/s/@GNULIB_GETUSERSHELL@/0/ /^GNULIB_GRANTPT *=/s/@GNULIB_GRANTPT@/0/ /^GNULIB_GROUP_MEMBER *=/s/@GNULIB_GROUP_MEMBER@/0/ +/^GNULIB_ISATTY *=/s/@GNULIB_ISATTY@/0/ /^GNULIB_LCHMOD *=/s/@GNULIB_LCHMOD@/0/ /^GNULIB_LCHOWN *=/s/@GNULIB_LCHOWN@/0/ /^GNULIB_LINK *=/s/@GNULIB_LINK@/0/ @@ -234,17 +242,20 @@ /^GNULIB_PIPE *=/s/@GNULIB_PIPE@/0/ /^GNULIB_PIPE2 *=/s/@GNULIB_PIPE2@/0/ /^GNULIB_POPEN *=/s/@GNULIB_POPEN@/0/ +/^GNULIB_POSIX_OPENPT *=/s/@GNULIB_POSIX_OPENPT@/0/ /^GNULIB_PREAD *=/s/@GNULIB_PREAD@/0/ /^GNULIB_PRINTF *=/s/@GNULIB_PRINTF@/0/ /^GNULIB_PRINTF_POSIX *=/s/@GNULIB_PRINTF_POSIX@/0/ /^GNULIB_PTHREAD_SIGMASK *=/s/@GNULIB_PTHREAD_SIGMASK@/0/ /^GNULIB_PTSNAME *=/s/@GNULIB_PTSNAME@/0/ +/^GNULIB_PTSNAME_R *=/s/@GNULIB_PTSNAME_R@/0/ /^GNULIB_PUTC *=/s/@GNULIB_PUTC@/0/ /^GNULIB_PUTCHAR *=/s/@GNULIB_PUTCHAR@/0/ /^GNULIB_PUTENV *=/s/@GNULIB_PUTENV@/0/ /^GNULIB_PUTS *=/s/@GNULIB_PUTS@/0/ /^GNULIB_PWRITE *=/s/@GNULIB_PWRITE@/0/ /^GNULIB_RAISE *=/s/@GNULIB_RAISE@/0/ +/^GNULIB_RANDOM *=/s/@GNULIB_RANDOM@/0/ /^GNULIB_RANDOM_R *=/s/@GNULIB_RANDOM_R@/0/ /^GNULIB_READ *=/s/@GNULIB_READ@/0/ /^GNULIB_READLINK *=/s/@GNULIB_READLINK@/0/ @@ -258,6 +269,7 @@ /^GNULIB_RPMATCH *=/s/@GNULIB_RPMATCH@/0/ /^GNULIB_SCANF *=/s/@GNULIB_SCANF@/0/ /^GNULIB_SETENV *=/s/@GNULIB_SETENV@/0/ +/^GNULIB_SETHOSTNAME *=/s/@GNULIB_SETHOSTNAME@/0/ /^GNULIB_SIGACTION *=/s/@GNULIB_SIGACTION@/0/ /^GNULIB_SIGNAL_H_SIGPIPE *=/s/@GNULIB_SIGNAL_H_SIGPIPE@/0/ /^GNULIB_SIGPROCMASK *=/s/@GNULIB_SIGPROCMASK@/0/ @@ -278,7 +290,6 @@ /^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ /^GNULIB_TMPFILE *=/s/@GNULIB_TMPFILE@/0/ /^GNULIB_TTYNAME_R *=/s/@GNULIB_TTYNAME_R@/0/ -/^GNULIB_UNISTD_H_GETOPT *=/s/@GNULIB_UNISTD_H_GETOPT@/1/ /^GNULIB_UNISTD_H_NONBLOCKING *=/s/@GNULIB_UNISTD_H_NONBLOCKING@/0/ /^GNULIB_UNISTD_H_SIGPIPE *=/s/@GNULIB_UNISTD_H_SIGPIPE@/0/ /^GNULIB_UNLINK *=/s/@GNULIB_UNLINK@/0/ @@ -320,6 +331,7 @@ /^HAVE_DECL_GETUSERSHELL *=/s/@HAVE_DECL_GETUSERSHELL@/0/ /^HAVE_DECL_LOCALTIME_R *=/s/@HAVE_DECL_LOCALTIME_R@/0/ /^HAVE_DECL_OBSTACK_PRINTF *=/s/@HAVE_DECL_OBSTACK_PRINTF@/0/ +/^HAVE_DECL_SETHOSTNAME *=/s/@HAVE_DECL_SETHOSTNAME@/0/ /^HAVE_DECL_SETENV *=/s/@HAVE_DECL_SETENV@/1/ /^HAVE_DECL_SNPRINTF *=/s/@HAVE_DECL_SNPRINTF@/0/ /^HAVE_DECL_TTYNAME_R *=/s/@HAVE_DECL_TTYNAME_R@/0/ @@ -374,12 +386,15 @@ /^HAVE_PIPE2 *=/s/@HAVE_PIPE2@/0/ /^HAVE_POPEN *=/s/@HAVE_POPEN@/1/ /^HAVE_POSIX_SIGNALBLOCKING *=/s/@HAVE_POSIX_SIGNALBLOCKING@/1/ +/^HAVE_POSIX_OPENPT *=/s/@HAVE_POSIX_OPENPT@/0/ /^HAVE_PREAD *=/s/@HAVE_PREAD@/0/ /^HAVE_PTSNAME *=/s/@HAVE_PTSNAME@/0/ +/^HAVE_PTSNAME_R *=/s/@HAVE_PTSNAME_R@/0/ /^HAVE_PTHREAD_SIGMASK *=/s/@HAVE_PTHREAD_SIGMASK@/0/ /^HAVE_PWRITE *=/s/@HAVE_PWRITE@/0/ /^HAVE_RANDOM_H *=/s/@HAVE_RANDOM_H@/1/ /^HAVE_RAISE *=/s/@HAVE_RAISE@/1/ +/^HAVE_RANDOM *=/s/@HAVE_RANDOM@/1/ /^HAVE_RANDOM_R *=/s/@HAVE_RANDOM_R@/0/ /^HAVE_READLINK *=/s/@HAVE_READLINK@/0/ /^HAVE_READLINKAT *=/s/@HAVE_READLINKAT@/0/ @@ -387,6 +402,7 @@ /^HAVE_RENAMEAT *=/s/@HAVE_RENAMEAT@/0/ /^HAVE_RPMATCH *=/s/@HAVE_RPMATCH@/0/ /^HAVE_SETENV *=/s/@HAVE_SETENV@/1/ +/^HAVE_SETHOSTNAME *=/s/@HAVE_SETHOSTNAME@/0/ /^HAVE_SIGACTION *=/s/@HAVE_SIGACTION@/1/ /^HAVE_SIGHANDLER_T *=/s/@HAVE_SIGHANDLER_T@/0/ /^HAVE_SIGINFO_T *=/s/@HAVE_SIGINFO_T@/0/ @@ -442,6 +458,7 @@ /^NEXT_AS_FIRST_DIRECTIVE_STDIO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H *=/s!@[^@\n]*@!! +/^NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H *=/s!@[^@\n]*@!! /^NEXT_AS_FIRST_DIRECTIVE_TIME_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H *=/s/@[^@\n]*@// /^NEXT_GETOPT_H *=/s/@[^@\n]*@// @@ -452,6 +469,7 @@ /^NEXT_STDINT_H *=/s/@[^@\n]*@// /^NEXT_STDLIB_H *=/s/@[^@\n]*@// /^NEXT_SYS_STAT_H *=/s!@[^@\n]*@!! +/^NEXT_SYS_TYPES_H *=/s!@[^@\n]*@!! /^NEXT_TIME_H *=/s/@[^@\n]*@// /^NEXT_UNISTD_H *=/s/@[^@\n]*@// /^OBJEXT *=/s/@[^@\n]*@/o/ @@ -481,6 +499,7 @@ /^REPLACE_FSTATAT *=/s/@REPLACE_FSTATAT@/0/ /^REPLACE_FTELL *=/s/@REPLACE_FTELL@/0/ /^REPLACE_FTELLO *=/s/@REPLACE_FTELLO@/0/ +/^REPLACE_FTRUNCATE *=/s/@REPLACE_FTRUNCATE@/0/ /^REPLACE_GETCWD *=/s/@REPLACE_GETCWD@/0/ /^REPLACE_GETDELIM *=/s/@REPLACE_GETDELIM@/0/ /^REPLACE_GETDOMAINNAME *=/s/@REPLACE_GETDOMAINNAME@/0/ @@ -488,6 +507,7 @@ /^REPLACE_GETLINE *=/s/@REPLACE_GETLINE@/0/ /^REPLACE_GETLOGIN_R *=/s/@REPLACE_GETLOGIN_R@/0/ /^REPLACE_GETPAGESIZE *=/s/@REPLACE_GETPAGESIZE@/0/ +/^REPLACE_ISATTY *=/s/@REPLACE_ISATTY@/0/ /^REPLACE_LCHOWN *=/s/@REPLACE_LCHOWN@/0/ /^REPLACE_LINK *=/s/@REPLACE_LINK@/0/ /^REPLACE_LINKAT *=/s/@REPLACE_LINKAT@/0/ @@ -509,8 +529,10 @@ /^REPLACE_PREAD *=/s/@REPLACE_PREAD@/0/ /^REPLACE_PRINTF *=/s/@REPLACE_PRINTF@/0/ /^REPLACE_PTHREAD_SIGMASK *=/s/@REPLACE_PTHREAD_SIGMASK@/0/ +/^REPLACE_PTSNAME_R *=/s/@REPLACE_PTSNAME_R@/0/ /^REPLACE_PUTENV *=/s/@REPLACE_PUTENV@/0/ /^REPLACE_PWRITE *=/s/@REPLACE_PWRITE@/0/ +/^REPLACE_RANDOM_R *=/s/@REPLACE_RANDOM_R@/0/ /^REPLACE_READ *=/s/@REPLACE_READ@/0/ /^REPLACE_RAISE *=/s/@REPLACE_RAISE@/0/ /^REPLACE_READLINK *=/s/@REPLACE_READLINK@/0/ @@ -528,6 +550,7 @@ /^REPLACE_STDIO_READ_FUNCS *=/s/@REPLACE_STDIO_READ_FUNCS@/0/ /^REPLACE_STDIO_WRITE_FUNCS *=/s/@REPLACE_STDIO_WRITE_FUNCS@/0/ /^REPLACE_STRTOD *=/s/@REPLACE_STRTOD@/0/ +/^REPLACE_STRTOIMAX *=/s/@REPLACE_STRTOIMAX@/0/ /^REPLACE_SYMLINK *=/s/@REPLACE_SYMLINK@/0/ /^REPLACE_TIMEGM *=/s/@REPLACE_TIMEGM@/0/ /^REPLACE_TMPFILE *=/s/@REPLACE_TMPFILE@/0/ @@ -549,6 +572,7 @@ /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ /^STDBOOL_H *=/s/@[^@\n]*@// +/^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDARG_H *=/s/@[^@\n]*@// /^STDDEF_H *=/s/@[^@\n]*@// /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ @@ -558,6 +582,8 @@ /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ /^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ /^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// +/^WINDOWS_64_BIT_OFF_T *=/s/@WINDOWS_64_BIT_OFF_T@/0/ +/^WINDOWS_64_BIT_ST_SIZE *=/s/@WINDOWS_64_BIT_ST_SIZE@/0/ /am__append_1 *=.*gettext\.h/s/@[^@\n]*@/\#/ /am__append_2 *=.*verify\.h/s/@[^@\n]*@// /^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o pthread_sigmask.o/ @@ -608,6 +634,8 @@ s/^@GL_GENERATE_STDDEF_H_FALSE@/\#/ s/^@GL_GENERATE_STDINT_H_TRUE@// s/^@GL_GENERATE_STDINT_H_FALSE@/\#/ +s/^@GL_GENERATE_STDALIGN_H_TRUE@// +s/^@GL_GENERATE_STDALIGN_H_FALSE@/\#/ /^arg-nonnull\.h:/,/^[ ][ ]*mv /c\ arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\ sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/build-aux/snippet/arg-nonnull.h > $@ @@ -619,6 +647,7 @@ sed -n -e '/^.ifndef/,$$p' < $(top_srcdir)/build-aux/snippet/warn-on-use.h > $@ s/^ [ ]*{ echo \(.*\); \\/ djecho \1 > $@-t/ s/^ [ ]*{ echo \(.*\) && \\/ djecho \1 > $@-t/ +s/^ [ ]*cat \(.*\); \\/ sed -e '' \1 >> $@-t/ s/ \&\& \\ *$// s/\.in-h\; *\\$/.in-h >> $@-t/ /^ [ ]*} /d ------------------------------------------------------------ revno: 108398 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-05-27 15:27:07 +0300 message: Fix last change in bidi_mirror_char. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-27 12:18:35 +0000 +++ src/ChangeLog 2012-05-27 12:27:07 +0000 @@ -1,3 +1,7 @@ +2012-05-27 Eli Zaretskii + + * bidi.c (bidi_mirror_char): Fix last change. + 2012-05-27 Andreas Schwab * unexmacosx.c (copy_data_segment): Truncate after 16 characters === modified file 'src/bidi.c' --- src/bidi.c 2012-05-27 07:32:46 +0000 +++ src/bidi.c 2012-05-27 12:27:07 +0000 @@ -204,8 +204,18 @@ val = CHAR_TABLE_REF (bidi_mirror_table, c); if (INTEGERP (val)) { + int v = XINT (val); + + /* In a build with extra checks, make sure the value does not + overflow a 32-bit int. */ eassert (CHAR_VALID_P (XINT (val))); - return XINT (val); + + /* Minimal test we must do in optimized builds, to prevent weird + crashes further down the road. */ + if (v < 0 || v > MAX_CHAR) + abort (); + + return v; } return c; ------------------------------------------------------------ revno: 108397 committer: Andreas Schwab branch nick: emacs timestamp: Sun 2012-05-27 14:18:35 +0200 message: * unexmacosx.c (copy_data_segment): Truncate after 16 characters when referring to sectname field in printf format. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-27 07:51:09 +0000 +++ src/ChangeLog 2012-05-27 12:18:35 +0000 @@ -1,3 +1,8 @@ +2012-05-27 Andreas Schwab + + * unexmacosx.c (copy_data_segment): Truncate after 16 characters + when referring to sectname field in printf format. + 2012-05-27 Paul Eggert * lisp.h [REL_ALLOC]: Omit duplicate prototypes. === modified file 'src/unexmacosx.c' --- src/unexmacosx.c 2012-01-19 07:21:25 +0000 +++ src/unexmacosx.c 2012-05-27 12:18:35 +0000 @@ -809,9 +809,9 @@ { sectp->flags = S_REGULAR; if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size)) - unexec_error ("cannot write section %s", sectp->sectname); + unexec_error ("cannot write section %.16s", sectp->sectname); if (!unexec_write (header_offset, sectp, sizeof (struct section))) - unexec_error ("cannot write section %s's header", sectp->sectname); + unexec_error ("cannot write section %.16s's header", sectp->sectname); } else if (strncmp (sectp->sectname, SECT_BSS, 16) == 0) { @@ -829,15 +829,15 @@ my_size = (unsigned long)my_endbss_static - sectp->addr; if (!(sectp->addr <= (unsigned long)my_endbss_static && my_size <= sectp->size)) - unexec_error ("my_endbss_static is not in section %s", + unexec_error ("my_endbss_static is not in section %.16s", sectp->sectname); if (!unexec_write (sectp->offset, (void *) sectp->addr, my_size)) - unexec_error ("cannot write section %s", sectp->sectname); + unexec_error ("cannot write section %.16s", sectp->sectname); if (!unexec_write_zero (sectp->offset + my_size, sectp->size - my_size)) - unexec_error ("cannot write section %s", sectp->sectname); + unexec_error ("cannot write section %.16s", sectp->sectname); if (!unexec_write (header_offset, sectp, sizeof (struct section))) - unexec_error ("cannot write section %s's header", sectp->sectname); + unexec_error ("cannot write section %.16s's header", sectp->sectname); } else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0 || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0 @@ -851,12 +851,13 @@ || strncmp (sectp->sectname, "__objc_", 7) == 0) { if (!unexec_copy (sectp->offset, old_file_offset, sectp->size)) - unexec_error ("cannot copy section %s", sectp->sectname); + unexec_error ("cannot copy section %.16s", sectp->sectname); if (!unexec_write (header_offset, sectp, sizeof (struct section))) - unexec_error ("cannot write section %s's header", sectp->sectname); + unexec_error ("cannot write section %.16s's header", sectp->sectname); } else - unexec_error ("unrecognized section name in __DATA segment"); + unexec_error ("unrecognized section %.16s in __DATA segment", + sectp->sectname); printf (" section %-16.16s at %#8lx - %#8lx (sz: %#8lx)\n", sectp->sectname, (long) (sectp->offset), ------------------------------------------------------------ revno: 108396 fixes bug(s): http://debbugs.gnu.org/11527 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-05-27 15:11:23 +0300 message: Fix the MS-Windows build broken by revision 10835. lib/makefile.w32-in ($(BLD)/md5.$(O)): ($(BLD)/sha1.$(O)): ($(BLD)/sha256.$(O)): ($(BLD)/sha512.$(O)): Depend on $(EMACS_ROOT)/nt/inc/stdalign.h. Suggested by Christoph Scholtes . lib/getopt_.h: Regenerate. nt/inc/stdalign.h: New file. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-27 09:12:09 +0000 +++ ChangeLog 2012-05-27 12:11:23 +0000 @@ -1,3 +1,13 @@ +2012-05-27 Eli Zaretskii + + * lib/makefile.w32-in ($(BLD)/md5.$(O)): + ($(BLD)/sha1.$(O)): + ($(BLD)/sha256.$(O)): + ($(BLD)/sha512.$(O)): Depend on $(EMACS_ROOT)/nt/inc/stdalign.h. + Suggested by Christoph Scholtes . + + * lib/getopt_.h: Regenerate. + 2012-05-27 Paul Eggert Assume gnulib does largefile. === modified file 'lib/getopt_.h' --- lib/getopt_.h 2011-05-31 16:09:59 +0000 +++ lib/getopt_.h 2012-05-27 12:11:23 +0000 @@ -1,283 +1,283 @@ -/* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - - 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 3 of the License, or - (at your option) 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, see . */ - -#ifndef _GL_GETOPT_H - -#if __GNUC__ >= 3 -#pragma GCC system_header -#endif - - -/* The include_next requires a split double-inclusion guard. We must - also inform the replacement unistd.h to not recursively use - ; our definitions will be present soon enough. */ -#if HAVE_GETOPT_H -# define _GL_SYSTEM_GETOPT -# ifndef __GNUC__ -# include -# else -# include_next -# endif -# undef _GL_SYSTEM_GETOPT -#endif - -#ifndef _GL_GETOPT_H - -#ifndef __need_getopt -# define _GL_GETOPT_H 1 -#endif - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file (if the system had , - we have already included it). Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ -#if defined __GETOPT_PREFIX && !defined __need_getopt -# if !HAVE_GETOPT_H -# include -# include -# include -# endif -# undef __need_getopt -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# undef option -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include , but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include , which will pull in for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - 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 3 of the License, or - (at your option) 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, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - -# if !GNULIB_defined_struct_option -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; -# define GNULIB_defined_struct_option 1 -# endif - -/* Names for the values of the `has_arg' field of `struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, `optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in `optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU `getopt'. - - The argument `--' causes premature termination of argument - scanning, explicitly telling `getopt' that there are no more - options. - - If OPTS begins with `-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* _GL_GETOPT_H */ -#endif /* _GL_GETOPT_H */ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + 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 3 of the License, or + (at your option) 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, see . */ + +#ifndef _GL_GETOPT_H + +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif + + +/* The include_next requires a split double-inclusion guard. We must + also inform the replacement unistd.h to not recursively use + ; our definitions will be present soon enough. */ +#if HAVE_GETOPT_H +# define _GL_SYSTEM_GETOPT +# ifndef __GNUC__ +# include +# else +# include_next +# endif +# undef _GL_SYSTEM_GETOPT +#endif + +#ifndef _GL_GETOPT_H + +#ifndef __need_getopt +# define _GL_GETOPT_H 1 +#endif + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file (if the system had , + we have already included it). Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX && !defined __need_getopt +# if !HAVE_GETOPT_H +# include +# include +# include +# endif +# undef __need_getopt +# undef getopt +# undef getopt_long +# undef getopt_long_only +# undef optarg +# undef opterr +# undef optind +# undef optopt +# undef option +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# define getopt __GETOPT_ID (getopt) +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". libc uses prototypes + with "char *const *argv" that are incorrect because getopt_long and + getopt_long_only can permute argv; this is required for backward + compatibility (e.g., for LSB 2.0.1). + + This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', + but it caused redefinition warnings if both unistd.h and getopt.h were + included, since unistd.h includes getopt.h having previously defined + __need_getopt. + + The only place where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, but these are visible + only if __need_getopt is not defined, so it is quite safe to rewrite + the conditional as follows: +*/ +#if !defined __need_getopt +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2012 Free Software Foundation, Inc. + + 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 3 of the License, or + (at your option) 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, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message 'getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of 'struct option' terminated by an element containing a name which is + zero. + + The field 'has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ + +# if !GNULIB_defined_struct_option +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; +# define GNULIB_defined_struct_option 1 +# endif + +/* Names for the values of the 'has_arg' field of 'struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, 'optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in 'optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU 'getopt'. + + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more + options. + + If OPTS begins with '-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#ifndef __need_getopt +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#endif + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* _GL_GETOPT_H */ +#endif /* _GL_GETOPT_H */ === modified file 'lib/makefile.w32-in' --- lib/makefile.w32-in 2012-05-22 16:20:27 +0000 +++ lib/makefile.w32-in 2012-05-27 12:11:23 +0000 @@ -105,6 +105,7 @@ $(SRC)/md5.c \ $(SRC)/md5.h \ $(EMACS_ROOT)/nt/inc/stdint.h \ + $(EMACS_ROOT)/nt/inc/stdalign.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h \ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/config.h @@ -113,6 +114,7 @@ $(SRC)/sha1.c \ $(SRC)/sha1.h \ $(EMACS_ROOT)/nt/inc/stdint.h \ + $(EMACS_ROOT)/nt/inc/stdalign.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h \ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/config.h @@ -121,6 +123,7 @@ $(SRC)/sha256.c \ $(SRC)/sha256.h \ $(EMACS_ROOT)/nt/inc/stdint.h \ + $(EMACS_ROOT)/nt/inc/stdalign.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h \ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/config.h @@ -129,6 +132,7 @@ $(SRC)/sha512.c \ $(SRC)/sha512.h \ $(EMACS_ROOT)/nt/inc/stdint.h \ + $(EMACS_ROOT)/nt/inc/stdalign.h \ $(EMACS_ROOT)/nt/inc/sys/stat.h \ $(EMACS_ROOT)/src/s/ms-w32.h \ $(EMACS_ROOT)/src/config.h === modified file 'nt/ChangeLog' --- nt/ChangeLog 2012-05-27 01:06:44 +0000 +++ nt/ChangeLog 2012-05-27 12:11:23 +0000 @@ -1,5 +1,7 @@ 2012-05-27 Eli Zaretskii + * inc/stdalign.h: New file. + * configure.bat: Ensure a space between %var% expansion and redirection symbol '>', which breaks when %var% ends in a digit, such as 1. === added file 'nt/inc/stdalign.h' --- nt/inc/stdalign.h 1970-01-01 00:00:00 +0000 +++ nt/inc/stdalign.h 2012-05-27 12:11:23 +0000 @@ -0,0 +1,16 @@ +#ifndef _NT_STDALIGN_H_ +#define _NT_STDALIGN_H_ + +/* This header has the necessary stuff from lib/stdalign.in.h, but + avoids the need to have Sed at build time. */ + +#include +#if defined __cplusplus + template struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper, __b) +#else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +#endif +#define alignof _Alignof + +#endif /* _NT_STDALIGN_H_ */ ------------------------------------------------------------ revno: 108395 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-05-27 06:19:11 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2012-05-23 10:17:31 +0000 +++ autogen/Makefile.in 2012-05-27 10:19:11 +0000 @@ -15,7 +15,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops largefile lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -73,20 +73,21 @@ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/manywarnings.m4 \ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/pathmax.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pthread_sigmask.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \ $(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \ $(top_srcdir)/m4/signal_h.m4 \ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/socklen.m4 \ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/st_dm_mode.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ - $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdio_h.m4 \ - $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strftime.m4 \ - $(top_srcdir)/m4/strtoimax.m4 $(top_srcdir)/m4/strtoll.m4 \ - $(top_srcdir)/m4/strtoull.m4 $(top_srcdir)/m4/strtoumax.m4 \ - $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ + $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdalign.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ + $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \ + $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ + $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strtoimax.m4 \ + $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/strtoull.m4 \ + $(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/symlink.m4 \ + $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_types_h.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_t.m4 \ @@ -230,13 +231,14 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETS = @GNULIB_GETS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ @@ -264,17 +266,20 @@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ @@ -288,6 +293,7 @@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SIGACTION = @GNULIB_SIGACTION@ GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ @@ -310,7 +316,6 @@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ @@ -364,6 +369,7 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ @@ -418,12 +424,15 @@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_READLINK = @HAVE_READLINK@ @@ -432,6 +441,7 @@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGACTION = @HAVE_SIGACTION@ HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ @@ -544,6 +554,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_GETOPT_H = @NEXT_GETOPT_H@ @@ -555,6 +566,7 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ NS_OBJ = @NS_OBJ@ @@ -605,6 +617,7 @@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ @@ -613,6 +626,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ @@ -634,9 +648,11 @@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ @@ -653,6 +669,7 @@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ @@ -679,6 +696,7 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ START_FILES = @START_FILES@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ @@ -702,6 +720,8 @@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WERROR_CFLAGS = @WERROR_CFLAGS@ WIDGET_OBJ = @WIDGET_OBJ@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XFT_CFLAGS = @XFT_CFLAGS@ XFT_LIBS = @XFT_LIBS@ @@ -795,9 +815,9 @@ # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. BUILT_SOURCES = $(ALLOCA_H) $(GETOPT_H) inttypes.h signal.h \ - arg-nonnull.h c++defs.h warn-on-use.h $(STDARG_H) $(STDBOOL_H) \ - $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h sys/stat.h time.h \ - unistd.h + arg-nonnull.h c++defs.h warn-on-use.h $(STDALIGN_H) \ + $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ + stdlib.h sys/stat.h sys/types.h time.h unistd.h EXTRA_DIST = alloca.in.h allocator.h careadlinkat.h md5.h sha1.h \ sha256.h sha512.h dosname.h ftoastr.c ftoastr.h dup2.c \ filemode.h getloadavg.c getopt.c getopt.in.h getopt1.c \ @@ -808,18 +828,20 @@ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ $(top_srcdir)/build-aux/snippet/c++defs.h \ $(top_srcdir)/build-aux/snippet/warn-on-use.h stat.c \ - stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h stdio.in.h \ - stdlib.in.h strftime.h strtoimax.c strtol.c strtoll.c strtol.c \ - strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \ - sys_stat.in.h time.in.h time_r.c u64.h unistd.in.h verify.h + stdalign.in.h stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h \ + stdio.in.h stdlib.in.h strftime.h strtoimax.c strtol.c \ + strtoll.c strtol.c strtoul.c strtoull.c strtoimax.c \ + strtoumax.c symlink.c sys_stat.in.h sys_types.in.h time.in.h \ + time_r.c u64.h unistd.in.h verify.h MOSTLYCLEANDIRS = sys MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t getopt.h \ getopt.h-t inttypes.h inttypes.h-t signal.h signal.h-t \ arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ - warn-on-use.h warn-on-use.h-t stdarg.h stdarg.h-t stdbool.h \ - stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \ - stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ - time.h-t unistd.h unistd.h-t + warn-on-use.h warn-on-use.h-t stdalign.h stdalign.h-t stdarg.h \ + stdarg.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h \ + stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t sys/stat.h \ + sys/stat.h-t sys/types.h sys/types.h-t time.h time.h-t \ + unistd.h unistd.h-t noinst_LIBRARIES = libgnu.a AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src @@ -1162,7 +1184,7 @@ # We need the following in order to create when the system # doesn't have one that works with the given compiler. -inttypes.h: inttypes.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) +inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ @@ -1183,10 +1205,12 @@ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/inttypes.in.h; \ @@ -1252,6 +1276,17 @@ > $@-t && \ mv $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works. +@GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status +@GL_GENERATE_STDALIGN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_STDALIGN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_STDALIGN_H_TRUE@ cat $(srcdir)/stdalign.in.h; \ +@GL_GENERATE_STDALIGN_H_TRUE@ } > $@-t && \ +@GL_GENERATE_STDALIGN_H_TRUE@ mv $@-t $@ +@GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status +@GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. @GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status @@ -1369,7 +1404,6 @@ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ - -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ @@ -1480,8 +1514,11 @@ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ + -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ @@ -1506,7 +1543,10 @@ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ + -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ + -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ + -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ @@ -1524,7 +1564,9 @@ -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ + -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ @@ -1549,6 +1591,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ + -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ @@ -1589,6 +1632,22 @@ } > $@-t && \ mv $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/types.h: sys_types.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ + -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + < $(srcdir)/sys_types.in.h; \ + } > $@-t && \ + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) @@ -1633,6 +1692,7 @@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ @@ -1657,6 +1717,7 @@ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ + -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ @@ -1669,11 +1730,12 @@ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ + -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ @@ -1706,6 +1768,7 @@ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ + -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ @@ -1718,6 +1781,7 @@ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ + -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ @@ -1727,11 +1791,13 @@ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ + -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2012-05-22 10:17:27 +0000 +++ autogen/aclocal.m4 2012-05-27 10:19:11 +0000 @@ -1004,6 +1004,7 @@ m4_include([m4/mktime.m4]) m4_include([m4/multiarch.m4]) m4_include([m4/nocrash.m4]) +m4_include([m4/off_t.m4]) m4_include([m4/pathmax.m4]) m4_include([m4/pthread_sigmask.m4]) m4_include([m4/readlink.m4]) @@ -1016,6 +1017,7 @@ m4_include([m4/ssize_t.m4]) m4_include([m4/st_dm_mode.m4]) m4_include([m4/stat.m4]) +m4_include([m4/stdalign.m4]) m4_include([m4/stdarg.m4]) m4_include([m4/stdbool.m4]) m4_include([m4/stddef_h.m4]) @@ -1029,6 +1031,7 @@ m4_include([m4/strtoumax.m4]) m4_include([m4/symlink.m4]) m4_include([m4/sys_stat_h.m4]) +m4_include([m4/sys_types_h.m4]) m4_include([m4/time_h.m4]) m4_include([m4/time_r.m4]) m4_include([m4/tm_gmtoff.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2012-05-23 10:17:31 +0000 +++ autogen/config.in 2012-05-27 10:19:11 +0000 @@ -49,12 +49,12 @@ /* Define if Emacs cannot be dumped on your system. */ #undef CANNOT_DUMP -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. +/* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP + systems. This function is required for 'alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END -/* Define to 1 if using `alloca.c'. */ +/* Define to 1 if using 'alloca.c'. */ #undef C_ALLOCA /* Define to 1 for DGUX with . */ @@ -92,9 +92,6 @@ /* Define to 1 if gettimeofday accepts only one argument. */ #undef GETTIMEOFDAY_ONE_ARGUMENT -/* Define to make the limit macros in visible. */ -#undef GL_TRIGGER_STDC_LIMIT_MACROS - /* enable some gnulib portability checks */ #undef GNULIB_PORTCHECK @@ -507,7 +504,7 @@ /* Define to 1 if you support file names longer than 14 characters. */ #undef HAVE_LONG_FILE_NAMES -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the `lrand48' function. */ @@ -833,7 +830,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if the system has the type `unsigned long long int'. */ +/* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the header file. */ @@ -942,7 +939,7 @@ /* Define to 1 if localtime caches TZ. */ #undef LOCALTIME_CACHE -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK @@ -1150,6 +1147,10 @@ /* enable compile-time and run-time bounds-checking, and some warnings */ #undef _FORTIFY_SOURCE +/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct + stat.st_size becomes 64-bit. */ +#undef _GL_WINDOWS_64_BIT_ST_SIZE + /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE @@ -1162,12 +1163,13 @@ /* Define if GNUstep uses ObjC exceptions. */ #undef _NATIVE_OBJC_EXCEPTIONS -/* The _Noreturn keyword of draft C1X. */ -#ifndef _Noreturn +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= _MSC_VER +# elif defined _MSC_VER && 1200 <= _MSC_VER # define _Noreturn __declspec (noreturn) # else # define _Noreturn @@ -1179,7 +1181,7 @@ this defined. */ #undef _POSIX_1_SOURCE -/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 500 only on HP-UX. */ @@ -1215,13 +1217,6 @@ used. */ #undef __GETOPT_PREFIX -/* Ensure that defines the limit macros, since gnulib's - relies on them. */ -#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -#endif - - /* Define to compiler's equivalent of C99 restrict keyword in array declarations. Define as empty for no equivalent. */ #undef __restrict_arr === modified file 'autogen/configure' --- autogen/configure 2012-05-27 01:06:44 +0000 +++ autogen/configure 2012-05-27 10:19:11 +0000 @@ -628,7 +628,6 @@ gl_GNULIB_ENABLED_dosname_TRUE LTLIBINTL LIBINTL -WARN_CFLAGS HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H @@ -637,6 +636,10 @@ TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H +WINDOWS_64_BIT_OFF_T +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H +NEXT_SYS_TYPES_H +WINDOWS_64_BIT_ST_SIZE NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H NEXT_AS_FIRST_DIRECTIVE_STDLIB_H @@ -720,7 +723,6 @@ GNULIB_PCLOSE GNULIB_OBSTACK_PRINTF_POSIX GNULIB_OBSTACK_PRINTF -GNULIB_GETS GNULIB_GETLINE GNULIB_GETDELIM GNULIB_GETCHAR @@ -761,8 +763,12 @@ STDARG_H NEXT_AS_FIRST_DIRECTIVE_STDARG_H NEXT_STDARG_H +GL_GENERATE_STDALIGN_H_FALSE +GL_GENERATE_STDALIGN_H_TRUE +STDALIGN_H NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H NEXT_SIGNAL_H +LIB_PTHREAD_SIGMASK REPLACE_RAISE REPLACE_PTHREAD_SIGMASK HAVE_SIGHANDLER_T @@ -779,7 +785,6 @@ GNULIB_SIGNAL_H_SIGPIPE GNULIB_RAISE GNULIB_PTHREAD_SIGMASK -LIB_PTHREAD_SIGMASK REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME @@ -834,6 +839,7 @@ PRI_MACROS_BROKEN INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX +REPLACE_STRTOIMAX HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV @@ -869,6 +875,7 @@ HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT +GNULIB_GL_UNISTD_H_GETOPT GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H @@ -884,7 +891,9 @@ REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC +REPLACE_RANDOM_R REPLACE_PUTENV +REPLACE_PTSNAME_R REPLACE_MKSTEMP REPLACE_MBTOWC REPLACE_MALLOC @@ -903,7 +912,10 @@ HAVE_REALPATH HAVE_RANDOM_R HAVE_RANDOM_H +HAVE_RANDOM +HAVE_PTSNAME_R HAVE_PTSNAME +HAVE_POSIX_OPENPT HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS @@ -927,8 +939,11 @@ GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R +GNULIB_RANDOM GNULIB_PUTENV +GNULIB_PTSNAME_R GNULIB_PTSNAME +GNULIB_POSIX_OPENPT GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS @@ -961,11 +976,13 @@ REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN +REPLACE_ISATTY REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R REPLACE_GETDOMAINNAME REPLACE_GETCWD +REPLACE_FTRUNCATE REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP @@ -974,6 +991,7 @@ HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R +HAVE_DECL_SETHOSTNAME HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R @@ -986,6 +1004,7 @@ HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP +HAVE_SETHOSTNAME HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE @@ -1017,11 +1036,11 @@ GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_NONBLOCKING -GNULIB_UNISTD_H_GETOPT GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP +GNULIB_SETHOSTNAME GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK @@ -1034,6 +1053,7 @@ GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN +GNULIB_ISATTY GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE @@ -1190,6 +1210,7 @@ GZIP_PROG INSTALL_INFO GNULIB_WARN_CFLAGS +WARN_CFLAGS WERROR_CFLAGS RANLIB ARFLAGS @@ -6924,6 +6945,7 @@ # Code from module socklen: # Code from module ssize_t: # Code from module stat: + # Code from module stdalign: # Code from module stdarg: @@ -6940,6 +6962,7 @@ # Code from module strtoumax: # Code from module symlink: # Code from module sys_stat: + # Code from module sys_types: # Code from module time: # Code from module time_r: # Code from module u64: @@ -6990,7 +7013,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + as_fn_append CFLAGS " -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7017,6 +7040,7 @@ as_fn_append WERROR_CFLAGS " -Werror" fi + ;; esac @@ -7255,7 +7279,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS $w" + as_fn_append CFLAGS " $w" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7284,6 +7308,7 @@ as_fn_append WARN_CFLAGS " $w" fi + done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; } @@ -7292,7 +7317,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-missing-field-initializers" + as_fn_append CFLAGS " -Wno-missing-field-initializers" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7318,6 +7343,7 @@ if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then : as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers" fi + # We need this one { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; } @@ -7326,7 +7352,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-sign-compare" + as_fn_append CFLAGS " -Wno-sign-compare" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7352,6 +7378,7 @@ if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then : as_fn_append WARN_CFLAGS " -Wno-sign-compare" fi + # Too many warnings for now { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; } @@ -7360,7 +7387,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-type-limits" + as_fn_append CFLAGS " -Wno-type-limits" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7386,6 +7413,7 @@ if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then : as_fn_append WARN_CFLAGS " -Wno-type-limits" fi + # Too many warnings for now { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; } @@ -7394,7 +7422,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-switch" + as_fn_append CFLAGS " -Wno-switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7420,6 +7448,7 @@ if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then : as_fn_append WARN_CFLAGS " -Wno-switch" fi + # Too many warnings for now { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; } @@ -7428,7 +7457,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-unused-parameter" + as_fn_append CFLAGS " -Wno-unused-parameter" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7454,6 +7483,7 @@ if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then : as_fn_append WARN_CFLAGS " -Wno-unused-parameter" fi + # Too many warnings for now { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; } @@ -7462,7 +7492,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-format-nonliteral" + as_fn_append CFLAGS " -Wno-format-nonliteral" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7490,6 +7520,7 @@ fi + # In spite of excluding -Wlogical-op above, it is enabled, as of # gcc 4.5.0 20090517. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5 @@ -7499,7 +7530,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-logical-op" + as_fn_append CFLAGS " -Wno-logical-op" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7527,6 +7558,7 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; } if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then : @@ -7534,7 +7566,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -fdiagnostics-show-option" + as_fn_append CFLAGS " -fdiagnostics-show-option" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7561,6 +7593,7 @@ as_fn_append WARN_CFLAGS " -fdiagnostics-show-option" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; } if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then : @@ -7568,7 +7601,7 @@ else gl_save_compiler_FLAGS="$CFLAGS" - CFLAGS="$CFLAGS -funit-at-a-time" + as_fn_append CFLAGS " -funit-at-a-time" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7597,6 +7630,7 @@ + $as_echo "#define lint 1" >>confdefs.h @@ -8075,207 +8109,6 @@ # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi - - -fi - - LIB_MATH=-lm LIB_STANDARD= @@ -16068,8 +15901,8 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; } if test "${ac_cv_os_cray+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -16512,6 +16345,7 @@ GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; GNULIB_GROUP_MEMBER=0; + GNULIB_ISATTY=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; @@ -16524,11 +16358,11 @@ GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; + GNULIB_SETHOSTNAME=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_GETOPT=0; GNULIB_UNISTD_H_NONBLOCKING=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; @@ -16560,6 +16394,7 @@ HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; + HAVE_SETHOSTNAME=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; @@ -16572,6 +16407,7 @@ HAVE_DECL_GETLOGIN_R=1; HAVE_DECL_GETPAGESIZE=1; HAVE_DECL_GETUSERSHELL=1; + HAVE_DECL_SETHOSTNAME=1; HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; @@ -16580,11 +16416,13 @@ REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; + REPLACE_FTRUNCATE=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=0; REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; + REPLACE_ISATTY=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; @@ -16666,8 +16504,11 @@ GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; + GNULIB_POSIX_OPENPT=0; GNULIB_PTSNAME=0; + GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; + GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; @@ -16691,7 +16532,10 @@ HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; + HAVE_POSIX_OPENPT=1; HAVE_PTSNAME=1; + HAVE_PTSNAME_R=1; + HAVE_RANDOM=1; HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; HAVE_REALPATH=1; @@ -16710,7 +16554,9 @@ REPLACE_MALLOC=0; REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; + REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; + REPLACE_RANDOM_R=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; @@ -16874,12 +16720,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'getopt.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'getopt.h\)".*|\1| + gl_header_literal_regex=`echo 'getopt.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -17379,7 +17228,6 @@ - GNULIB_UNISTD_H_GETOPT=1 fi ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" @@ -17631,12 +17479,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdint.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'stdint.h\)".*|\1| + gl_header_literal_regex=`echo 'stdint.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -17684,8 +17535,6 @@ /* end confdefs.h. */ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ @@ -17854,8 +17703,6 @@ /* end confdefs.h. */ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include @@ -18294,6 +18141,7 @@ HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; + REPLACE_STRTOIMAX=0; INT32_MAX_LT_INTMAX_MAX=1; INT64_MAX_EQ_LONG_MAX='defined _LP64'; PRI_MACROS_BROKEN=0; @@ -18342,12 +18190,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'inttypes.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'inttypes.h\)".*|\1| + gl_header_literal_regex=`echo 'inttypes.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -18381,11 +18232,51 @@ -$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h - - - - + + + + case "$host_os" in + mingw*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 +$as_echo_n "checking for 64-bit off_t... " >&6; } +if test "${gl_cv_type_off_t_64+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_off_t_64=yes +else + gl_cv_type_off_t_64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 +$as_echo "$gl_cv_type_off_t_64" >&6; } + if test $gl_cv_type_off_t_64 = no; then + WINDOWS_64_BIT_OFF_T=1 + else + WINDOWS_64_BIT_OFF_T=0 + fi + WINDOWS_64_BIT_ST_SIZE=1 + ;; + *) + WINDOWS_64_BIT_OFF_T=0 + WINDOWS_64_BIT_ST_SIZE=0 + ;; + esac GNULIB_FCHMODAT=0; @@ -18434,10 +18325,12 @@ echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : - # When cross-compiling, be pessimistic so we will end up using the - # replacement version of lstat that checks for trailing slashes and - # calls lstat a second time when necessary. - gl_cv_func_lstat_dereferences_slashed_symlink=no + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18468,19 +18361,22 @@ else # If the 'ln -s' command failed, then we probably don't even # have an lstat function. - gl_cv_func_lstat_dereferences_slashed_symlink=no + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } - test $gl_cv_func_lstat_dereferences_slashed_symlink = yes && + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *yes) cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF + ;; + esac GNULIB_MKTIME=0; @@ -18500,8 +18396,6 @@ - - GNULIB_PTHREAD_SIGMASK=0; GNULIB_RAISE=0; GNULIB_SIGNAL_H_SIGPIPE=0; @@ -18524,6 +18418,8 @@ + + ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " #include /* Mingw defines sigset_t not in , but in . */ @@ -18713,7 +18609,6 @@ GNULIB_GETCHAR=0; GNULIB_GETDELIM=0; GNULIB_GETLINE=0; - GNULIB_GETS=0; GNULIB_OBSTACK_PRINTF=0; GNULIB_OBSTACK_PRINTF_POSIX=0; GNULIB_PCLOSE=0; @@ -18989,6 +18884,14 @@ fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if test "${ac_cv_c_restrict+set}" = set; then : @@ -19171,12 +19074,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'time.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'time.h\)".*|\1| + gl_header_literal_regex=`echo 'time.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -19333,17 +19239,17 @@ if test "$cross_compiling" = yes; then : case "$host_os" in mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works=no;; + gl_cv_func_dup2_works="guessing no" ;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works=no;; + gl_cv_func_dup2_works="guessing no" ;; linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works=no;; + gl_cv_func_dup2_works="guessing no" ;; freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works=no;; + gl_cv_func_dup2_works="guessing no" ;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works=no;; - *) gl_cv_func_dup2_works=yes;; + gl_cv_func_dup2_works="guessing no" ;; + *) gl_cv_func_dup2_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19392,9 +19298,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 $as_echo "$gl_cv_func_dup2_works" >&6; } - if test "$gl_cv_func_dup2_works" = no; then - REPLACE_DUP2=1 - fi + case "$gl_cv_func_dup2_works" in + *yes) ;; + *) + REPLACE_DUP2=1 + ;; + esac fi @@ -19988,12 +19897,14 @@ + GNULIB_GL_UNISTD_H_GETOPT=1 fi + REPLACE_GETOPT=0 @@ -20012,7 +19923,6 @@ - GNULIB_UNISTD_H_GETOPT=1 fi if test $REPLACE_GETOPT = 1; then @@ -20039,17 +19949,22 @@ + GNULIB_GL_UNISTD_H_GETOPT=1 fi + + if test $ac_cv_func_lstat = yes; then - if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then - REPLACE_LSTAT=1 - fi + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *no) + REPLACE_LSTAT=1 + ;; + esac else HAVE_LSTAT=0 fi @@ -20344,6 +20259,8 @@ + + LIB_PTHREAD_SIGMASK= @@ -20618,7 +20535,13 @@ ln -s conftest.no-such conftest.link ln -s conftest.link conftest.lnk2 if test "$cross_compiling" = yes; then : - gl_cv_func_readlink_works="guessing no" + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_readlink_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20646,14 +20569,19 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 $as_echo "$gl_cv_func_readlink_works" >&6; } - if test "$gl_cv_func_readlink_works" != yes; then + case "$gl_cv_func_readlink_works" in + *yes) + if test "$gl_cv_decl_readlink_works" != yes; then + REPLACE_READLINK=1 + fi + ;; + *) $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h - REPLACE_READLINK=1 - elif test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 - fi + REPLACE_READLINK=1 + ;; + esac fi if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then @@ -20717,12 +20645,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'signal.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'signal.h\)".*|\1| + gl_header_literal_regex=`echo 'signal.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -20878,6 +20809,72 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 +$as_echo_n "checking for working stdalign.h... " >&6; } +if test "${gl_cv_header_working_stdalign_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + + /* Test that alignof yields a result consistent with offsetof. + This catches GCC bug 52023 + . */ + #ifdef __cplusplus + template struct alignof_helper { char a; t b; }; + # define ao(type) offsetof (alignof_helper, b) + #else + # define ao(type) offsetof (struct { char a; type b; }, b) + #endif + char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; + char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; + char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; + + /* Test _Alignas only on platforms where gnulib can help. */ + #if \ + (__GNUC__ || __IBMC__ || __IBMCPP__ \ + || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + int alignas (8) alignas_int = 1; + char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1]; + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_working_stdalign_h=yes +else + gl_cv_header_working_stdalign_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 +$as_echo "$gl_cv_header_working_stdalign_h" >&6; } + + if test $gl_cv_header_working_stdalign_h = yes; then + STDALIGN_H='' + else + STDALIGN_H='stdalign.h' + fi + + + if test -n "$STDALIGN_H"; then + GL_GENERATE_STDALIGN_H_TRUE= + GL_GENERATE_STDALIGN_H_FALSE='#' +else + GL_GENERATE_STDALIGN_H_TRUE='#' + GL_GENERATE_STDALIGN_H_FALSE= +fi + + + STDARG_H='' NEXT_STDARG_H='' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 @@ -20961,12 +20958,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdarg.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'stdarg.h\)".*|\1| + gl_header_literal_regex=`echo 'stdarg.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -21161,12 +21161,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stddef.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'stddef.h\)".*|\1| + gl_header_literal_regex=`echo 'stddef.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -21231,12 +21234,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdio.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'stdio.h\)".*|\1| + gl_header_literal_regex=`echo 'stdio.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -21270,7 +21276,6 @@ GNULIB_GETC=1 GNULIB_GETCHAR=1 GNULIB_FGETS=1 - GNULIB_GETS=1 GNULIB_FREAD=1 @@ -21323,12 +21328,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'stdlib.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'stdlib.h\)".*|\1| + gl_header_literal_regex=`echo 'stdlib.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -21381,7 +21389,83 @@ HAVE_DECL_STRTOIMAX=0 fi -if test $ac_cv_func_strtoimax = no; then + if test $ac_cv_func_strtoimax = yes; then + HAVE_STRTOIMAX=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5 +$as_echo_n "checking whether strtoimax works... " >&6; } +if test "${gl_cv_func_strtoimax+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess no on AIX 5. + aix5*) gl_cv_func_strtoimax="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_strtoimax="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +int main () +{ + if (sizeof (intmax_t) > sizeof (int)) + { + const char *s = "4294967295"; + char *p; + intmax_t res; + errno = 0; + res = strtoimax (s, &p, 10); + if (p != s + strlen (s)) + return 1; + if (errno != 0) + return 2; + if (res != (intmax_t) 65535 * (intmax_t) 65537) + return 3; + } + else + { + const char *s = "2147483647"; + char *p; + intmax_t res; + errno = 0; + res = strtoimax (s, &p, 10); + if (p != s + strlen (s)) + return 1; + if (errno != 0) + return 2; + if (res != 2147483647) + return 3; + } + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strtoimax=yes +else + gl_cv_func_strtoimax=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5 +$as_echo "$gl_cv_func_strtoimax" >&6; } + case "$gl_cv_func_strtoimax" in + *no) REPLACE_STRTOIMAX=1 ;; + esac + else + HAVE_STRTOIMAX=0 + fi + +if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then @@ -21474,7 +21558,13 @@ $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_symlink_works="guessing no" + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_symlink_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21509,9 +21599,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 $as_echo "$gl_cv_func_symlink_works" >&6; } - if test "$gl_cv_func_symlink_works" != yes; then - REPLACE_SYMLINK=1 - fi + case "$gl_cv_func_symlink_works" in + *yes) ;; + *) + REPLACE_SYMLINK=1 + ;; + esac fi if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then @@ -21580,12 +21673,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'sys/stat.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'sys/stat.h\)".*|\1| + gl_header_literal_regex=`echo 'sys/stat.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -21618,6 +21714,16 @@ + + + + + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + +$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h + + fi + ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include #include " @@ -21643,6 +21749,83 @@ + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_types_h='<'sys/types.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_sys_types_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + + gl_header_literal_regex=`echo 'sys/types.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 +$as_echo "$gl_cv_next_sys_types_h" >&6; } + fi + NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/types.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_types_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive + + + + + + + + + + + + + + + + + + + + + + if test $ac_cv_have_decl_localtime_r = no; then HAVE_DECL_LOCALTIME_R=0 fi @@ -21760,12 +21943,15 @@ gl_dirsep_regex='[/\\]' ;; *) - gl_dirsep_regex='/' + gl_dirsep_regex='\/' ;; esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'unistd.h|{ - s|.*"\(.*'"${gl_dirsep_regex}"'unistd.h\)".*|\1| + gl_header_literal_regex=`echo 'unistd.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ s|^/[^/]|//&| p q @@ -21807,6 +21993,7 @@ + gl_gnulib_enabled_dosname=false gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false gl_gnulib_enabled_pathmax=false @@ -21925,7 +22112,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 $as_echo "$gl_cv_func_stat_dir_slash" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } if test "${gl_cv_func_stat_file_slash+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -21936,7 +22123,13 @@ ln -s conftest.tmp conftest.lnk fi if test "$cross_compiling" = yes; then : - gl_cv_func_stat_file_slash="guessing no" + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_stat_file_slash="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22149,18 +22342,18 @@ if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then func_gl_gnulib_m4code_stat fi - if test $ac_cv_func_strtoimax = no; then - func_gl_gnulib_m4code_verify - fi - if test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then + if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then func_gl_gnulib_m4code_strtoll fi - if test $ac_cv_func_strtoumax = no; then + if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then func_gl_gnulib_m4code_verify fi if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then func_gl_gnulib_m4code_strtoull fi + if test $ac_cv_func_strtoumax = no; then + func_gl_gnulib_m4code_verify + fi if $gl_gnulib_enabled_dosname; then gl_GNULIB_ENABLED_dosname_TRUE= @@ -22677,6 +22870,10 @@ as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then + as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 ------------------------------------------------------------ revno: 108394 fixes bug(s): http://debbugs.gnu.org/10181 committer: Juri Linkov branch nick: trunk timestamp: Sun 2012-05-27 12:45:54 +0300 message: * lisp/emacs-lisp/lisp-mode.el (eval-defun-2): Use `eval-sexp-add-defvars' after the `eval-defun-1' specialcaseing like in `edebug-eval-defun'. * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Set `face-documentation' like in `eval-defun-1'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-05-27 01:06:44 +0000 +++ lisp/ChangeLog 2012-05-27 09:45:54 +0000 @@ -1,3 +1,12 @@ +2012-05-27 Juri Linkov + + * emacs-lisp/lisp-mode.el (eval-defun-2): Use `eval-sexp-add-defvars' + after the `eval-defun-1' specialcaseing + like in `edebug-eval-defun' (bug#10181). + + * emacs-lisp/edebug.el (edebug-eval-defun): Set `face-documentation' + like in `eval-defun-1'. + 2012-05-27 Eli Zaretskii * mail/sendmail.el (mail-yank-region): Recognize === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2012-05-26 15:52:27 +0000 +++ lisp/emacs-lisp/edebug.el 2012-05-27 09:45:54 +0000 @@ -527,6 +527,7 @@ (setq face-new-frame-defaults (assq-delete-all (nth 1 form) face-new-frame-defaults)) (put (nth 1 form) 'face-defface-spec nil) + (put (nth 1 form) 'face-documentation (nth 3 form)) ;; See comments in `eval-defun-1' for purpose of code below (setq form (prog1 `(prog1 ,form (put ',(nth 1 form) 'saved-face === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2012-05-26 15:52:27 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2012-05-27 09:45:54 +0000 @@ -829,10 +829,10 @@ (end-of-defun) (beginning-of-defun) (setq beg (point)) - (setq form (eval-sexp-add-defvars (read (current-buffer)))) + (setq form (read (current-buffer))) (setq end (point))) ;; Alter the form if necessary. - (setq form (eval-defun-1 (macroexpand form))) + (setq form (eval-sexp-add-defvars (eval-defun-1 (macroexpand form)))) (list beg end standard-output `(lambda (ignore) ;; Skipping to the end of the specified region ------------------------------------------------------------ revno: 108393 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-05-27 02:12:09 -0700 message: Assume gnulib does largefile. Gnulib does the largefile configuration anyway, so when configure.in invokes AC_SYS_LARGEFILE, that bloats 'configure' unnecessarily. * admin/merge-gnulib (GNULIB_MODULES): Add largefile. * configure.in (AC_SYS_LARGEFILE): Remove. * lib/gnulib.mk: Autoupdate. diff: === modified file 'ChangeLog' --- ChangeLog 2012-05-26 23:14:36 +0000 +++ ChangeLog 2012-05-27 09:12:09 +0000 @@ -1,3 +1,11 @@ +2012-05-27 Paul Eggert + + Assume gnulib does largefile. + Gnulib does the largefile configuration anyway, so when configure.in + invokes AC_SYS_LARGEFILE, that bloats 'configure' unnecessarily. + * configure.in (AC_SYS_LARGEFILE): Remove. + * lib/gnulib.mk: Autoupdate. + 2012-05-26 Paul Eggert Merge from gnulib. (Bug#11527) === modified file 'admin/ChangeLog' --- admin/ChangeLog 2012-05-22 16:20:27 +0000 +++ admin/ChangeLog 2012-05-27 09:12:09 +0000 @@ -1,3 +1,8 @@ +2012-05-27 Paul Eggert + + Assume gnulib does largefile. + * merge-gnulib (GNULIB_MODULES): Add largefile. + 2012-05-22 Paul Eggert Remove src/m/*. === modified file 'admin/merge-gnulib' --- admin/merge-gnulib 2012-05-21 19:04:11 +0000 +++ admin/merge-gnulib 2012-05-27 09:12:09 +0000 @@ -29,7 +29,7 @@ alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 - filemode getloadavg getopt-gnu ignore-value intprops lstat + filemode getloadavg getopt-gnu ignore-value intprops largefile lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings === modified file 'configure.in' --- configure.in 2012-05-27 01:06:44 +0000 +++ configure.in 2012-05-27 09:12:09 +0000 @@ -942,9 +942,6 @@ # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. AC_DEFUN([AC_TYPE_UID_T]) -dnl Do this early because it can frob feature test macros for Unix-98 &c. -AC_SYS_LARGEFILE - LIB_MATH=-lm LIB_STANDARD= === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2012-05-26 23:14:36 +0000 +++ lib/gnulib.mk 2012-05-27 09:12:09 +0000 @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops largefile lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings MOSTLYCLEANFILES += core *.stackdump ------------------------------------------------------------ revno: 108392 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-05-27 00:51:09 -0700 message: * lisp.h [REL_ALLOC]: Omit duplicate prototypes. Only r_alloc_inhibit_buffer_relocation needed to be added; the others were already declared. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-27 07:32:46 +0000 +++ src/ChangeLog 2012-05-27 07:51:09 +0000 @@ -1,5 +1,9 @@ 2012-05-27 Paul Eggert + * lisp.h [REL_ALLOC]: Omit duplicate prototypes. + Only r_alloc_inhibit_buffer_relocation needed to be added; + the others were already declared. + * bidi.c (bidi_mirror_char): Don't possibly truncate the integer before checking whether it's out of range. Put the check inside eassert. See === modified file 'src/lisp.h' --- src/lisp.h 2012-05-27 01:06:44 +0000 +++ src/lisp.h 2012-05-27 07:51:09 +0000 @@ -2907,6 +2907,7 @@ extern void r_alloc_free (void **); extern void *r_re_alloc (void **, size_t); extern void r_alloc_reset_variable (void **, void **); +extern void r_alloc_inhibit_buffer_relocation (int); #endif /* Defined in chartab.c */ @@ -3633,15 +3634,6 @@ /* Defined in msdos.c, w32.c */ extern char *emacs_root_dir (void); #endif /* DOS_NT */ - -#ifdef REL_ALLOC -/* Defined in ralloc.c */ -extern void r_alloc_reset_variable (POINTER_TYPE **, POINTER_TYPE **); -extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t); -extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t); -extern void r_alloc_free (POINTER_TYPE **ptr); -extern void r_alloc_inhibit_buffer_relocation (int); -#endif /* REL_ALLOC */ /* Nonzero means Emacs has already been initialized. Used during startup to detect startup of dumped Emacs. */ ------------------------------------------------------------ revno: 108391 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-05-27 00:32:46 -0700 message: * bidi.c (bidi_mirror_char): Don't possibly truncate the integer before checking whether it's out of range. Put the check inside eassert. See . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-05-27 01:06:44 +0000 +++ src/ChangeLog 2012-05-27 07:32:46 +0000 @@ -1,3 +1,10 @@ +2012-05-27 Paul Eggert + + * bidi.c (bidi_mirror_char): Don't possibly truncate the integer + before checking whether it's out of range. Put the check inside + eassert. See + . + 2012-05-27 Ken Brown * callproc.c (Fcall_process): Restore a line that was accidentally === modified file 'src/bidi.c' --- src/bidi.c 2012-05-26 07:03:39 +0000 +++ src/bidi.c 2012-05-27 07:32:46 +0000 @@ -204,12 +204,8 @@ val = CHAR_TABLE_REF (bidi_mirror_table, c); if (INTEGERP (val)) { - int v = XINT (val); - - if (v < 0 || v > MAX_CHAR) - abort (); - - return v; + eassert (CHAR_VALID_P (XINT (val))); + return XINT (val); } return c; ------------------------------------------------------------ revno: 108390 committer: Glenn Morris branch nick: trunk timestamp: Sat 2012-05-26 19:30:29 -0700 message: * doc/misc/cl.texi, doc/misc/dired-x.texi: Nuke hand-written node pointers. Some associated fixes, including not messing with chapno in cl.texi. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-05-27 01:06:44 +0000 +++ doc/misc/ChangeLog 2012-05-27 02:30:29 +0000 @@ -1,3 +1,8 @@ +2012-05-27 Glenn Morris + + * cl.texi, dired-x.texi: Nuke hand-written node pointers. + Some associated fixes, including not messing with chapno in cl.texi. + 2012-05-27 Bastien Guerry * org.texi (Durations and time values): Fix typo. === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2012-02-29 08:05:16 +0000 +++ doc/misc/cl.texi 2012-05-27 02:30:29 +0000 @@ -45,16 +45,10 @@ @contents -@node Top, Overview, (dir), (dir) -@chapter Introduction - -@noindent -This document describes a set of Emacs Lisp facilities borrowed from -Common Lisp. All the facilities are described here in detail. While -this document does not assume any prior knowledge of Common Lisp, it -does assume a basic familiarity with Emacs Lisp. - @ifnottex +@node Top +@top GNU Emacs Common Lisp Emulation + @insertcopying @end ifnottex @@ -82,12 +76,15 @@ * Variable Index:: @end menu -@node Overview, Program Structure, Top, Top -@ifnottex +@node Overview @chapter Overview -@end ifnottex @noindent +This document describes a set of Emacs Lisp facilities borrowed from +Common Lisp. All the facilities are described here in detail. While +this document does not assume any prior knowledge of Common Lisp, it +does assume a basic familiarity with Emacs Lisp. + Common Lisp is a huge language, and Common Lisp systems tend to be massive and extremely complex. Emacs Lisp, by contrast, is rather minimalist in the choice of Lisp features it offers the programmer. @@ -150,7 +147,7 @@ * Naming Conventions:: Notes on CL function names @end menu -@node Usage, Organization, Overview, Overview +@node Usage @section Usage @noindent @@ -166,7 +163,7 @@ in your @file{.emacs} file. But it's a good idea, for portability, to @code{(require 'cl)} in your code even if you do this. -@node Organization, Installation, Usage, Overview +@node Organization @section Organization @noindent @@ -212,7 +209,7 @@ multiple-values feature. This file is obsolete and should not be used in new code. @xref{Old CL Compatibility}. -@node Installation, Naming Conventions, Organization, Overview +@node Installation @section Installation @noindent @@ -226,7 +223,7 @@ file and put the resulting Info files into a directory in your @code{Info-directory-list}. -@node Naming Conventions, , Installation, Overview +@node Naming Conventions @section Naming Conventions @noindent @@ -280,11 +277,7 @@ @noindent [4] Only when @var{place} is a plain variable name. -@iftex -@chapno=4 -@end iftex - -@node Program Structure, Predicates, Overview, Top +@node Program Structure @chapter Program Structure @noindent @@ -301,7 +294,7 @@ @secno=1 @end iftex -@node Argument Lists, Time of Evaluation, Program Structure, Program Structure +@node Argument Lists @section Argument Lists @noindent @@ -525,7 +518,7 @@ arguments and invalid keyword arguments is disabled. By default, argument lists are rigorously checked. -@node Time of Evaluation, , Argument Lists, Program Structure +@node Time of Evaluation @section Time of Evaluation @noindent @@ -675,7 +668,7 @@ @end example @end defspec -@node Predicates, Control Structure, Program Structure, Top +@node Predicates @chapter Predicates @noindent @@ -687,7 +680,7 @@ * Equality Predicates:: @code{equalp} @end menu -@node Type Predicates, Equality Predicates, Predicates, Predicates +@node Type Predicates @section Type Predicates @noindent @@ -820,7 +813,7 @@ @code{concatenate}, and @code{merge} functions take type-name arguments to specify the type of sequence to return. @xref{Sequences}. -@node Equality Predicates, , Type Predicates, Predicates +@node Equality Predicates @section Equality Predicates @noindent @@ -848,7 +841,7 @@ In Emacs, use @code{member*} and @code{assoc*} to get functions which use @code{eql} for comparisons. -@node Control Structure, Macros, Predicates, Top +@node Control Structure @chapter Control Structure @noindent @@ -868,7 +861,7 @@ * Multiple Values:: @code{values}, @code{multiple-value-bind}, etc. @end menu -@node Assignment, Generalized Variables, Control Structure, Control Structure +@node Assignment @section Assignment @noindent @@ -905,7 +898,7 @@ @code{psetq} always returns @code{nil}. @end defspec -@node Generalized Variables, Variable Bindings, Assignment, Control Structure +@node Generalized Variables @section Generalized Variables @noindent @@ -934,7 +927,7 @@ * Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method} @end menu -@node Basic Setf, Modify Macros, Generalized Variables, Generalized Variables +@node Basic Setf @subsection Basic Setf @noindent @@ -1105,7 +1098,7 @@ to @code{wrong-order}. @end defspec -@node Modify Macros, Customizing Setf, Basic Setf, Generalized Variables +@node Modify Macros @subsection Modify Macros @noindent @@ -1316,7 +1309,7 @@ macros are used in the processing of symbol macros; @pxref{Macro Bindings}. -@node Customizing Setf, , Modify Macros, Generalized Variables +@node Customizing Setf @subsection Customizing Setf @noindent @@ -1529,7 +1522,7 @@ @secno=4 @end iftex -@node Variable Bindings, Conditionals, Generalized Variables, Control Structure +@node Variable Bindings @section Variable Bindings @noindent @@ -1546,7 +1539,7 @@ * Macro Bindings:: @code{macrolet} and @code{symbol-macrolet} @end menu -@node Dynamic Bindings, Lexical Bindings, Variable Bindings, Variable Bindings +@node Dynamic Bindings @subsection Dynamic Bindings @noindent @@ -1566,7 +1559,7 @@ are ignored. @end defspec -@node Lexical Bindings, Function Bindings, Dynamic Bindings, Variable Bindings +@node Lexical Bindings @subsection Lexical Bindings @noindent @@ -1680,7 +1673,7 @@ are made sequentially in the manner of @code{let*}. @end defspec -@node Function Bindings, Macro Bindings, Lexical Bindings, Variable Bindings +@node Function Bindings @subsection Function Bindings @noindent @@ -1756,7 +1749,7 @@ @code{function} to be passed on to, say, @code{mapcar}. @end defspec -@node Macro Bindings, , Function Bindings, Variable Bindings +@node Macro Bindings @subsection Macro Bindings @noindent @@ -1843,7 +1836,7 @@ works much like @code{my-dolist}. @end defspec -@node Conditionals, Blocks and Exits, Variable Bindings, Control Structure +@node Conditionals @section Conditionals @noindent @@ -1917,7 +1910,7 @@ simply returning @code{nil}. @end defspec -@node Blocks and Exits, Iteration, Conditionals, Control Structure +@node Blocks and Exits @section Blocks and Exits @noindent @@ -1982,7 +1975,7 @@ themselves in @code{nil} blocks. @end defspec -@node Iteration, Loop Facility, Blocks and Exits, Control Structure +@node Iteration @section Iteration @noindent @@ -2126,7 +2119,7 @@ @xref{Mapping over Sequences}, for some more functions for iterating over vectors or lists. -@node Loop Facility, Multiple Values, Iteration, Control Structure +@node Loop Facility @section Loop Facility @noindent @@ -2148,7 +2141,7 @@ * Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally} @end menu -@node Loop Basics, Loop Examples, Loop Facility, Loop Facility +@node Loop Basics @subsection Loop Basics @noindent @@ -2207,7 +2200,7 @@ Consult the second edition of Steele's @dfn{Common Lisp, the Language}, for additional discussion and examples of the @code{loop} macro. -@node Loop Examples, For Clauses, Loop Basics, Loop Facility +@node Loop Examples @subsection Loop Examples @noindent @@ -2280,7 +2273,7 @@ rather than some sort of triple-nested loop. You must explicitly nest your @code{loop} constructs if you want nested loops. -@node For Clauses, Iteration Clauses, Loop Examples, Loop Facility +@node For Clauses @subsection For Clauses @noindent @@ -2595,7 +2588,7 @@ @result{} (1 2) @end example -@node Iteration Clauses, Accumulation Clauses, For Clauses, Loop Facility +@node Iteration Clauses @subsection Iteration Clauses @noindent @@ -2654,7 +2647,7 @@ values were @code{nil}, the loop returns @code{nil}. @end table -@node Accumulation Clauses, Other Clauses, Iteration Clauses, Loop Facility +@node Accumulation Clauses @subsection Accumulation Clauses @noindent @@ -2723,7 +2716,7 @@ @result{} (fred bob ken sue alice joe kris sunshine june) @end example -@node Other Clauses, , Accumulation Clauses, Loop Facility +@node Other Clauses @subsection Other Clauses @noindent @@ -2874,7 +2867,7 @@ iterate over keymaps, overlays, intervals, frames, windows, and buffers are Emacs-specific extensions. -@node Multiple Values, , Loop Facility, Control Structure +@node Multiple Values @section Multiple Values @noindent @@ -2916,7 +2909,7 @@ Since a perfect emulation is not feasible in Emacs Lisp, this package opts to keep it as simple and predictable as possible. -@node Macros, Declarations, Control Structure, Top +@node Macros @chapter Macros @noindent @@ -2994,7 +2987,7 @@ and @code{symbol-macrolet} forms for making ``local'' macro definitions. -@node Declarations, Symbols, Macros, Top +@node Declarations @chapter Declarations @noindent @@ -3176,7 +3169,7 @@ See the documentation for the optimizing byte compiler for details. @end table -@node Symbols, Numbers, Declarations, Top +@node Symbols @chapter Symbols @noindent @@ -3188,7 +3181,7 @@ * Creating Symbols:: @code{gensym}, @code{gentemp} @end menu -@node Property Lists, Creating Symbols, Symbols, Symbols +@node Property Lists @section Property Lists @noindent @@ -3273,7 +3266,7 @@ @secno=2 @end iftex -@node Creating Symbols, , Property Lists, Symbols +@node Creating Symbols @section Creating Symbols @noindent @@ -3318,11 +3311,7 @@ keywords as data unrelated to keyword arguments, so the @code{defkeyword} form has been discontinued. -@iftex -@chapno=11 -@end iftex - -@node Numbers, Sequences, Symbols, Top +@node Numbers @chapter Numbers @noindent @@ -3340,7 +3329,7 @@ @secno=1 @end iftex -@node Predicates on Numbers, Numerical Functions, Numbers, Numbers +@node Predicates on Numbers @section Predicates on Numbers @noindent @@ -3377,7 +3366,7 @@ @secno=3 @end iftex -@node Numerical Functions, Random Numbers, Predicates on Numbers, Numbers +@node Numerical Functions @section Numerical Functions @noindent @@ -3473,7 +3462,7 @@ @secno=8 @end iftex -@node Random Numbers, Implementation Parameters, Numerical Functions, Numbers +@node Random Numbers @section Random Numbers @noindent @@ -3534,7 +3523,7 @@ @code{random-state} object, or @code{nil} otherwise. @end defun -@node Implementation Parameters, , Random Numbers, Numbers +@node Implementation Parameters @section Implementation Parameters @noindent @@ -3615,11 +3604,7 @@ @code{1.11e-16}. @end defvar -@iftex -@chapno=13 -@end iftex - -@node Sequences, Lists, Numbers, Top +@node Sequences @chapter Sequences @noindent @@ -3636,7 +3621,7 @@ * Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge} @end menu -@node Sequence Basics, Mapping over Sequences, Sequences, Sequences +@node Sequence Basics @section Sequence Basics @noindent @@ -3713,7 +3698,7 @@ the properties of the characters copied from @var{str} into the result. -@node Mapping over Sequences, Sequence Functions, Sequence Basics, Sequences +@node Mapping over Sequences @section Mapping over Sequences @noindent @@ -3851,7 +3836,7 @@ be faster since it generates the loop as in-line code with no function calls. -@node Sequence Functions, Searching Sequences, Mapping over Sequences, Sequences +@node Sequence Functions @section Sequence Functions @noindent @@ -3978,7 +3963,7 @@ and @code{nsubstitute-if-not} functions are defined similarly. For these, a @var{predicate} is given in place of the @var{old} argument. -@node Searching Sequences, Sorting Sequences, Sequence Functions, Sequences +@node Searching Sequences @section Searching Sequences @noindent @@ -4047,7 +4032,7 @@ function finds the @emph{rightmost} matching subsequence. @end defun -@node Sorting Sequences, , Searching Sequences, Sequences +@node Sorting Sequences @section Sorting Sequences @defun sort* seq predicate @t{&key :key} @@ -4106,7 +4091,7 @@ @var{predicate}. @end defun -@node Lists, Structures, Sequences, Top +@node Lists @chapter Lists @noindent @@ -4119,7 +4104,7 @@ * Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis} @end menu -@node List Functions, Substitution of Expressions, Lists, Lists +@node List Functions @section List Functions @noindent @@ -4212,7 +4197,7 @@ @secno=3 @end iftex -@node Substitution of Expressions, Lists as Sets, List Functions, Lists +@node Substitution of Expressions @section Substitution of Expressions @noindent @@ -4261,7 +4246,7 @@ This is a destructive version of @code{sublis}. @end defun -@node Lists as Sets, Association Lists, Substitution of Expressions, Lists +@node Lists as Sets @section Lists as Sets @noindent @@ -4360,7 +4345,7 @@ also appears in @var{list2}. @end defun -@node Association Lists, , Lists as Sets, Lists +@node Association Lists @section Association Lists @noindent @@ -4404,11 +4389,7 @@ @var{alist})}. @end defun -@iftex -@chapno=18 -@end iftex - -@node Structures, Assertions, Lists, Top +@node Structures @chapter Structures @noindent @@ -4738,11 +4719,7 @@ Except as noted, the @code{defstruct} facility of this package is entirely compatible with that of Common Lisp. -@iftex -@chapno=23 -@end iftex - -@node Assertions, Efficiency Concerns, Structures, Top +@node Assertions @chapter Assertions and Errors @noindent @@ -4814,7 +4791,7 @@ returns the result of the last @var{form}. @end defspec -@node Efficiency Concerns, Common Lisp Compatibility, Assertions, Top +@node Efficiency Concerns @appendix Efficiency Concerns @appendixsec Macros @@ -4957,7 +4934,7 @@ optimizing compiler removes @code{block}s which are not actually referenced by @code{return} or @code{return-from} inside the block. -@node Common Lisp Compatibility, Old CL Compatibility, Efficiency Concerns, Top +@node Common Lisp Compatibility @appendix Common Lisp Compatibility @noindent @@ -5019,7 +4996,7 @@ The second argument of @code{check-type} is treated differently. -@node Old CL Compatibility, Porting Common Lisp, Common Lisp Compatibility, Top +@node Old CL Compatibility @appendix Old CL Compatibility @noindent @@ -5120,7 +5097,7 @@ @code{floor}, @code{ceiling}, etc.; @code{cl-compat} cannot use these names because they conflict with Emacs built-ins. -@node Porting Common Lisp, GNU Free Documentation License, Old CL Compatibility, Top +@node Porting Common Lisp @appendix Porting Common Lisp @noindent @@ -5326,16 +5303,16 @@ recursion. @end itemize -@node GNU Free Documentation License, Function Index, Porting Common Lisp, Top +@node GNU Free Documentation License @appendix GNU Free Documentation License @include doclicense.texi -@node Function Index, Variable Index, GNU Free Documentation License, Top +@node Function Index @unnumbered Function Index @printindex fn -@node Variable Index, , Function Index, Top +@node Variable Index @unnumbered Variable Index @printindex vr === modified file 'doc/misc/dired-x.texi' --- doc/misc/dired-x.texi 2012-01-19 07:21:25 +0000 +++ doc/misc/dired-x.texi 2012-05-27 02:30:29 +0000 @@ -111,7 +111,7 @@ @end ifnottex -@node Introduction, Installation, Top, Top +@node Introduction @chapter Introduction This documents some @emph{extra} features for GNU Emacs's Dired Mode @@ -125,7 +125,7 @@ @end menu @end ifnottex -@node Features, Technical Details, , Introduction +@node Features @section Features @cindex Features @@ -157,7 +157,7 @@ @code{dired-x-find-file} and @code{dired-x-find-file-other-window}, respectively (@pxref{Find File At Point}). -@node Technical Details, , Features, Introduction +@node Technical Details @section Technical Details @cindex Modified functions @cindex @file{dired-aux.el} @@ -173,7 +173,7 @@ @code{dired-guess-shell-command} (@pxref{Shell Command Guessing}) to offer a smarter default command. -@node Installation, Omitting Files in Dired, Introduction, Top +@node Installation @chapter Installation @noindent @@ -211,7 +211,7 @@ @end menu @end ifnottex -@node Optional Installation Dired Jump, Optional Installation File At Point, , Installation +@node Optional Installation Dired Jump @section Optional Installation Dired Jump @cindex Autoloading @code{dired-jump} and @code{dired-jump-other-window} @@ -232,7 +232,7 @@ (define-key global-map "\C-x4\C-j" 'dired-jump-other-window) @end example -@node Optional Installation File At Point, , Optional Installation Dired Jump, Installation +@node Optional Installation File At Point @section Optional Installation File At Point @cindex Binding @code{dired-x-find-file} @@ -251,7 +251,7 @@ )) @end example -@node Omitting Files in Dired, Local Variables, Installation, Top +@node Omitting Files in Dired @chapter Omitting Files in Dired @cindex Omitting Files in Dired @@ -307,7 +307,7 @@ @end menu @end ifnottex -@node Omitting Variables, Omitting Examples, , Omitting Files in Dired +@node Omitting Variables @section Omitting Variables @cindex Customizing file omitting @@ -403,7 +403,7 @@ @end table -@node Omitting Examples, Omitting Technical, Omitting Variables, Omitting Files in Dired +@node Omitting Examples @section Examples of Omitting Various File Types @itemize @bullet @@ -458,7 +458,7 @@ @end itemize -@node Omitting Technical, , Omitting Examples, Omitting Files in Dired +@node Omitting Technical @section Some Technical Details of Omitting Loading @file{dired-x.el} will install Dired Omit by putting @@ -466,7 +466,7 @@ call @code{dired-extra-startup}, which in turn calls @code{dired-omit-startup} in your @code{dired-mode-hook}. -@node Local Variables, Shell Command Guessing, Omitting Files in Dired, Top +@node Local Variables @chapter Local Variables for Dired Directories @cindex Local Variables for Dired Directories @@ -537,7 +537,7 @@ variable. A value of @code{nil} means to ignore any Dired Local Variables. @end table -@node Shell Command Guessing, Virtual Dired, Local Variables, Top +@node Shell Command Guessing @chapter Shell Command Guessing @cindex Guessing shell commands for files. @@ -643,7 +643,7 @@ History list for commands that read dired-shell commands. @end table -@node Virtual Dired, Advanced Mark Commands, Shell Command Guessing, Top +@node Virtual Dired @chapter Virtual Dired @cindex Virtual Dired @@ -684,7 +684,7 @@ The regexp is a bit more complicated than usual to exclude @file{.dired} local-variable files. -@node Advanced Mark Commands, Multiple Dired Directories, Virtual Dired, Top +@node Advanced Mark Commands @chapter Advanced Mark Commands @table @kbd @@ -730,7 +730,7 @@ @end menu @end ifnottex -@node Advanced Cleaning Functions, Advanced Cleaning Variables, , Advanced Mark Commands +@node Advanced Cleaning Functions @section Advanced Cleaning Functions @table @code @@ -761,7 +761,7 @@ and @file{*.dvi} files for deletion. @end table -@node Advanced Cleaning Variables, Special Marking Function, Advanced Cleaning Functions, Advanced Mark Commands +@node Advanced Cleaning Variables @section Advanced Cleaning Variables @noindent Variables used by the above cleaning commands (and in the default value for @@ -800,7 +800,7 @@ List of extensions of dispensable files created by Bib@TeX{}. @end table -@node Special Marking Function, , Advanced Cleaning Variables, Advanced Mark Commands +@node Special Marking Function @section Special Marking Function @table @kbd @@ -856,7 +856,7 @@ @end table -@node Multiple Dired Directories, Find File At Point, Advanced Mark Commands, Top +@node Multiple Dired Directories @chapter Multiple Dired Directories and Non-Dired Commands @cindex Multiple Dired directories @@ -876,8 +876,8 @@ Dired buffers, is like @code{shell-command}, but it runs with @code{default-directory} bound to the current Dired directory. -@node Find File At Point, Miscellaneous Commands, Multiple Dired Directories, Top -@section Find File At Point +@node Find File At Point +@chapter Find File At Point @cindex Visiting a file mentioned in a buffer @cindex Finding a file at point @@ -952,7 +952,7 @@ @code{find-file-other-window}. See @xref{Optional Installation File At Point}. @end table -@node Miscellaneous Commands, Bugs, Find File At Point, Top +@node Miscellaneous Commands @chapter Miscellaneous Commands Miscellaneous features not fitting anywhere else: @@ -1082,7 +1082,7 @@ info. @end table -@node Bugs, GNU Free Documentation License, Miscellaneous Commands, Top +@node Bugs @chapter Bugs @cindex Bugs @@ -1090,23 +1090,23 @@ If you encounter a bug in this package, or wish to suggest an enhancement, then please use @kbd{M-x report-emacs-bug} to report it. -@node GNU Free Documentation License, Concept Index, Bugs, Top +@node GNU Free Documentation License @appendix GNU Free Documentation License @include doclicense.texi -@node Concept Index, Command Index, GNU Free Documentation License, Top +@node Concept Index @unnumbered Concept Index @printindex cp -@node Command Index, Key Index, Concept Index, Top +@node Command Index @unnumbered Function Index @printindex fn -@node Key Index, Variable Index, Command Index, Top +@node Key Index @unnumbered Key Index @printindex ky -@node Variable Index, , Key Index, Top +@node Variable Index @unnumbered Variable Index @printindex vr ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.