Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate errors and release version 0.1.0 #28

Merged
merged 47 commits into from
Dec 27, 2020

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.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Allowing to pass NULL makes the internal of readTagLineRaw complicated.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: growString,  copyName
TODO: readTagLineRaw

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: readTagLineRaw, readTagLineFull
TODO: readPseudoTags, readTagLine
…eudoTags

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

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: duplicate
TODO: readPseudoTags, find

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…ct even when tagsOpen returns NULL

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
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 <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
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 <yamato@redhat.com>
DONE: gotoFirstLogicalTag
TODO: tagsFirst
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Introduce TagErrnoInvalidArgument.

DONE: readNext(), tagsFirst(), tagsNext()
TODO: findNextFull()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: findSequentialFull(), findSequential()
TODO: findNextFull()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: findNextFull(), findNext()
TODO: findPseudoTag(), tagsFindNext()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: findPseudoTag(), tagsNextPseudoTag(), tagsFirstPseudoTag()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: tagsFindNext()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: tagsSetSortType()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: readTagLineSeek()
TODO: findBinary(), findFirstNonMatchBefore()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…ore() to their callers

DONE: findFirstNonMatchBefore(), findFirstMatchBefore()
TODO: findBinary()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: findBinary(), find()
TODO: tagsFind()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: readTagLine

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
DONE: tagsFind()
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…ode simple

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…turn TagFailure

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
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 <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…d tagsNextPseudoTag

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Close universal-ctags#11.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@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
Close universal-ctags#28.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
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