Introduction
Introduction Statistics Contact Development Disclaimer Help
code style - sob - simple output bar
git clone git://git.codemadness.org/sob
Log
Files
Refs
README
LICENSE
---
commit 13970fc40d3282194523858158507d5592123512
parent 9de4bb2f6a8ec555ef56e447e6e7eec995f57873
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 2 Oct 2014 01:31:43 +0000
code style
Diffstat:
M config.def.h | 4 ++--
M sob.c | 18 +++++++++---------
2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/config.def.h b/config.def.h
@@ -7,13 +7,13 @@ static const char *resizecmd = "tmux resize-pane -y 4…
static void
line_yank(void)
{
- line_pipeto((char**)yankcmd);
+ line_pipeto((char**)yankcmd);
}
static void
history_menu(void)
{
- line_pipeto((char**)historycmd);
+ line_pipeto((char**)historycmd);
}
static void
diff --git a/sob.c b/sob.c
@@ -55,10 +55,10 @@ static int line_pipeto(char **cmd);
static void line_redraw(size_t max);
static void line_set(const char *s);
static void line_wordpipeto(char **cmd);
-static int pipereadline(int fd_in, int fd_out, char *writestr, char *outbuf,
- size_t outbufsiz);
-static int pipecmd(char *cmd[], char *writestr, char *outbuf,
- size_t outbufsiz);
+static int pipe_readline(int fd_in, int fd_out, char *writestr,
+ char *outbuf, size_t outbufsiz);
+static int pipe_cmd(char *cmd[], char *writestr, char *outbuf,
+ size_t outbufsiz);
static void sighandler(int signum);
static void setup(void);
static void cleanup(void);
@@ -322,7 +322,7 @@ line_copywordcursor(char *buf, size_t bufsiz)
}
static int
-pipereadline(int fd_in, int fd_out, char *writestr, char *outbuf,
+pipe_readline(int fd_in, int fd_out, char *writestr, char *outbuf,
size_t outbufsiz)
{
char buf[PIPE_BUF], *p;
@@ -382,7 +382,7 @@ fini:
}
static int
-pipecmd(char *cmd[], char *writestr, char *outbuf, size_t outbufsiz)
+pipe_cmd(char *cmd[], char *writestr, char *outbuf, size_t outbufsiz)
{
struct sigaction sa;
pid_t pid;
@@ -423,7 +423,7 @@ pipecmd(char *cmd[], char *writestr, char *outbuf, size_t o…
sa.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &sa, NULL);
- if(pipereadline(cp[0], pc[1], writestr, outbuf, outbufsiz) == …
+ if(pipe_readline(cp[0], pc[1], writestr, outbuf, outbufsiz) ==…
return -1;
}
return 0;
@@ -434,7 +434,7 @@ line_pipeto(char **cmd)
{
size_t oldlen = line.len;
- if(pipecmd(cmd, line.line, line.line, sizeof(line.line)) == -1)
+ if(pipe_cmd(cmd, line.line, line.line, sizeof(line.line)) == -1)
return -1;
line.len = strlen(line.line);
line_redraw(MAX(line.len, oldlen));
@@ -452,7 +452,7 @@ line_wordpipeto(char **cmd)
wordbuf[0] = '\0';
line_copywordcursor(wordbuf, sizeof(wordbuf));
- if(pipecmd((char**)cmd, wordbuf, outbuf,
+ if(pipe_cmd((char**)cmd, wordbuf, outbuf,
sizeof(outbuf)) == -1)
return;
if(outbuf[0] == '\0')
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.