Warn to stderr when discarding CPP modifier for outlink (#608)

* warn to stderr when un-setting inapplicable CPP flag on output links

* Warn and unset CP flag for output links

* use errlogprintf instead of fprintf for dbParseLink CP/CPP warning

* Pass source record name to dbParseLink for debug information when modifier is discarded

* make CP/CPP discard warning less verbose

* Include field name of affected record when warning of CP/CPP discard
This commit is contained in:
Evan Daykin
2025-10-08 10:44:27 -04:00
committed by GitHub
parent d00ce1bc0a
commit acd1aef2a0
4 changed files with 26 additions and 10 deletions
@@ -74,7 +74,7 @@ long dbInitRecordLinks(dbRecordType *rtyp, struct dbCommon *prec);
/* Parse link string. no record locks needed.
* on success caller must free pinfo->target
*/
DBCORE_API long dbParseLink(const char *str, short ftype, dbLinkInfo *pinfo);
DBCORE_API long dbParseLink(const char *str, short ftype, dbLinkInfo *pinfo, const char *recordname, const char *fieldname);
/* Check if link type allow the parsed link value pinfo
* to be assigned to the given link.
* Record containing plink must be locked.