[wiki] [sites] [tools][sic] new patch lineprint || clamiax

From: <git_AT_suckless.org>
Date: Fri, 09 Oct 2015 18:58:21 +0200

commit 4a3c83815c6e54ffb79e169bffdba0a4345a7050
Author: clamiax <smoppy_AT_gmail.com>
Date: Fri Oct 9 18:58:19 2015 +0200

    [tools][sic] new patch lineprint

diff --git a/tools.suckless.org/sic/patches/lineprint.md b/tools.suckless.org/sic/patches/lineprint.md
new file mode 100644
index 0000000..607b7a0
--- /dev/null
+++ b/tools.suckless.org/sic/patches/lineprint.md
_AT_@ -0,0 +1,24 @@
+Print the current inserting line
+================================
+This patch allow to store and reprint the current inserting line. This is done
+by appending a suffix character to the input. The line is (obviously) not sent.
+
+In a nutshell:
+
+ :ni\
+ :nick baz\
+ :nick bazqux
+ clamiax : 2015-10-09 18:15 >< NICK (): bazqux
+
+This is useful, for example, when receiving data from the server in the middle
+of a sentence you're writing.
+
+Note: the patch also changes the config.def.h file.
+
+Download
+--------
+* [sic-1.3-lineprint.diff](sic-1.3-lineprint.diff) (1,3K) (20151009)
+
+Author
+------
+* Claudio Alessi <[smoppy_AT_gmail.com](mailto:smoppy_AT_gmail.com)>
diff --git a/tools.suckless.org/sic/patches/sic-1.3-lineprint.diff b/tools.suckless.org/sic/patches/sic-1.3-lineprint.diff
new file mode 100644
index 0000000..8dc2cf8
--- /dev/null
+++ b/tools.suckless.org/sic/patches/sic-1.3-lineprint.diff
_AT_@ -0,0 +1,53 @@
+diff --git a/config.def.h b/config.def.h
+index 6d720e9..a1308e6 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -12,3 +12,6 @@
+
+ /* Parting message used when none is specified with ":l ..." command. */
+ #define DEFAULT_PARTING_MESSAGE "sic - 250 LOC are too much!"
++
++/* Suffix character used to print the current inserting command */
++#define LINEPRINT_SUFFIX_CHAR '\'
+diff --git a/sic.c b/sic.c
+index 8a0301b..6401414 100644
+--- a/sic.c
++++ b/sic.c
+_AT_@ -18,6 +18,7 @@ static char *password;
+ static char nick[32];
+ static char bufin[4096];
+ static char bufout[4096];
++static char bufln[4096];
+ static char channel[256];
+ static time_t trespond;
+ static FILE *srv;
+_AT_@ -60,11 +61,29 @@ privmsg(char *channel, char *msg) {
+
+ static void
+ parsein(char *s) {
++ int i, off;
+ char c, *p;
+
+ if(s[0] == '
Received on Fri Oct 09 2015 - 18:58:21 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 09 2015 - 19:00:13 CEST