Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up path processing #319

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ff9a53d
Use explicit types for some integer constants
mfwitten Oct 1, 2018
d085572
lib/cmdline.c: Fix error message
mfwitten Oct 15, 2018
63bc4be
Miscellaneous improvements
mfwitten Oct 15, 2018
a3e9d5c
lib/cfg.*: Clean up `rm_cfg_free_paths()'
mfwitten Oct 3, 2018
93541fc
lib/cfg.*: `rm_cfg_add_path()' now returns `bool'
mfwitten Sep 29, 2018
9c51e9d
lib/cmdline.c: return the status of `rm_cfg_add_path()'
mfwitten Sep 30, 2018
f8629f1
lib/cfg.*: Refactor `rm_cfg_add_path()'
mfwitten Oct 1, 2018
3539636
lib/cfg.*: Refactor `rm_cfg_add_path()'
mfwitten Oct 1, 2018
fb1ba2d
lib/cmdline.c: Move `rm_cmd_read_paths_from_stdin()'
mfwitten Oct 4, 2018
ee9b9a0
lib/cmdline.c: Simplify size in call to `malloc()'
mfwitten Oct 16, 2018
f8cea9f
lib/cmdline.c: Replace `RmSession' with `RmCfg' in `rm_cmd_set_paths*()'
mfwitten Sep 29, 2018
25db8f6
lib/cmdline.c: Abstract out struct `rm_cmd_set_paths_vars'
mfwitten Oct 16, 2018
1e81e41
lib/cmdline.c: Add error handling to `rm_cmd_set_paths_from_stdin()'
mfwitten Oct 15, 2018
fb31ce0
lib/cfg.h: Remove member `read_stdin'
mfwitten Sep 29, 2018
d4f7805
lib/cmdline.c: Consolidate the logic around whether to read paths fro…
mfwitten Sep 29, 2018
13304f7
lib/cmdline.c: Move constant loop condition (`paths') out of the loop
mfwitten Oct 3, 2018
a9f4de0
lib/cmdline.c: Indent code to reflect the fact that it's in a block
mfwitten Oct 3, 2018
05191ee
lib/cmdline.c: Use a pointer rather than an index integer for looping
mfwitten Oct 3, 2018
4f14e8a
lib/cmdline.c: Free each command-line path as it is processed.
mfwitten Oct 3, 2018
5dafe3a
lib/cfg-funcs.h: Move `cfg->replay' and `cfg->path_count++'
mfwitten Oct 4, 2018
a5698fd
lib/path.h: s/idx/index/ in `RmPath'
mfwitten Oct 14, 2018
322d7cc
lib/cmdline.c: Move `cfg->replay' and `cfg->path_count++' out of loops
mfwitten Oct 4, 2018
67e0738
lib/path.h: s/treat_as_single_vol/single_volume/ in `RmPath'
mfwitten Oct 14, 2018
e39fa29
lib/cfg.h: Use `RmCfg::path_count' more purposefully
mfwitten Oct 15, 2018
2f72e34
lib/cfg.c: git mv lib/cfg.c lib/cfg-funcs.h
mfwitten Oct 4, 2018
eb09ea9
lib/cfg.*: Rename `rm_cfg_add_path' to `rm_cfg_prepend_path()'
mfwitten Oct 3, 2018
bc825f3
lib/cmdline.c: Abstract out `rm_cmd_set_paths_from_cmdline()'
mfwitten Oct 4, 2018
74daf3b
lib/cfg-funcs.h: Complete `git mv lib/cfg.c lib/cfg-funcs.h'
mfwitten Oct 4, 2018
6dcbfde
lib/cfg.*: rm_cfg_prepend_path(): swap parameters `preferred' and `path'
mfwitten Oct 3, 2018
4182c59
lib/cmdline.c: Replace `strcmp()' with direct character comparisons
mfwitten Oct 7, 2018
605b5a9
lib/cfg.c -> lib/cfg-funcs.h: Make functions inlinable
mfwitten Oct 4, 2018
a4e4b88
lib/cmdline.c: Tell compiler to optimize for the value of `replay'
mfwitten Oct 4, 2018
30e7156
lib/cfg-funcs.h: Insert `g_assert(cfg);' into `rm_cfg_set_default()'
mfwitten Oct 15, 2018
2c24f77
lib/cmdline.c: INLINE `rm_cmd_set_paths()'
mfwitten Oct 16, 2018
3b1098c
lib/cfg.c -> lib/cfg-funcs.h: Refactor functions
mfwitten Oct 6, 2018
c0ba1b5
lib/cmdline.c: Refactor `rm_cmd_set_paths*()'
mfwitten Oct 6, 2018
0d332c9
Merge 'develop' into 'mfwitten/0007/prepend-paths'
mfwitten Jan 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static RmOff rm_cmd_size_string_to_bytes(const char *size_spec, GError **error)
g_set_error(error, RM_ERROR_QUARK, 0, _("This does not look like a number"));
return 0;
} else if(decimal < 0) {
g_set_error(error, RM_ERROR_QUARK, 0, _("Negativ sizes are no good idea"));
g_set_error(error, RM_ERROR_QUARK, 0, _("A size must be non-negative"));
mfwitten marked this conversation as resolved.
Show resolved Hide resolved
return 0;
} else if(*format) {
format = g_strstrip(format);
Expand Down
2 changes: 1 addition & 1 deletion po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ msgid "This does not look like a number"
msgstr "Das schaut nicht wie eine Zahl aus"

#: lib/cmdline.c
msgid "Negativ sizes are no good idea"
msgid "A size must be non-negative"
msgstr "Negative Größen sind keine gute Idee"

#: lib/cmdline.c
Expand Down
2 changes: 1 addition & 1 deletion po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ msgid "This does not look like a number"
msgstr "Estto no parece un número"

#: lib/cmdline.c
msgid "Negativ sizes are no good idea"
msgid "A size must be non-negative"
msgstr "Tamaños negativos no son una buena idea"

#: lib/cmdline.c
Expand Down
2 changes: 1 addition & 1 deletion po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ msgid "This does not look like a number"
msgstr "Cela ne semble pas correspondre à un chiffre"

#: lib/cmdline.c
msgid "Negativ sizes are no good idea"
msgid "A size must be non-negative"
msgstr "Une taille négative n'est pas une bonne idée"

#: lib/cmdline.c
Expand Down
2 changes: 1 addition & 1 deletion po/rmlint.pot
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ msgid "This does not look like a number"
msgstr ""

#: lib/cmdline.c
msgid "Negativ sizes are no good idea"
msgid "A size must be non-negative"
msgstr ""

#: lib/cmdline.c
Expand Down