Skip to content

Commit

Permalink
Docs@attributes and values should be in ascii encoding (#59)
Browse files Browse the repository at this point in the history
* docs: attributes and values should be in ASCII encoding
see #58

* removed accidently added file
  • Loading branch information
aviezerl committed Jan 5, 2022
1 parent c36ddf8 commit fbe7065
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions R/track.R
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ emr_track.attr.rm <- function(track = NULL, attr = NULL) {
#' This function creates a track attribute and assigns 'value' to it. If the
#' attribute already exists its value is overwritten.
#'
#' Note that both attributes and values sould be in ASCII encoding.
#'
#' @param track track name
#' @param attr attribute name
#' @param value value
Expand Down
2 changes: 2 additions & 0 deletions man/emr_track.attr.set.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/EMRTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ EMRTrack::TrackAttrs EMRTrack::load_attrs(const char *, const char *filename)
} else {
if (idx) {
if (name.empty() || val.empty())
TGLError<EMRTrack>(BAD_FORMAT, "Invalid format of attributes file %s", filename);
TGLError<EMRTrack>(BAD_FORMAT, "Invalid format of attributes file %s (1)", filename);

if (attrs.find(name) != attrs.end()) // duplicated attributes
TGLError<EMRTrack>(BAD_FORMAT, "Invalid format of attributes file %s", filename);
TGLError<EMRTrack>(BAD_FORMAT, "Invalid format of attributes file %s (2)", filename);

attrs[name] = val;
name.clear();
Expand All @@ -210,7 +210,7 @@ EMRTrack::TrackAttrs EMRTrack::load_attrs(const char *, const char *filename)
TGLError<EMRTrack>(FILE_ERROR, "Failed to read attributes file %s: %s", filename, strerror(errno));

if (idx)
TGLError<EMRTrack>(BAD_FORMAT, "Invalid format of attributes file %s", filename);
TGLError<EMRTrack>(BAD_FORMAT, "Invalid format of attributes file %s (3)", filename);
return attrs;
}

Expand Down

0 comments on commit fbe7065

Please sign in to comment.