/[autoconf]/autoconf/lib/m4sugar/m4sugar.m4
ViewVC logotype

Diff of /autoconf/lib/m4sugar/m4sugar.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.62 by akim, Mon Mar 4 15:05:13 2002 UTC revision 2.63 by akim, Tue Mar 19 07:42:06 2002 UTC
# Line 2  divert(-1)# Line 2  divert(-1)#
2  # This file is part of Autoconf.  # This file is part of Autoconf.
3  # Base M4 layer.  # Base M4 layer.
4  # Requires GNU M4.  # Requires GNU M4.
5  # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.  # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6  #  #
7  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
8  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 426  m4_define([m4_bmatch], Line 426  m4_define([m4_bmatch],
426         [$3])])         [$3])])
427    
428    
429    # m4_map(MACRO, LIST)
430    # -------------------
431    # Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements
432    # of LIST (which can be lists themselves, for multiple arguments MACROs).
433    m4_define([m4_fst], [$1])
434    m4_define([m4_map],
435    [m4_if([$2], [[]], [],
436           [$1(m4_fst($2))[]dnl
437    m4_map([$1], m4_cdr($2))])])
438    
439    
440  ## ---------------------------------------- ##  ## ---------------------------------------- ##
441  ## 6. Enhanced version of some primitives.  ##  ## 6. Enhanced version of some primitives.  ##
# Line 466  m4_define([m4_do], Line 476  m4_define([m4_do],
476         [$1[]m4_do(m4_shift($@))])])         [$1[]m4_do(m4_shift($@))])])
477    
478    
479    # m4_define_default(MACRO, VALUE)
480    # -------------------------------
481    # If MACRO is undefined, set it to VALUE.
482    m4_define([m4_define_default],
483    [m4_ifndef([$1], [m4_define($@)])])
484    
485    
486  # m4_default(EXP1, EXP2)  # m4_default(EXP1, EXP2)
487  # ----------------------  # ----------------------
488  # Returns EXP1 if non empty, otherwise EXP2.  # Returns EXP1 if non empty, otherwise EXP2.
# Line 532  m4_builtin([popdef], $@)]) Line 549  m4_builtin([popdef], $@)])
549  m4_define([m4_quote],  [[$*]])  m4_define([m4_quote],  [[$*]])
550  m4_define([m4_dquote],  [[$@]])  m4_define([m4_dquote],  [[$@]])
551    
552    
553  # m4_noquote(STRING)  # m4_noquote(STRING)
554  # ------------------  # ------------------
555  # Return the result of ignoring all quotes in STRING and invoking the  # Return the result of ignoring all quotes in STRING and invoking the

Legend:
Removed from v.2.62  
changed lines
  Added in v.2.63

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26