aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-28 02:31:40 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-28 02:31:40 -0300
commit582cbc6cf67919ec189098817ab1e4541c8e761d (patch)
treedd045a9d6ba2a2a59ef161774988f0aedcc5c0cb /src/main.c
parent5205db347cb9f56187c2ad5e767281a7a4016533 (diff)
downloadblogc-582cbc6cf67919ec189098817ab1e4541c8e761d.tar.gz
blogc-582cbc6cf67919ec189098817ab1e4541c8e761d.tar.bz2
blogc-582cbc6cf67919ec189098817ab1e4541c8e761d.zip
implemented datetime parsing/formatting
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 0680728..c112c4f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -147,10 +147,12 @@ main(int argc, char **argv)
goto cleanup;
}
for (unsigned int j = 0; pieces[0][j] != '\0'; j++) {
- if (!(pieces[0][j] >= 'A' && pieces[0][j] <= 'Z')) {
+ if (!((pieces[0][j] >= 'A' && pieces[0][j] <= 'Z') ||
+ pieces[0][j] == '_'))
+ {
fprintf(stderr, "blogc: error: invalid value "
- "for -D (configuration key must be uppercase): "
- "%s\n", pieces[0]);
+ "for -D (configuration key must be uppercase "
+ "with '_'): %s\n", pieces[0]);
b_strv_free(pieces);
rv = 2;
goto cleanup;