Skip to content

Conversation

masatake
Copy link
Member

@masatake masatake commented Dec 26, 2020

  • propagate internal errors to caller

  • LT_VERSION 1:0:0

    • extend the API for the error propagation

      • add tagsGetErrno function
      • add tagErrno eum type
    • break the API

      • rename sortType to tagSortType for avoiding name conflictions
        However, sortType is still defined as a macro.
        See readtags.h

Close #11.

Allowing to pass NULL makes the internal of readTagLineRaw complicated.

Signed-off-by: Masatake YAMATO <[email protected]>
DONE: growString,  copyName
TODO: readTagLineRaw

Signed-off-by: Masatake YAMATO <[email protected]>
DONE: readTagLineRaw, readTagLineFull
TODO: readPseudoTags, readTagLine
…eudoTags

DONE: parseExtensionFields, parseTagLine
TODO: readPseudoTags, readNext, find, findNextFull

Signed-off-by: Masatake YAMATO <[email protected]>
DONE: duplicate
TODO: readPseudoTags, find

Signed-off-by: Masatake YAMATO <[email protected]>
…ct even when tagsOpen returns NULL

Signed-off-by: Masatake YAMATO <[email protected]>
TEST NEEDED

WARNING: With this change, a negative value can be stored to
tagFileInfo::status.error_number.

tagErrno data type is introduced to represent the brokenness.
The value of the type is stored to tagFileInfo::status.error_number.

Signed-off-by: Masatake YAMATO <[email protected]>
The current API doesn't have a way to propagate
an error to application.

In the future, we will introduce tagsGetErrno() function that
an application can use for getting the reason of failure.

This change is preparation for implementing tagsGetErrno().

Signed-off-by: Masatake YAMATO <[email protected]>
DONE: gotoFirstLogicalTag
TODO: tagsFirst
Signed-off-by: Masatake YAMATO <[email protected]>
Introduce TagErrnoInvalidArgument.

DONE: readNext(), tagsFirst(), tagsNext()
TODO: findNextFull()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: findSequentialFull(), findSequential()
TODO: findNextFull()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: findNextFull(), findNext()
TODO: findPseudoTag(), tagsFindNext()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: findPseudoTag(), tagsNextPseudoTag(), tagsFirstPseudoTag()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: tagsFindNext()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: tagsSetSortType()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: readTagLineSeek()
TODO: findBinary(), findFirstNonMatchBefore()
Signed-off-by: Masatake YAMATO <[email protected]>
…ore() to their callers

DONE: findFirstNonMatchBefore(), findFirstMatchBefore()
TODO: findBinary()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: findBinary(), find()
TODO: tagsFind()
Signed-off-by: Masatake YAMATO <[email protected]>
DONE: readTagLine

Signed-off-by: Masatake YAMATO <[email protected]>
DONE: tagsFind()
Signed-off-by: Masatake YAMATO <[email protected]>
Signed-off-by: Masatake YAMATO <[email protected]>
The type name 'sortType' has no library specific prefix.
This can make hard to use libreadtags in an application because
of a type name cofliction.

To avoid the potential name confliction, this change renames
"sortType" to "tagSortType".

To keep application code using the name sortType work, "sortType"
is defined as a macro that can be used an alternative name to
"tagSortType".

The "sortType" macro is not defined if an application code defines
TAG_NO_COMPAT_SORT_TYPE.

Signed-off-by: Masatake YAMATO <[email protected]>
Signed-off-by: Masatake YAMATO <[email protected]>
Signed-off-by: Masatake YAMATO <[email protected]>
@masatake masatake merged commit 6925e6f into universal-ctags:master Dec 27, 2020
@masatake masatake deleted the propagate-errors branch December 27, 2020 09:20
masatake added a commit to masatake/libreadtags that referenced this pull request Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add README
1 participant