aboutsummaryrefslogtreecommitdiff
path: root/todo.cpp
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-08-27 02:23:35 +0200
committerache <ache@ache.one>2017-08-27 02:25:53 +0200
commitd75f3c64ae9ee64a3af662cea773e7bddfe9578b (patch)
tree97f413fd19cd903a27c0a08e49184fdbc7ad5541 /todo.cpp
parentFactorisation de code (diff)
Todo rename alias
Diffstat (limited to 'todo.cpp')
-rwxr-xr-xtodo.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/todo.cpp b/todo.cpp
index 6bbcd89..7cb8c93 100755
--- a/todo.cpp
+++ b/todo.cpp
@@ -133,8 +133,16 @@ int main(int argc, char *argv[]) {
int action = -1;
int startArgv = 2;
- if( argc > 1 )
- if( isalpha(argv[1][0]) && toupper(argv[1][0]) == argv[1][0] ) {
+ if( argc > 1 ) {
+ // Si la première lettre est une majuscule
+ bool ok = false;
+ const char* accents[] = {"É", "È", "Ê","À","Â","Ç"};
+ for(size_t t = 0 ; t < sizeof accents /sizeof *accents ; t++) {
+ if( strncmp(argv[1], accents[t], 2 ) == 0 ) {
+ ok = true;
+ }
+ }
+ if( (isalpha(argv[1][0]) && toupper(argv[1][0]) == argv[1][0]) || ok ) {
action = 1;
startArgv = 1;
}else if( !strcmp( argv[1], "show") ) {