// save this as txt.c than set C highlighting. // C 11 keywords auto goto break if case inline // sice this is c11 feature and is colored than rest of c11should be colored too char int const long unsigned continue register void default restrict volatile do return while double short _Alignas else signed _Alignof enum sizeof _Atomic extern static _Bool float struct _Complex for switch _Generic typedef _Imaginary union _Noreturn _Static_assert _Thread_local // Now posix // this is Hard choice but if I had chance to at least choose I would go within off_t socklen_t time_t pid_t FILE //ofc it would be super cool if all woould be added. I have listed them here: sig_atomic_t // The <stdio.h> header shall define the following data types through typedef: FILE // A structure containing information about a file. fpos_t // A non-array type containing all information needed to specify uniquely every position within a file. off_t //As described in <sys/types.h>. size_t //As described in <stddef.h>. ssize_t //[CX] [Option Start] As described in <sys/types.h>. [Option End] va_list //[CX] [Option Start] As described in <stdarg.h>. [Option End] // The <sys/types.h> header shall define at least the following types: blkcnt_t // Used for file block counts. blksize_t // Used for block sizes. clock_t // Used for system times in clock ticks or CLOCKS_PER_SEC; see <time.h>. clockid_t // Used for clock ID type in the clock and timer functions. dev_t // Used for device IDs. fsblkcnt_t // Used for file system block counts. fsfilcnt_t // Used for file system file counts. gid_t // Used for group IDs. id_t // Used as a general identifier; can be used to contain at least a pid_t, uid_t, or gid_t. ino_t // Used for file serial numbers. key_t // [XSI] [Option Start] Used for XSI interprocess communication. [Option End] mode_t // Used for some file attributes. nlink_t // Used for link counts. off_t // Used for file sizes. pid_t // Used for process IDs and process group IDs. pthread_attr_t // Used to identify a thread attribute object. pthread_barrier_t // Used to identify a barrier. pthread_barrierattr_t // Used to define a barrier attributes object. pthread_cond_t // Used for condition variables. pthread_condattr_t // Used to identify a condition attribute object. pthread_key_t // Used for thread-specific data keys. pthread_mutex_t // Used for mutexes. pthread_mutexattr_t // Used to identify a mutex attribute object. pthread_once_t // Used for dynamic package initialization. pthread_rwlock_t // Used for read-write locks. pthread_rwlockattr_t // Used for read-write lock attributes. pthread_spinlock_t // Used to identify a spin lock. pthread_t // Used to identify a thread. size_t // Used for sizes of objects. ssize_t // Used for a count of bytes or an error indication. suseconds_t // [XSI] [Option Start] Used for time in microseconds. [Option End] time_t // Used for time in seconds. timer_t // Used for timer ID returned by timer_create(). trace_attr_t // [OB TRC] [Option Start] Used to identify a trace stream attributes object [Option End] trace_event_id_t // [OB TRC] [Option Start] Used to identify a trace event type. [Option End] trace_event_set_t // [OB TEF] [Option Start] Used to identify a trace event type set. [Option End] trace_id_t // [OB TRC] [Option Start] Used to identify a trace stream. [Option End] uid_t // Used for user IDs. // there is also from signals. sigset_t // from etworking socklen_t Reproducible: Always Steps to Reproduce: 1.copy the details t txt.c 2.set highlighting for C 3. look what is highlighted ignore the comments ( soe are taken from source files) Actual Results: do not see some of keywords/types to be highlighted. Expected Results: I could *set it by my self ;/* I took data from C11 iso standart (keywords) and from posix *manual*. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf http://pubs.opengroup.org/onlinepubs/9699919799/
@Sven: Do you think you could look into this? You know this stuff :-)
I think the reporter is right, what we have is kinda inconsistent and it doesn't harm to add a few more keywords. I can add the rest, if that is what you want to happen?
Git commit c40ad3513f910a41f1dec2c825c9a79aac270f27 by Sven Brauch. Committed on 24/07/2017 at 12:56. Pushed by brauch into branch 'master'. add missing standard types to C highlighting and update to C11 Differential Revision: https://phabricator.kde.org/D6870 M +19 -4 data/syntax/c.xml M +5 -1 data/syntax/isocpp.xml https://commits.kde.org/syntax-highlighting/c40ad3513f910a41f1dec2c825c9a79aac270f27