poe

Уређивач .po фајлова
git clone https://git.sr.ht/~strahinja/poe
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

poe.h (5420B)


      1 /* This program is licensed under the terms of GNU GPL v3 or (at your option)
      2  * any later version. Copyright (C) 2021-2026  Страхиња Радић.
      3  * See the file LICENSE for exact copyright and license details. */
      4 
      5 static int cancel_callback(struct DrawState* state, struct tb_event* ev);
      6 static int cancel_close(struct DrawState* state);
      7 static int cancel_msgstr(struct DrawState* state);
      8 static int cancel_search(struct DrawState* state);
      9 static int copy_msgid_to_input(struct DrawState* state);
     10 int cp(const char* from, const char* to);
     11 static char* dirname(char* dir, char* path, const ssize_t dir_size);
     12 static int edit_page_down(struct DrawState* state);
     13 static int edit_page_down_callback(struct DrawState* state, struct tb_event* ev);
     14 static int edit_page_up(struct DrawState* state);
     15 static int edit_page_up_callback(struct DrawState* state, struct tb_event* ev);
     16 static int erase_backwards(struct DrawState* state);
     17 static int erase_forward(struct DrawState* state);
     18 static int erase_prev_word(struct DrawState* state);
     19 static int erase_search_backwards(struct DrawState* state);
     20 static int erase_search_forward(struct DrawState* state);
     21 static int erase_search_prev_word(struct DrawState* state);
     22 static int erase_search_to_end(struct DrawState* state);
     23 static int erase_search_to_start(struct DrawState* state);
     24 static int erase_to_end(struct DrawState* state);
     25 static int erase_to_start(struct DrawState* state);
     26 static int exit_program(struct DrawState* state);
     27 static void goto_msgid(struct DrawState* state, const ssize_t msgid_number);
     28 static void handle_key_event(struct tb_event* ev, struct DrawState* state);
     29 static int hide_search(struct DrawState* state);
     30 static int insert_char(struct DrawState* state, uint32_t ch);
     31 static int insert_line(struct DrawState* state);
     32 static int insert_search_char(struct DrawState* state, uint32_t ch);
     33 static int insert_search_space(struct DrawState* state);
     34 static int insert_search_tab(struct DrawState* state);
     35 static int insert_space(struct DrawState* state);
     36 static int insert_tab(struct DrawState* state);
     37 static int join_lines(struct DrawState* state);
     38 static int load_info(struct DrawState* state);
     39 static int load_info_comments(struct DrawState* state,
     40 	struct BufferLine** lines);
     41 static int load_info_extr_comments(struct DrawState* state,
     42 	struct BufferLine** lines);
     43 static int load_info_msgid(struct DrawState* state, struct BufferLine** lines);
     44 static int load_info_msgid_plural(struct DrawState* state,
     45 	struct BufferLine** lines);
     46 static int load_info_ref_comments(struct DrawState* state,
     47 	struct BufferLine** lines);
     48 static int load_msgstr(struct DrawState* state);
     49 static int move_down(struct DrawState* state);
     50 static int move_end(struct DrawState* state);
     51 static int move_left(struct DrawState* state);
     52 static int move_list_down(struct DrawState* state);
     53 static int move_list_end(struct DrawState* state);
     54 static int move_list_page_down(struct DrawState* state);
     55 static int move_list_page_up(struct DrawState* state);
     56 static int move_list_start(struct DrawState* state);
     57 static int move_list_up(struct DrawState* state);
     58 static int move_next_word(struct DrawState* state);
     59 static int move_prev_word(struct DrawState* state);
     60 static int move_right(struct DrawState* state);
     61 static int move_search_end(struct DrawState* state);
     62 static int move_search_left(struct DrawState* state);
     63 static int move_search_next_word(struct DrawState* state);
     64 static int move_search_prev_word(struct DrawState* state);
     65 static int move_search_right(struct DrawState* state);
     66 static int move_search_start(struct DrawState* state);
     67 static int move_start(struct DrawState* state);
     68 static int move_up(struct DrawState* state);
     69 static int next_fuzzy(struct DrawState* state);
     70 static int next_fuzzy_callback(struct DrawState* state, struct tb_event* ev);
     71 static int next_match(struct DrawState* state);
     72 static int next_plural(struct DrawState* state);
     73 static int next_plural_callback(struct DrawState* state, struct tb_event* ev);
     74 static int next_untranslated(struct DrawState* state);
     75 static int next_untranslated_callback(struct DrawState* state,
     76 	struct tb_event* ev);
     77 static size_t next_msgid(struct DrawState* state, const int delta);
     78 static int overwrite_copy_msgid_callback(struct DrawState* state,
     79 	struct tb_event* ev);
     80 static int overwrite_paste_callback(struct DrawState* state,
     81 	struct tb_event* ev);
     82 static int paste_paste_buffer_to_input(struct DrawState* state);
     83 static void position_to(struct DrawState* state, const int row,
     84 	const int column);
     85 static int prev_match(struct DrawState* state);
     86 static size_t prev_msgid(struct DrawState* state, const int delta);
     87 static int prev_plural(struct DrawState* state);
     88 static int prev_plural_callback(struct DrawState* state, struct tb_event* ev);
     89 int print_error(const int code, const char* msg, ...);
     90 static int quit_callback(struct DrawState* state, struct tb_event* ev);
     91 int redraw_status(struct DrawState* state);
     92 static int save_msgstr(struct DrawState* state);
     93 static int search_position_to(struct DrawState* state, const int column);
     94 static int show_edit(struct DrawState* state);
     95 static int show_help(struct DrawState* state);
     96 static int show_search(struct DrawState* state);
     97 static int toggle_fuzzy(struct DrawState* state);
     98 static int toggle_info_focused(struct DrawState* state);
     99 static int yank_input_to_paste_buffer(struct DrawState* state);
    100 static int write_file(struct DrawState* state);