aboutsummaryrefslogtreecommitdiff
path: root/src/prime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prime.c')
-rw-r--r--src/prime.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/prime.c b/src/prime.c
index 3a4a5ba..4c3081a 100644
--- a/src/prime.c
+++ b/src/prime.c
@@ -63,6 +63,12 @@ static void *prime_new(void)
return (x);
}
+static void prime_help(t_prime*x)
+{
+ post("\n%c prime\t\t:: test whether a given number is prime", HEARTSYMBOL);
+}
+
+
void prime_setup(void) {
prime_class = class_new(gensym("prime"),
(t_newmethod)prime_new,
@@ -70,5 +76,6 @@ void prime_setup(void) {
CLASS_DEFAULT, 0);
class_addfloat(prime_class, prime_float);
+ class_addmethod(prime_class, (t_method)prime_help, gensym("help"), A_NULL);
zexy_register("prime");
}