Peter,
Thanks for the speedy patch. It fixed the problem!
There might be another problem. The following code once compiled, but doesn't now.
*** code snippet ***
module bug interface;
export bug = (StrPCopy);
const LONGEST_STRING = 256;
type Any_String = String(LONGEST_STRING); CString = __cstring__;
function StrPCopy (Dest : CString; Src : Any_String) : CString;
end.
module bug implementation;
{ function StrPCopy : CString; } { Doesn't compile, either } function StrPCopy (Dest : CString; Src : Any_String) : CString; var c : integer; p : CString; begin p := Dest; for c:=1 to length(Src) do begin p^ := Src[c]; inc(word(p)); end; p^ := chr(0); StrPCopy := Dest; end;
end.
*** code snippet ***
Thanks again for your help.
Tom
On Mon, 10 Nov 1997, Peter Gerwinski wrote:
I fixed it. :-) Patch below.
Since this patch changes the GPI file format, you must recompile all your modules/units after having applied it.
~>
8< ---------------------------------------------------------------------------
--- gpc-971106/p/module.c Sat Nov 1 03:30:22 1997 +++ gpc/p/module.c Sun Nov 9 21:02:24 1997 @@ -1186,7 +1186,7 @@ store_tree (DECL_NAME (t), s, depth + 1); /* name of function */ store_tree (DECL_ASSEMBLER_NAME (t), s, depth + 1); store_tree (TREE_TYPE (TREE_TYPE (t)), s, depth + 1); /* return type */
store_tree (TYPE_ARG_TYPES (TREE_TYPE (t)), s, depth + 1); /* argument types */
store_tree (DECL_LANG_SPECIFIC (t)->parms, s, depth + 1); /* arguments */ /* Machine attributes. */ for (a = TYPE_ATTRIBUTES (TREE_TYPE (t)); a; a = TREE_CHAIN (a))
@@ -1765,8 +1765,8 @@ * they already were prediscriminated before they were * written into the GPI file. */
tree name = get_unique_identifier ("parm", 0);
d = build_tree_list (NULL_TREE, TREE_VALUE (a));
tree name = DECL_NAME (a);
d = build_tree_list (NULL_TREE, TREE_TYPE (a)); d = build_tree_list (build_tree_list (d, name), build_tree_list (NULL_TREE, NULL_TREE)); push_parm_decl (d);
Thomas S. Dye, Ph.D. Home: 813 16th Avenue, Honolulu, Hawaii 96816. Voice (808) 734-2087. Work: International Archaeological Research Institute, Inc., 949 McCully St., Suite 5, Honolulu, Hawaii 96826. Voice (808) 946-2548; Fax 943-0716.