Commit Graph

90 Commits

Author SHA1 Message Date
Michael Davidsaver 3d70e70640 Add dbPvt2Rec() cast
Reverse of dbRec2Pvt()

pacify -D_FORTIFY_SOURCE=3 and __builtin_object_size() as
"&precord->common" does not know than common as actually
the prefix of a variable sized struct.
2024-08-21 10:01:26 -05:00
Michael Davidsaver f9e53dded6 show buffered line along with DB parse error 2024-08-21 09:53:38 -05:00
Hinko Kocevar 8e62ea4965 handle deletion of the non-existant record with field 2024-08-21 09:48:23 -05:00
Hinko Kocevar 50b6a3801a check if precordType is null in dbGetRecordTypeName() 2024-08-21 09:48:23 -05:00
Michael Davidsaver fd072e4429 add more information to record(# warning 2024-08-21 09:48:23 -05:00
Hinko Kocevar 3a5c9ab0cd add a warning if deleting a non-existent record 2024-08-21 09:48:23 -05:00
Hinko Kocevar bb5423171d remove warning and error messages, fix duplicate flag setting 2024-08-21 09:48:23 -05:00
Hinko Kocevar 4e4e55ca89 invoke dbFreeLinkContents() to clean up link related allocations 2024-08-21 09:48:23 -05:00
Hinko Kocevar e9748881cd make codacy happy 2024-08-21 09:48:23 -05:00
Hinko Kocevar 39b0301062 plug memory leak resulting from record deletion 2024-08-21 09:48:23 -05:00
Hinko Kocevar 535c9c2a06 Allow deleting a record at database creation.
Using a magical record type "#" will allow the user to
delete previously created record  from the database.
2024-08-21 09:48:23 -05:00
Andrew Johnson 918a188285 Define USE_TYPED_DRVET, use drvet * instead of struct drvet * 2024-08-07 09:54:16 -05:00
Andrew Johnson 2f730b8e9f Add arg's to function pointer typedefs and prototypes 2024-08-07 09:54:16 -05:00
Andrew Johnson f287cfa2ac Introduce & use FASTCONVERTFUNC with full prototype 2024-08-07 09:54:16 -05:00
Andrew Johnson 172bfce1f3 Merge 'Release 7.0.8.1' branch into 7.0 2024-06-27 21:07:50 -05:00
Andrew Johnson d0d15ee911 Replace UNRELEASED with 7.0.8.1 2024-06-26 14:59:18 -05:00
Michael Davidsaver fe4247d57d Send .db parser errors to stderr 2024-06-11 11:14:07 -07:00
Michael Davidsaver cb1571783b link.h wrong type
Change to unsigned incorrectly increased size.

e88a186fc3
2024-04-02 08:35:25 -07:00
zimoch 4383cf291e allow macros with defaults in dbLoadRecords without substitutions 2024-02-21 09:50:03 -06:00
Michael Davidsaver c75b9ad0be add dbRecordNode::order
Keep track of parse order of record instances.
2023-12-22 10:26:28 -08:00
Michael Davidsaver e88a186fc3 make link::flags bit field unsigned 2023-12-22 10:26:28 -08:00
Michael Davidsaver 511bf1ffca const-ify dbLink arrays
external code really should never be modifying pamaplinkType[]
2023-11-25 14:52:16 -08:00
Michael Davidsaver a352865df9 print ANSI escapes to stderr
unconditionally print ANSI some escapes (to colorize errors)
to the stderr stream.
2023-11-07 15:53:22 -08:00
Michael Davidsaver 63740f2edd colorize more errlog messages 2023-11-07 15:53:22 -08:00
Michael Davidsaver 95bd5453d9 dbRecordField() add "did you mean..." hint for unknown field 2023-11-01 09:52:32 -05:00
Michael Davidsaver eb3f8a004c const-ify dbCopyEntry() and dbCopyEntryContents() 2023-11-01 09:52:32 -05:00
Michael Davidsaver 92cae86ff2 dbRecordsOnceOnly allow append only with "*"
with

> record(ai, "myrec") {}

dbRecordsOnceOnly!=0 currently disallows appending fields with either form:

> record("*", "myrec") {} # error
> record(ai, "myrec") {}  # error

Change the meaning such that dbRecordsOnceOnly!=0
allways allows appending when explicitly intended (rtype "*").

> record("*", "myrec") {} # allowed
> record(ai, "myrec") {}  # error

Also clearly label this parse error.
2023-10-22 17:42:36 -07:00
AlexWells 6de82bb0fd Additional help messages for iocsh
Henrique Silva <henrique.silva@ess.eu>
2023-08-28 13:24:16 +02:00
Emilio Perez 500a57738b Validate target record name when creating an alias
This fixes issue #312 by printing an error when a field is specified
2023-07-22 08:29:09 -07:00
Michael Davidsaver d4fab0d20e iocsh: dbCompleteRecord() missing NULL check 2023-05-01 10:31:01 -07:00
Eva Lott b878295d06 Added the new annotation EPICS_PRINTF_FMT 2023-05-01 09:03:45 -07:00
Michael Davidsaver 3500a02034 iocsh: expose dbCreateAlias 2023-04-18 09:51:28 -05:00
Michael Davidsaver 52b18d56a0 dbCreateAlias fixup error handling 2023-04-18 09:51:28 -05:00
Michael Davidsaver 151256533f renamed hidden pdbbase in dbd parser
avoid confusion with non-static pdbbase global
2023-03-10 11:00:58 +00:00
Andrew Johnson bc54524270 Fix bad JSON char detection in dbStatic
Thanks to Dirk Zimoch for pointing this out.
2023-01-24 11:08:13 -06:00
Andrew Johnson b460c2659e Fix for GH issue #219, menu fields with non-choice values
It's rare, but menu fields may hold a value that does not correspond
to one of the menu choices; the default value of the SSCN fields is
the most common example (65535). Change the type conversion routines
to return a numeric string instead of giving an error.

DBF_DEVICE was fixed in dbFastLinkConv.c before the 7.0.7 release.
2022-12-20 20:12:04 -08:00
Michael Davidsaver d9ca8a70f0 Com: iocsh: Tab completion
Add tab completion for "help ...", record names, and "pdbbase"
2022-12-20 20:12:04 -08:00
Michael Davidsaver f0369058bb dbReadCOM missing newline in error 2022-09-02 08:08:27 -07:00
Michael Davidsaver e28c914966 dbDumpRecordType show field offset/size 2022-08-20 13:53:03 -07:00
Minijackson a722bb9289 treewide: add usage help to various iocsh functions 2022-06-20 08:09:42 -07:00
Michael Davidsaver 91941af992 quiet warnings 2022-03-04 10:00:12 -08:00
Michael Davidsaver d2644baf38 minor 2022-03-03 13:16:57 -08:00
Michael Davidsaver 62092d4399 test dbReadDatabaseFP() 2022-03-03 13:16:53 -08:00
Michael Davidsaver 6c5d56688d help out IDEs 2022-03-03 13:16:50 -08:00
Michael Davidsaver a6779df21c dbReadDatabaseFP() always fclose() 2022-03-03 13:16:45 -08:00
zimoch 9a09436ac8 allow hex (and octal) in hardware links
Conflicts:
	modules/database/src/ioc/dbStatic/dbStaticLib.c
2021-11-10 10:15:39 +01:00
Andrew Johnson 8e2f78caf5 dbStatic: Better error reports for bad JSON string chars 2021-09-03 14:16:37 -05:00
Michael Davidsaver e34b6c5c0c Fix spelling in comments
Should be non-functional, except for some error message strings.
2021-08-29 07:27:50 -07:00
zimoch 42d06d6a38 Fix bugs in dbRecordNameValidate() 2021-08-29 07:25:14 -07:00
Michael Davidsaver 417821ddc0 fixups for DBCORE_API 2021-04-01 11:09:53 -07:00