libclamav / clamav.h documentation updated both to clean up existing documentation and to add new documentation.

pull/51/head
Micah Snyder (micasnyd) 7 years ago committed by Micah Snyder
parent 83bc694ced
commit 7e7663abf6
  1. 8
      NEWS.md
  2. 5
      examples/ex1.c
  3. 1224
      libclamav/clamav.h

@ -20,6 +20,14 @@ we've cooked up over the past 6 months.
before, although our `libclamunrar_iface` supporting library has changed from
LGPL to the BSD 3-Clause license.
- Libclamav API changes:
- The following scanning functions now require a filename argument.
This will enable ClamAV to report more details warning and error
information in the future, and will also allow for more sensible temp
file names. The filename argument may be `NULL` if a filename is not
available.
- `cl_scandesc`
- `cl_scandesc_callback`
- `cl_scanmap_callback`
- Scanning options have been converted from a single flag bit-field into
a structure of multiple categorized flag bit-fields. This change enabled
us to add new scanning options requested by the community. In addition,

@ -44,6 +44,7 @@ int main(int argc, char **argv)
unsigned int sigs = 0;
long double mb;
const char *virname;
const char *filename;
struct cl_engine *engine;
struct cl_scan_options options;
@ -52,6 +53,8 @@ int main(int argc, char **argv)
return 2;
}
filename = argv[1];
if((fd = open(argv[1], O_RDONLY)) == -1) {
printf("Can't open file %s\n", argv[1]);
return 2;
@ -90,7 +93,7 @@ int main(int argc, char **argv)
options.parse |= ~0; /* enable all parsers */
options.general |= CL_SCAN_GENERAL_HEURISTICS; /* enable heuristic alert options */
if((ret = cl_scandesc(fd, &virname, &size, engine, &options)) == CL_VIRUS) {
if((ret = cl_scandesc(fd, filename, &virname, &size, engine, &options)) == CL_VIRUS) {
printf("Virus detected: %s\n", virname);
} else {
if(ret == CL_CLEAN) {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save