[PATCH] Add the STDX_FILENO constants for file descriptors

10 views
Skip to first unread message

grob

unread,
Mar 7, 2023, 4:35:18 AM3/7/23
to vim...@vim.org
This patch adds a few missing constants to the c syntax file

---
runtime/syntax/c.vim | 1 +
1 file changed, 1 insertion(+)

diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 50878a78e..be5da154d 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -349,6 +349,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2
syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX
+ syn keyword cConstant STDIN_FILENO STDOUT_FILENO STDERR_FILENO
" used in assert.h
syn keyword cConstant NDEBUG
" POSIX 2001
--
2.30.2

Bram Moolenaar

unread,
Mar 7, 2023, 10:40:06 AM3/7/23
to vim...@googlegroups.com, grob
I can include that. I wonder what standard that is part of. I
don't think it is a C standard, looks like it's part of Unix/Linux.

--
hundred-and-one symptoms of being an internet addict:
237. You tattoo your email address on your forehead.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

grob

unread,
Mar 8, 2023, 2:38:11 PM3/8/23
to vim...@googlegroups.com
It looks like POSIX requires it to be defined on unistd.h!
https://pubs.opengroup.org/onlinepubs/007904975/

Reply all
Reply to author
Forward
0 new messages