Naming Convention
A fairly big amount of functions and variable are using the “snake_case” format, although you may find some classes that use the “CamelFormat”.
We strongly recommend to stick to the “snake_case” format to ease the reading of the code flow. Switching from one to the other is difficult and requires extra brain power.
Functions associated with a concept or a module and be prefixed with the
name of the concept. For example, all Bacula Virtual FileSystem (bvfs)
functions are prefixed with bvfs_.
Function and variable names must be readable, in general it is a bad idea to use striped down version of a function or a variable. In general you will find the following variables, functions or label in the code:
ret- int/bool return code for a functionbuf- bufferbail_out- cleanup label for a functioned1, ed2, ed3- temporary buffer used to convert integers (50c long)len- length of a buffersrc- sourcedest- destinationargc- argument countargk- argument key (key=val)argv- argument value (key=val)ua- User Agent objectbvfs- Bacula Virtual File Systemlmgr- Lock ManagerDCR- Device Control Resourcectx- Context
Possible Next Steps
Go to Locks and Threads.
Go back to Developer Notes.
Go back to Developer Guide.