aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-01-02 11:33:59 -0500
committerDave Reisner <dreisner@archlinux.org>2013-01-02 14:23:57 -0500
commite35ce0069094c135ed9065f2bda945fdf4b6d83e (patch)
tree843d860598cbefbe1d3c35ddb4a6d4e320fefed2 /Makefile
parentaa6847b94511728250333125c3dd9bec7b65759a (diff)
downloadmirror-ponymix-e35ce0069094c135ed9065f2bda945fdf4b6d83e.tar.gz
mirror-ponymix-e35ce0069094c135ed9065f2bda945fdf4b6d83e.tar.bz2
mirror-ponymix-e35ce0069094c135ed9065f2bda945fdf4b6d83e.zip
ponymix: validate arg count before invoking function
A few changes make this fun and easy: - Merge the function array into the string to action lookup and return a Command instead of simply an enum. A Command is the function and the min/max arg count. - Implement an InRange method for the Range class. - Add a Dispatch function to convert the string to Command and validate the arguments. This leaves us in a position where the argc parameter to each method is never used, but maybe some day a command will be added that takes a range of args rather than a fixed number.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions