log.c
const char *log_version(char *major, char *minor, char *patch)
{
  if (major && minor && patch)
    {
      /* strtok modifies input string, so we need a copy of version */

      char version[11 + 1];
      strncpy(version, VERSION, 11);

      strncpy(major, strtok(version, "."), 3);
      strncpy(minor, strtok(NULL, "."), 3);
      strncpy(patch, strtok(NULL, "."), 3);
    }

  return VERSION;
}
/*****************************************************************************
 * Name: log_version
 *
 * Description:
 *   Returns version of the library
 *
 * Output Parameters:
 *   major: Major version (API changes)
 *   minor: Minor version (Added functions)
 *   patch: Patch version (bug fixes)
 *
 *   Function also returns pointer to char where full version string is stored
 ****************************************************************************/
log_version
Description:
Returns version of the library

Output Parameters:
major: Major version (API changes)
minor: Minor version (Added functions)
patch: Patch version (bug fixes)

Function also returns pointer to char where full version string is stored
log_version Description : Returns version of the library Output Parameters : major : Major version ( API changes ) minor : Minor version ( Added functions ) patch : Patch version ( bug fixes ) Function also returns pointer to char where full version string is stored
const char *log_version(char *major, char *minor, char *patch)
{
  if (major && minor && patch)
    {
      char version[11 + 1];
      strncpy(version, VERSION, 11);
      strncpy(major, strtok(version, "."), 3);
      strncpy(minor, strtok(NULL, "."), 3);
      strncpy(patch, strtok(NULL, "."), 3);
    }
  return VERSION;
}
const char * log_version ( char * major , char * minor , char * patch ) { if ( major && minor && patch ) { char version [ 11 + 1 ] ; strncpy ( version , VERSION , 11 ) ; strncpy ( major , strtok ( version , " " ) , 3 ) ; strncpy ( minor , strtok ( NULL , " " ) , 3 ) ; strncpy ( patch , strtok ( NULL , " " ) , 3 ) ; } return VERSION ; }
Name: log_version
 Description:
   Returns version of the library
Name : log_version Description : Returns version of the library
/* strtok modifies input string, so we need a copy of version */