Commit Graph

38 Commits

Author SHA1 Message Date
Andrew Borodin 6718b3ec26 Indentation using GNU indent-2.2.13.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-06-02 12:49:13 +03:00
Andrew Borodin 7af11660f8 Clean up irrelevant comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:01:47 +03:00
Andrew Borodin fe42478b97 Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-01 09:46:17 +03:00
Andrew Borodin 54ec89d950 (unlock_file): eliminate goto, reduce variable scopes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin fded68057e (lock_extract_info): refactor loops.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin 66e79e97dd lib/lock.c: use sizeof() for buffer size. 2023-08-04 21:04:55 +03:00
Andrew Borodin 1e4d27e437 (lock_build_name): fix coding style. 2023-08-04 21:04:55 +03:00
Andrew Borodin 7257f794d2 Update template for .c files.
Add section for forward declarations of local functions. This section is
located before file scope variables because functions can be used in
strucutres (see find.c for example):

/*** forward declarations (file scope functions) *************************************************/

/* button callbacks */
static int start_stop (WButton * button, int action);
static int find_do_view_file (WButton * button, int action);
static int find_do_edit_file (WButton * button, int action);

/*** file scope variables ************************************************************************/

static struct
{
    ...
    bcback_fn callback;
} fbuts[] =
{
    ...
    { B_STOP, NORMAL_BUTTON, N_("S&uspend"), 0, 0, NULL, start_stop },
    ...
    { B_VIEW, NORMAL_BUTTON, N_("&View - F3"), 0, 0, NULL, find_do_view_file },
    { B_VIEW, NORMAL_BUTTON, N_("&Edit - F4"), 0, 0, NULL, find_do_edit_file }
};

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin 57c61b7681 Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-01-28 21:38:05 +03:00
Andrew Borodin 2c205c5928 Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:26 +03:00
Andrew Borodin 9ee52e77c3 Ticket #4179: code clean up before 4.8.27 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin 31b37a1f79 Ticket #4050: code cleanup before 4.8.25 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-29 19:10:17 +03:00
Andrew Borodin 1dd8a47987 Ticket #3955: code cleanup before 4.8.23 release.
Update copyright years.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Andrew Borodin ddd645526a Update copyright years. 2018-02-04 11:30:22 +03:00
Andrew Borodin e9fd11bfcd Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Yury V. Zaytsev a8f512c12c Remove unneeded `struct` keyword for typedef'd structs
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-04 09:23:38 +03:00
Andrew Borodin 471ea781ca Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andrew Borodin 646b662eb0 (lock_get_info): type accuracies and related changes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:07 +03:00
Andrew Borodin 2789e6e390 Ticket #3431: add missing default cases.
Introduce -Wswitch-default check.

Some minor cosmetics.

Thanks Andreas Mohr <and at gmx dot li> for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:50 +03:00
Andrew Borodin 454479549c Update copyright years. 2015-02-26 09:12:08 +03:00
Andrew Borodin e7252b6603 (lock_extract_info): fix out-of-bound writes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin e5203cb023 Fix name of FSF in all *.c files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin f0da49345a Collapse list of copyright years to ranges. Add 2014 year.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Andrew Borodin 2940b7455d Fix of DOXYGEN docs: @return instead of @returns
...and other minor corrections.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin dbdc471553 g_dirname and g_basename function are deprecated since glib-2.2.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:10 +03:00
Slava Zanko 8451286bb5 Ticket #2695: Fixed segfault while new file created in editor.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-08 10:33:22 +03:00
Slava Zanko 4047403077 Fixed creation of lock files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:32 +03:00
Slava Zanko 12a9390524 Changed lock_file() and unlock_file() functions
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko 0138645541 Ticket 1551: Update GPL version from 2 to 3
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Slava Zanko 8ea49095c3 Changed functions vfs_file_is_local() and vfs_file_class_flags() for handle vfs_path_t type
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko 6c5f5bf768 VFS structure changes:
* moved from lib/vfs/mc-vfs to lib/vfs;
  * split by directories for VFS-plugins and moved to src/vfs;
  * lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:48:26 +02:00
Andrew Borodin 71364f88c3 Split lib/widget/widget.[ch] and lib/widget/wtools.[ch] files
...into small: one widget in one file.
Renamed most if WInput functions.
Minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Slava Zanko 8b018db98f Some WIDGET-related stuff moved to lib/widget directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:30 +03:00
Slava Zanko c57566af00 Avoid compiler warnings.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Slava Zanko feb733663f Code indentation in lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Andrew Borodin 8f54b9b0b5 lib/lock.c: applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 13:54:39 +03:00
Andrew Borodin 533567c1a7 Expand tilde while locking and unlocking files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 13:54:39 +03:00
Andrew Borodin b2ee413f03 Allow use file locking in various components of MC.
Renamed and moved src/editor/editloc.[ch] -> lib/lock.[ch].
Renamed lock handling functions.
Fixed library order in src/Makefile.am.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:22 +04:00