diff --git a/R/unrtf.R b/R/unrtf.R index eae82ca..06cc618 100644 --- a/R/unrtf.R +++ b/R/unrtf.R @@ -8,7 +8,7 @@ #' @param format output format, must be "text", "html" or "latex" #' @param verbose print some output to stderr #' @examples library(unrtf) -#' text <- unrtf("http://www-igm.univ-mlv.fr/~mac/ENS/01-projets/XMLV/pelleas/exemples/Sample.rtf") +#' text <- unrtf("https://jeroen.github.io/files/sample.rtf") #' cat(text) unrtf <- function(file = NULL, format = c("html", "text", "latex"), verbose = FALSE){ format <- match.arg(format) diff --git a/README.md b/README.md index fb92c50..f451fa0 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ file path or a URL to a word document: ```r library(unrtf) -text <- unrtf("http://www-igm.univ-mlv.fr/~mac/ENS/01-projets/XMLV/pelleas/exemples/Sample.rtf") +text <- unrtf("https://jeroen.github.io/files/sample.rtf", format = "text") +html <- unrtf("https://jeroen.github.io/files/sample.rtf", format = "html") cat(text) ``` diff --git a/man/unrtf.Rd b/man/unrtf.Rd index 7848e62..0f351dc 100644 --- a/man/unrtf.Rd +++ b/man/unrtf.Rd @@ -19,6 +19,6 @@ because unrtf has limited support for converting between character encodings. } \examples{ library(unrtf) -text <- unrtf("http://www-igm.univ-mlv.fr/~mac/ENS/01-projets/XMLV/pelleas/exemples/Sample.rtf") +text <- unrtf("https://jeroen.github.io/files/sample.rtf") cat(text) } diff --git a/src/libunrtf/output.c b/src/libunrtf/output.c index 3786dd0..d8381ca 100644 --- a/src/libunrtf/output.c +++ b/src/libunrtf/output.c @@ -66,7 +66,7 @@ uint32_t ntohl(uint32_t const net); #else uint32_t ntohl(uint32_t const net) { - uint8_t data[4] = {}; + uint8_t data[4] = {0}; memcpy(&data, &net, sizeof(data)); return ((uint32_t) data[3] << 0)