Only in cgi.modern: META
diff -r -c cgi/Makefile cgi.modern/Makefile
*** cgi/Makefile	Tue Oct 12 17:05:21 1999
--- cgi.modern/Makefile	Wed Jan 26 15:06:32 2000
***************
*** 8,15 ****
  OCAMLLIB  = `ocamlc -v | tail -1 | cut -f 4 -d " "`
  TARGETDIR = $(OCAMLLIB)
  
! CAMLC   = ocamlc -g
! CAMLOPT = ocamlopt
  CAMLDEP = ocamldep
  
  ###################################################################
--- 8,15 ----
  OCAMLLIB  = `ocamlc -v | tail -1 | cut -f 4 -d " "`
  TARGETDIR = $(OCAMLLIB)
  
! CAMLC   = ocamlc -modern -g
! CAMLOPT = ocamlopt -modern
  CAMLDEP = ocamldep
  
  ###################################################################
***************
*** 34,54 ****
  BYTEFILES = $(MLI) $(CMI) cgi.cmo
  OPTFILES  = $(MLI) $(CMI) cgi.cmx cgi.o
  
! install: install-byte install-opt
! 
! install-byte:
! 	@make DEST=$(TARGETDIR) copy-byte
! 
! install-opt:
! 	@make DEST=$(TARGETDIR) copy-opt
! 
! copy-byte:
! 	@echo "Installing in "$(DEST)
! 	cp $(BYTEFILES) $(DEST)
! 
! copy-opt:
! 	@echo "Installing in "$(DEST)
! 	cp $(OPTFILES) $(DEST)
  
  MAJORVN=0
  MINORVN=31
--- 34,41 ----
  BYTEFILES = $(MLI) $(CMI) cgi.cmo
  OPTFILES  = $(MLI) $(CMI) cgi.cmx cgi.o
  
! install:
! 	ocamlfind install cgi cgi.cmi cgi.mli cgi.cma cgi.cmxa META
  
  MAJORVN=0
  MINORVN=31
Only in cgi.modern: cgi.a
Only in cgi.modern: cgi.cma
Only in cgi.modern: cgi.cmxa
diff -r -c cgi/cgi.ml cgi.modern/cgi.ml
*** cgi/cgi.ml	Tue Oct 12 17:05:21 1999
--- cgi.modern/cgi.ml	Wed Jan 26 13:26:07 2000
***************
*** 67,82 ****
      if String.length s > 0 then
        if s.[0] == ' ' then
          strip_heading_and_trailing_spaces
!           (String.sub s 1 (String.length s - 1))
        else if s.[String.length s - 1] == ' ' then
          strip_heading_and_trailing_spaces
!           (String.sub s 0 (String.length s - 1))
        else s
      else s
    in
    if need_decode 0 then
      let len = compute_len 0 0 in
!     let s1 = String.create len in
      strip_heading_and_trailing_spaces (copy_decode_in s1 0 0)
    else s
  ;;
--- 67,82 ----
      if String.length s > 0 then
        if s.[0] == ' ' then
          strip_heading_and_trailing_spaces
!           (String.sub pos: 1 len: (String.length s - 1) s)
        else if s.[String.length s - 1] == ' ' then
          strip_heading_and_trailing_spaces
!           (String.sub pos: 0 len: (String.length s - 1) s)
        else s
      else s
    in
    if need_decode 0 then
      let len = compute_len 0 0 in
!     let s1 = String.create len: len in
      strip_heading_and_trailing_spaces (copy_decode_in s1 0 0)
    else s
  ;;
***************
*** 124,130 ****
      else s1
    in
    if need_code 0 then
!     let len = compute_len 0 0 in copy_code_in (String.create len) 0 0
    else s
  ;;
  
--- 124,130 ----
      else s1
    in
    if need_code 0 then
!     let len = compute_len 0 0 in copy_code_in (String.create len: len) 0 0
    else s
  ;;
  
***************
*** 138,148 ****
    let rec loop pos =
      if pos < len then
        try
!        	let last = String.index_from text pos separator in
!  	let str = String.sub text pos (last-pos) in
  	  str::(loop (succ last))
        with Not_found ->
!  	if pos < len then [String.sub text pos (len-pos)]
   	else []
      else []
    in
--- 138,148 ----
    let rec loop pos =
      if pos < len then
        try
!        	let last = String.index_from :pos char: separator text in
!  	let str = String.sub :pos len: (last-pos) text in
  	  str::(loop (succ last))
        with Not_found ->
!  	if pos < len then [String.sub :pos len: (len-pos) text]
   	else []
      else []
    in
***************
*** 161,180 ****
        safe_getenv "QUERY_STRING"
      else
        let n = int_of_string (safe_getenv "CONTENT_LENGTH") in
!       let buf = String.create n in
!       really_input stdin buf 0 n;
        buf
    in
    let assocs = split '&' s in
    let one_assoc s =
      try
!       let i = String.index s '=' in
!       String.sub s 0 i, 
!       decode (String.sub s (succ i) (String.length s - i - 1))
      with
  	Not_found -> s,""
    in
!   List.map one_assoc assocs
  
  
  (* content-type *)
--- 161,180 ----
        safe_getenv "QUERY_STRING"
      else
        let n = int_of_string (safe_getenv "CONTENT_LENGTH") in
!       let buf = String.create len: n in
!       really_input stdin :buf pos: 0 len: n;
        buf
    in
    let assocs = split '&' s in
    let one_assoc s =
      try
!       let i = String.index s char: '=' in
!       String.sub pos: 0 len: i s, 
!       decode (String.sub pos: (succ i) len: (String.length s - i - 1) s)
      with
  	Not_found -> s,""
    in
!   List.map fun: one_assoc assocs
  
  
  (* content-type *)

