in Coldmud discussion meeting
Adding an option to toliteral() for decomp to obj numbers
daemon@ATHENA.MIT.EDU (Tue Jul 11 21:41:48 2000
Date: Tue, 11 Jul 2000 18:36:23 -0700 (PDT)
From: Jeremy Weatherford <firstname.lastname@example.org>
The ColdC function toliteral() currently calls data_to_literal with the
DF_WITH_OBJNAMES flag set, so that objnums are looked up to objnames
whereever possible. I'd like to be able to pass an option to toliteral()
that passes DF_NO_OPTS to data_to_literal instead, always returning
objnums as is.
I need this functionality for an in-game textdump routine, btw. I've
implemented it in my own code in a quick-and-dirty manner. I don't
understand the Genesis hardcode well enough to implement in correctly yet.
Below is my version of COLDC_FUNC(toliteral) in src/ops/data.c, though.
str = data_to_literal(&args, (argc == 2) ? FALSE : TRUE);