diff options
| author | Quentin Carbonneaux | 2014-09-02 12:15:34 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-09-02 12:15:34 -0400 |
| commit | 4f96c5796d900534831249ff54aaf5f38b799303 (patch) | |
| tree | 6698ec298dde895ae5a6471d52ee593e5625550d | |
| parent | 46f7bf9ee38212d481754d0c7d8d2c6d36ed1c09 (diff) | |
specify a mode for files created by Put
| -rw-r--r-- | exec.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -18,6 +18,7 @@ #include "exec.h" #include "evnt.h" +extern W *curwin; void die(char *); typedef struct ecmd ECmd; @@ -50,7 +51,6 @@ static ECmd etab[] = { int ex_run(unsigned p0) { - extern W *curwin; unsigned p1; ECmd *e; @@ -154,7 +154,7 @@ ex_put(EBuf *eb, char *file) return 1; } } - fd = open(file, O_TRUNC|O_WRONLY|O_CREAT); + fd = open(file, O_TRUNC|O_WRONLY|O_CREAT, 0644); if (fd == -1) { errstr = "cannot open file"; return 1; @@ -320,8 +320,6 @@ look(W *w, EBuf *eb, unsigned p0) static int new(W *w, EBuf *eb, unsigned pos) { - extern W *curwin; - (void)eb; (void)pos; w = win_new(eb_new()); if (w) |
