| 1 |
" vlc specific stuff |
|---|
| 2 |
au Syntax c call VlcSyntax() |
|---|
| 3 |
au Syntax cpp call VlcSyntax() |
|---|
| 4 |
|
|---|
| 5 |
function VlcSyntax() |
|---|
| 6 |
" Look for a VideoLAN copyright in the first 15 lines |
|---|
| 7 |
let line=1 |
|---|
| 8 |
let vlc=0 |
|---|
| 9 |
while(line<=15) |
|---|
| 10 |
if match(getline(line), ".*Copyright.*VideoLAN.*") > -1 |
|---|
| 11 |
let vlc=1 |
|---|
| 12 |
break |
|---|
| 13 |
endif |
|---|
| 14 |
let line=line+1 |
|---|
| 15 |
endwhile |
|---|
| 16 |
if vlc==0 |
|---|
| 17 |
return |
|---|
| 18 |
endif |
|---|
| 19 |
" true/false |
|---|
| 20 |
syn keyword cConstant VLC_TRUE VLC_FALSE |
|---|
| 21 |
" return values |
|---|
| 22 |
syn keyword cConstant VLC_SUCCESS VLC_EGENERIC VLC_ENOMEM VLC_ETHREAD |
|---|
| 23 |
syn keyword cConstant VLC_ESTATUS VLC_EEXIT VLC_EMODULE VLC_EOBJECT |
|---|
| 24 |
syn keyword cConstant VLC_ENOOBJ VLC_ENOMOD VLC_VAR_ADDRESS |
|---|
| 25 |
" custom types |
|---|
| 26 |
syn keyword cType vlc_fixed_t mtime_t byte_t dctelem_t count_t ssize_t off_t |
|---|
| 27 |
syn keyword cType vlc_bool_t vlc_fourcc_t vlc_value_t |
|---|
| 28 |
" Core custom structures |
|---|
| 29 |
syn keyword cType vlc_t libvlc_t vlc_object_t vlc_error_t vlc_status_t |
|---|
| 30 |
syn keyword cType variable_t date_t |
|---|
| 31 |
syn keyword cType vlc_thread_t vlc_cond_t vlc_mutex_t vlc_list_t |
|---|
| 32 |
" Objects, modules, configurations |
|---|
| 33 |
syn keyword cType module_bank_t module_t module_config_t module_symbols_t |
|---|
| 34 |
syn keyword cType module_cache_t config_category_t |
|---|
| 35 |
" Playlist |
|---|
| 36 |
syn keyword cType playlist_t playlist_item_t playlist_view_t |
|---|
| 37 |
syn keyword cType services_discovery_t services_discovery_sys_t |
|---|
| 38 |
syn keyword cType playlist_add_t playlist_preparse_t |
|---|
| 39 |
syn keyword cType item_info_t item_info_category_t |
|---|
| 40 |
syn keyword cType sout_format_t playlist_export_t playlist_import_t |
|---|
| 41 |
" Intf |
|---|
| 42 |
syn keyword cType intf_thread_t intf_sys_t intf_console_t intf_msg_t |
|---|
| 43 |
syn keyword cType interaction_t interaction_dialog_t user_widget_t |
|---|
| 44 |
syn keyword cType msg_bank_t msg_subscription_t |
|---|
| 45 |
" Input |
|---|
| 46 |
syn keyword cType input_thread_t input_thread_sys_t input_item_t |
|---|
| 47 |
syn keyword cType access_t access_sys_t stream_t stream_sys_t |
|---|
| 48 |
syn keyword cType demux_t demux_sys_t es_out_t es_out_id_t |
|---|
| 49 |
syn keyword cType es_out_sys_t es_descriptor_t |
|---|
| 50 |
syn keyword cType seekpoint_t info_t info_category_t |
|---|
| 51 |
" Formats |
|---|
| 52 |
syn keyword cType audio_format_t video_format_t subs_format_t |
|---|
| 53 |
syn keyword cType es_format_t video_palette_t |
|---|
| 54 |
" Aout |
|---|
| 55 |
syn keyword cType aout_instance_t aout_sys_t |
|---|
| 56 |
syn keyword cType aout_fifo_t aout_input_t aout_buffer_t audio_sample_format_t |
|---|
| 57 |
syn keyword cType aout_mixer_sys_t aout_filter_sys_t audio_volume_t |
|---|
| 58 |
syn keyword cType aout_mixer_t aout_output_t audio_date_t |
|---|
| 59 |
syn keyword cType aout_filter_t |
|---|
| 60 |
" Vout |
|---|
| 61 |
syn keyword cType vout_thread_t vout_sys_t vout_synchro_t |
|---|
| 62 |
syn keyword cType chroma_sys_t picture_t picture_sys_t picture_heap_t |
|---|
| 63 |
syn keyword cType video_frame_format_t |
|---|
| 64 |
" SPU |
|---|
| 65 |
syn keyword cType spu_t subpicture_t subpicture_sys_t |
|---|
| 66 |
syn keyword cType subpicture_region_t text_style_t |
|---|
| 67 |
" Images |
|---|
| 68 |
syn keyword cType image_handler_t |
|---|
| 69 |
" Sout |
|---|
| 70 |
syn keyword cType sout_instance_t sout_instance_sys_t sout_cfg_t |
|---|
| 71 |
syn keyword cType sout_input_t sout_packetizer_input_t |
|---|
| 72 |
syn keyword cType sout_access_out_t sout_access_out_sys_t |
|---|
| 73 |
syn keyword cType sout_mux_t sout_mux_sys_t |
|---|
| 74 |
syn keyword cType sout_stream_t sout_stream_sys_t |
|---|
| 75 |
" Sout - announce |
|---|
| 76 |
syn keyword cType announce_handler_t announce_method_t session_descriptor_t |
|---|
| 77 |
syn keyword cType sap_address_t sap_handler_t sap_session_t |
|---|
| 78 |
" Decoders |
|---|
| 79 |
syn keyword cType decoder_t decoder_sys_t encoder_t encoder_sys_t |
|---|
| 80 |
" Filters |
|---|
| 81 |
syn keyword cType filter_t filter_sys_t |
|---|
| 82 |
" Blocks |
|---|
| 83 |
syn keyword cType block_t block_fifo_t |
|---|
| 84 |
" Network |
|---|
| 85 |
syn keyword cType network_socket_t vlc_acl_t |
|---|
| 86 |
" HTTPD |
|---|
| 87 |
syn keyword cType httpd_t httpd_host_t httpd_url_t httpd_client_t |
|---|
| 88 |
syn keyword cType httpd_callback_sys_t httpd_message_t httpd_callback_t |
|---|
| 89 |
syn keyword cType httpd_file_t httpd_file_sys_t httpd_file_callback_t |
|---|
| 90 |
syn keyword cType httpd_handler_t httpd_handler_sys_t |
|---|
| 91 |
syn keyword cType httpd_handler_callback_t |
|---|
| 92 |
syn keyword cType httpd_redirect_t httpd_stream_t |
|---|
| 93 |
" TLS |
|---|
| 94 |
syn keyword cType tls_t tls_server_t tls_session_t |
|---|
| 95 |
" XML |
|---|
| 96 |
syn keyword cType xml_t xml_sys_t xml_reader_t xml_reader_sys_t |
|---|
| 97 |
" VoD |
|---|
| 98 |
syn keyword cType vod_t vod_sys_t vod_media_t |
|---|
| 99 |
" OSD |
|---|
| 100 |
syn keyword cType osd_menu_t osd_state_t osd_event_t osd_button_t |
|---|
| 101 |
syn keyword cType osd_menu_state_t |
|---|
| 102 |
" OpenGL |
|---|
| 103 |
syn keyword cType opengl_t opengl_sys_t |
|---|
| 104 |
" VLM |
|---|
| 105 |
syn keyword cType vlm_t vlm_message_t vlm_media_t vlm_schedule_t |
|---|
| 106 |
" Misc |
|---|
| 107 |
syn keyword cType md5_t vlc_meta_t vlc_callback_t iso639_lang_t |
|---|
| 108 |
|
|---|
| 109 |
" misc macros |
|---|
| 110 |
syn keyword cOperator VLC_OBJECT VLC_EXPORT VLC_COMMON_MEMBERS |
|---|
| 111 |
" don't use these any more, please |
|---|
| 112 |
syn keyword cError u8 s8 u16 s16 u32 s32 u64 s64 |
|---|
| 113 |
" don't put trailing spaces! DON'T USE TABS!!! |
|---|
| 114 |
syn match cSpaceError display excludenl "\s\+$" |
|---|
| 115 |
syn match cSpaceError display "\t" |
|---|
| 116 |
|
|---|
| 117 |
" Todo |
|---|
| 118 |
syn keyword cTodo contained TODO FIXME XXX \todo \bug |
|---|
| 119 |
endfun |
|---|
| 120 |
|
|---|