From 2b4e22c3e4b28b08a0869b3a771ba54f0c615331 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Fri, 11 Jun 2021 12:27:59 -0400 Subject: Remove -t truncate flag It can't actually be used correctly: two updates in quick succession can truncate the output before it is read, causing files to be missed. --- archive.c | 12 ++---------- bubger.1 | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/archive.c b/archive.c index 3c5f12b..575bc56 100644 --- a/archive.c +++ b/archive.c @@ -82,7 +82,6 @@ static void createDirs(void) { int main(int argc, char *argv[]) { int exitStatus = 0; - bool truncate = false; const char *host = NULL; const char *port = "imaps"; @@ -96,7 +95,7 @@ int main(int argc, char *argv[]) { for ( int opt; - 0 < (opt = getopt(argc, argv, "A:C:H:S:T:a:h:im:p:qs:tu:vw:y:")); + 0 < (opt = getopt(argc, argv, "A:C:H:S:T:a:h:im:p:qs:u:vw:y:")); ) { switch (opt) { break; case 'A': concatIndexEntries = strtoul(optarg, NULL, 10); @@ -114,7 +113,6 @@ int main(int argc, char *argv[]) { break; case 'p': port = optarg; break; case 'q': quiet = true; exitStatus = EXIT_FAILURE; break; case 's': baseSubscribe = optarg; - break; case 't': truncate = true; break; case 'u': baseURL = optarg; break; case 'v': imapVerbose = true; break; case 'w': passPath = optarg; @@ -181,13 +179,7 @@ int main(int argc, char *argv[]) { for (; resp = respOk(imapResp(&imap)), resp.tag != login; respFree(resp)); respFree(resp); -examine: - if (truncate) { - int error = ftruncate(STDOUT_FILENO, 0); - if (error) warn("ftruncate"); - rewind(stdout); - } - +examine:; uint32_t uidNext = 0; uint32_t uidValidity = 0; enum Atom examine = atom("examine"); diff --git a/bubger.1 b/bubger.1 index 6f0c4d7..a456c19 100644 --- a/bubger.1 +++ b/bubger.1 @@ -1,4 +1,4 @@ -.Dd June 9, 2021 +.Dd June 11, 2021 .Dt BUBGER 1 .Os . @@ -8,7 +8,7 @@ . .Sh SYNOPSIS .Nm -.Op Fl iqtv +.Op Fl iqv .Op Fl A Ar entries .Op Fl C Ar path .Op Fl H Ar head @@ -122,14 +122,6 @@ link of .Ar url to the index page navigation. . -.It Fl t -Attempt to truncate standard output -before writing the list of updated files. -With -.Fl i , -truncate before each time -files are updated. -. .It Fl u Ar base Set the base URL for links in Atom feeds. . -- cgit 1.4.1 Commit message (Expand)Author 2019-10-10Add The Book of PhoenixJune McEnroe 2019-10-03Add two Kim Petras songsJune McEnroe 2019-10-02Update neovim 0.4.2June McEnroe 2019-10-02Claim to be curl(1) in titleJune McEnroe 2019-10-02Add The Red Threads of FortuneJune McEnroe 2019-09-28Add The Black Tides of HeavenJune McEnroe 2019-09-27Fail on HTTP failure status in titleJune McEnroe 2019-09-23Add Trail of LightningJune McEnroe 2019-09-22Revert "Enable cookies in title"June McEnroe 2019-09-20Enable cookies in titleJune McEnroe 2019-09-16Use sensitivity aliases in TF2June McEnroe 2019-09-16Add The Just CityJune McEnroe 2019-09-12Only GET the final redirect locationJune McEnroe 2019-09-12Consume entire bodyJune McEnroe 2019-09-10Add title -v flagJune McEnroe 2019-09-10Use curl error bufferJune McEnroe 2019-09-10Set Accept-Encoding in titleJune McEnroe 2019-09-08Set title User-AgentJune McEnroe 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe