thorsson_cups 0.0.32 → 0.0.33
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/cups.c +16 -0
- metadata +1 -1
data/ext/cups.c
CHANGED
@@ -198,6 +198,20 @@ static VALUE cups_show_dests(VALUE self)
|
|
198
198
|
return dest_list;
|
199
199
|
}
|
200
200
|
|
201
|
+
static VALUE cups_test(VALUE self)
|
202
|
+
{
|
203
|
+
return Qtrue;
|
204
|
+
}
|
205
|
+
|
206
|
+
static VALUE cups_test2(VALUE self)
|
207
|
+
{
|
208
|
+
int i, j;
|
209
|
+
i = 1;
|
210
|
+
j = 2;
|
211
|
+
i = i + j;
|
212
|
+
return Qtrue;
|
213
|
+
}
|
214
|
+
|
201
215
|
/*
|
202
216
|
* call-seq:
|
203
217
|
* Cups.default_printer -> String or nil
|
@@ -634,6 +648,8 @@ void Init_cups() {
|
|
634
648
|
|
635
649
|
// Cups Module Methods
|
636
650
|
rb_define_singleton_method(rubyCups, "show_destinations", cups_show_dests, 0);
|
651
|
+
rb_define_singleton_method(rubyCups, "test", cups_test, 0);
|
652
|
+
rb_define_singleton_method(rubyCups, "test", cups_test2, 0);
|
637
653
|
rb_define_singleton_method(rubyCups, "default_printer", cups_get_default, 0);
|
638
654
|
rb_define_singleton_method(rubyCups, "all_jobs", cups_get_jobs, 1);
|
639
655
|
rb_define_singleton_method(rubyCups, "cancel_print", cups_cancel_print, -1);
|