FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/id.c
/* Parse the NUL-terminated ID part at DATA and write the result into *PART.
 * Return TRUE if no errors were detected. */
Parse the NUL-terminated ID part at DATA and write the result into *PART.
Return TRUE if no errors were detected.
Parse the NUL - terminated ID part at DATA and write the result into * PART . Return TRUE if no errors were detected .
static svn_boolean_t
part_parse(svn_fs_fs__id_part_t *part,
           const char *data)
{
  const char *end;
  if (data[0] == '_')
    {
      part->revision = SVN_INVALID_REVNUM;
      part->number = svn__base36toui64(&data, data + 1);
      return *data == '\0';
    }
  if (data[0] == '0' && data[1] == '\0')
    {
      part->revision = 0;
      part->number = 0;
      return TRUE;
    }
  part->number = svn__base36toui64(&data, data);
  if (data[0] != '-')
    {
      part->revision = 0;
      return *data == '\0';
    }
  return locale_independent_strtol(&part->revision, data+1, &end);
}
static svn_boolean_t part_parse ( svn_fs_fs__id_part_t * part , const char * data ) { const char * end ; if ( data [ 0 ] == ' ' ) { part -> revision = SVN_INVALID_REVNUM ; part -> number = svn__base36toui64 ( & data , data + 1 ) ; return * data == ' \0 ' ; } if ( data [ 0 ] == ' ' && data [ 1 ] == ' \0 ' ) { part -> revision = 0 ; part -> number = 0 ; return TRUE ; } part -> number = svn__base36toui64 ( & data , data ) ; if ( data [ 0 ] != ' ' ) { part -> revision = 0 ; return * data == ' \0 ' ; } return locale_independent_strtol ( & part -> revision , data + 1 , & end ) ; }
Parse the NUL-terminated ID part at DATA and write the result into *PART.
Parse the NUL - terminated ID part at DATA and write the result into * PART .
/* special case: ID inside some transaction */ /* special case: 0 / default ID */ /* read old style / new style ID */