Displaying 3 results from an estimated 3 matches for "last_chars".
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Propagate EXP_QPAT in subevalvar
Commit-ID: 6fdcdeda572daa647e508fa3bbf972a8c5f73e02
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=6fdcdeda572daa647e508fa3bbf972a8c5f73e02
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Fri, 23 Aug 2013 20:04:12 +1000
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000
[klibc] [EXPAND] Propagate
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Propagate EXP_QPAT in subevalvar
Commit-ID: a4e6b2aab296a5adc38372b157a854eb82054020
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=a4e6b2aab296a5adc38372b157a854eb82054020
Author: Herbert Xu <herbert at gondor.apana.org.au>
AuthorDate: Fri, 23 Aug 2013 20:04:12 +1000
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000
[klibc] dash: [EXPAND]
2016 Sep 30
2
[PATCH] customize: Add --append-line.
...+ if String.find content "\r\n" >= 0 then "\r\n"
+ else if String.find content "\n" >= 0 then "\n"
+ else default_newline () in
+
+ let line = line ^ newline in
+
+ (* Do we need to append a newline to the existing file? *)
+ let last_chars =
+ let len = String.length newline in
+ if size <= 0L then newline (* empty file ends in virtual newline *)
+ else if size >= Int64.of_int len then
+ g#pread path len (size -^ Int64.of_int len)
+ else
+ g#pread path len 0L in
+ let line =
+ if last_c...