Merge branch 'stable-2.0'
authorMark H Weaver <mhw@netris.org>
Tue, 21 Jan 2014 08:57:04 +0000 (03:57 -0500)
committerMark H Weaver <mhw@netris.org>
Tue, 21 Jan 2014 08:57:04 +0000 (03:57 -0500)
Conflicts:
libguile/read.c
test-suite/tests/web-response.test

1  2 
doc/ref/api-macros.texi
doc/ref/srfi-modules.texi
libguile/r6rs-ports.c
libguile/read.c
module/ice-9/boot-9.scm
test-suite/tests/r6rs-ports.test
test-suite/tests/syntax.test
test-suite/tests/web-response.test

Simple merge
Simple merge
Simple merge
diff --cc libguile/read.c
@@@ -2022,20 -2046,20 +2022,29 @@@ scm_get_hash_procedure (int c
      }
  }
  
- #define SCM_ENCODING_SEARCH_SIZE (500)
 +static int
 +is_encoding_char (char c)
 +{
 +  if (c >= 'a' && c <= 'z') return 1;
 +  if (c >= 'A' && c <= 'Z') return 1;
 +  if (c >= '0' && c <= '9') return 1;
 +  return strchr ("_-.:/,+=()", c) != NULL;
 +}
 +
- /* Search the first few hundred characters of a file for an Emacs-like coding
-    declaration.  Returns either NULL or a string whose storage has been
-    allocated with `scm_gc_malloc ()'.  */
+ /* Maximum size of an encoding name.  This is a bit more than the
+    longest name listed at
+    <http://www.iana.org/assignments/character-sets> ("ISO-2022-JP-2", 13
+    characters.)  */
+ #define ENCODING_NAME_MAX_SIZE 20
+ /* Number of bytes at the beginning or end of a file that are scanned
+    for a "coding:" declaration.  */
+ #define SCM_ENCODING_SEARCH_SIZE (500 + ENCODING_NAME_MAX_SIZE)
+ /* Search the SCM_ENCODING_SEARCH_SIZE bytes of a file for an Emacs-like
+    coding declaration.  Returns either NULL or a string whose storage
+    has been allocated with `scm_gc_malloc'.  */
  char *
  scm_i_scan_for_encoding (SCM port)
  {
Simple merge
Simple merge
Simple merge
@@@ -1,6 -1,6 +1,6 @@@
  ;;;; web-response.test --- HTTP responses       -*- mode: scheme; coding: utf-8; -*-
  ;;;;
- ;;;;   Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
 -;;;;   Copyright (C) 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
++;;;;   Copyright (C) 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
  ;;;;
  ;;;; This library is free software; you can redistribute it and/or
  ;;;; modify it under the terms of the GNU Lesser General Public