Menu

[76e07a]: / joe / macro.c  Maximize  Restore  History

Download this file

848 lines (738 with data), 16.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
/*
* Keyboard macros
* Copyright
* (C) 1992 Joseph H. Allen
*
* This file is part of JOE (Joe's Own Editor)
*/
#include "types.h"
MACRO *freemacros = NULL;
/* Create a macro */
MACRO *mkmacro(int k, int flg, ptrdiff_t n, CMD *cmd)
{
MACRO *macro;
if (!freemacros) {
ptrdiff_t x;
macro = (MACRO *) joe_malloc(SIZEOF(MACRO) * 64);
for (x = 0; x != 64; ++x) {
macro[x].steps = (MACRO **) freemacros;
freemacros = macro + x;
}
}
macro = freemacros;
freemacros = (MACRO *) macro->steps;
macro->steps = NULL;
macro->size = 0;
macro->flg = flg;
macro->n = n;
macro->cmd = cmd;
macro->k = k;
macro->what = 0;
return macro;
}
/* Eliminate a macro */
void rmmacro(MACRO *macro)
{
if (macro) {
if (macro->steps) {
ptrdiff_t x;
for (x = 0; x != macro->n; ++x)
rmmacro(macro->steps[x]);
joe_free(macro->steps);
}
macro->steps = (MACRO **) freemacros;
freemacros = macro;
}
}
/* Add a step to block macro */
void addmacro(MACRO *macro, MACRO *m)
{
if (macro->n == macro->size) {
if (macro->steps)
macro->steps = (MACRO **) joe_realloc(macro->steps, (macro->size += 8) * SIZEOF(MACRO *));
else
macro->steps = (MACRO **) joe_malloc((macro->size = 8) * SIZEOF(MACRO *));
}
macro->steps[macro->n++] = m;
}
/* Duplicate a macro */
MACRO *dupmacro(MACRO *mac)
{
MACRO *m = mkmacro(mac->k, mac->flg, mac->n, mac->cmd);
if (mac->steps) {
ptrdiff_t x;
m->steps = (MACRO **) joe_malloc((m->size = mac->n) * SIZEOF(MACRO *));
for (x = 0; x != m->n; ++x)
m->steps[x] = dupmacro(mac->steps[x]);
}
return m;
}
/* Set key part of macro */
MACRO *macstk(MACRO *m, int k)
{
if (k != -1)
m->k = k;
return m;
}
/* Set flg part of macro */
MACRO *macsta(MACRO *m, int a)
{
m->flg = a;
return m;
}
/* Parse text into a macro
* sta is set to: ending position in buffer for no error.
* -1 for syntax error
* -2 for need more input
*
* Set secure to allow only commands which being with "shell_".
* Also, secure_type will be used instead of type.
*/
MACRO *mparse(MACRO *m, const char *buf, ptrdiff_t *sta, int secure)
{
const char *org = buf;
int bf[1024];
char bf1[1024];
int x;
macroloop:
/* Skip whitespace */
parse_ws(&buf, 0);
/* If the buffer is only whitespace then treat as unknown command */
if (!*buf) {
*sta = -1;
return NULL;
}
/* Do we have a string? */
if (parse_Zstring(&buf, bf, SIZEOF(bf)/SIZEOF(bf[0])) >= 0) {
for (x = 0; bf[x]; ++x) {
if (m) {
if (!m->steps) {
MACRO *macro = m;
m = mkmacro(NO_MORE_DATA, 0, 0, NULL);
addmacro(m, macro);
}
} else
m = mkmacro(NO_MORE_DATA, 0, 0, NULL);
addmacro(m, mkmacro(bf[x], 0, 0, secure ? findcmd("secure_type") : findcmd("type")));
}
} else { /* Do we have a command? */
x = 0;
while (*buf && *buf != '#' && *buf != '!' && *buf != '~' && *buf !='-' && *buf != ',' &&
*buf != ' ' && *buf != '\t' && *buf != '\n' && *buf != '\r') {
if (x != SIZEOF(bf1) - 1)
bf1[x++] = *buf;
++buf;
}
bf1[x] = 0;
if (x) {
CMD *cmd;
int flg = 0;
if (!secure || !zncmp(bf1, "shell_", 6))
cmd = findcmd(bf1);
else
cmd = 0;
/* Parse flags */
while (*buf == '-' || *buf == '!' || *buf == '#' || *buf == '~') {
if (*buf == '-') flg |= 1;
if (*buf == '!') flg |= 2;
if (*buf == '#') flg |= 4;
if (*buf == '~') flg |= 8;
++buf;
}
if (!cmd) {
*sta = -1;
return NULL;
} else if (m) {
if (!m->steps) {
MACRO *macro = m;
m = mkmacro(NO_MORE_DATA, 0, 0, NULL);
addmacro(m, macro);
}
addmacro(m, mkmacro(NO_MORE_DATA, flg, 0, cmd));
} else
m = mkmacro(NO_MORE_DATA, flg, 0, cmd);
} else { /* not a valid command */
*sta = -1;
return NULL;
}
}
/* Skip whitespace */
parse_ws(&buf, 0);
/* Do we have a comma? */
if (*buf == ',') {
++buf;
parse_ws(&buf, 0);
if (*buf && *buf != '\r' && *buf != '\n')
goto macroloop;
*sta = -2;
return m;
}
/* Done */
*sta = buf - org;
return m;
}
/* Convert macro to text */
char *unescape(char *ptr, int c)
{
if (c == '"') {
*ptr++ = '\\';
*ptr++ = '"';
} else if (c == '\\') {
*ptr++ = '\\';
*ptr++ = '\\';
} else if (c == '\'') {
*ptr++ = '\\';
*ptr++ = '\'';
} else if (c < 32 || c == 127) {
*ptr++ = '\\';
*ptr++ = 'x';
*ptr++ = "0123456789ABCDEF"[15 & (c >> 4)];
*ptr++ = "0123456789ABCDEF"[15 & c];
} else {
ptr += utf8_encode(ptr, c);
}
return ptr;
}
static char *domtext(MACRO *m, char *ptr, int *first, int *instr)
{
ptrdiff_t x;
if (!m)
return ptr;
if (m->steps) {
for (x = 0; x != m->n; ++x)
ptr = domtext(m->steps[x], ptr, first, instr);
} else {
if (*instr && zcmp(m->cmd->name, "type")) {
*ptr++ = '\"';
*instr = 0;
}
if (*first)
*first = 0;
else if (!*instr)
*ptr++ = ',';
if (!zcmp(m->cmd->name, "type")) {
if (!*instr) {
*ptr++ = '\"';
*instr = 1;
}
ptr = unescape(ptr, m->k);
} else {
for (x = 0; m->cmd->name[x]; ++x)
*ptr++ = m->cmd->name[x];
if (!zcmp(m->cmd->name, "play") || !zcmp(m->cmd->name, "gomark") || !zcmp(m->cmd->name, "setmark") || !zcmp(m->cmd->name, "record") || !zcmp(m->cmd->name, "uarg")) {
*ptr++ = ',';
*ptr++ = '"';
ptr = unescape(ptr, m->k);
*ptr++ = '"';
}
}
}
return ptr;
}
char *mtext(char *s, MACRO *m)
{
int first = 1;
int instr = 0;
char *e = domtext(m, s, &first, &instr);
if (instr)
*e++ = '\"';
*e = 0;
return s;
}
/* Keyboard macro recorder */
static MACRO *kbdmacro[10];
static int playmode[10];
struct recmac *recmac = NULL;
static void unmac(void)
{
if (recmac)
rmmacro(recmac->m->steps[--recmac->m->n]);
}
void chmac(void)
{
if (recmac && recmac->m->n)
recmac->m->steps[recmac->m->n - 1]->k = 3;
}
static void record(MACRO *m, int k)
{
if (recmac)
addmacro(recmac->m, macstk(dupmacro(m), k));
}
static int ifdepth=0; /* JM: Nesting level of if cmds */
static int ifflag=1; /* JM: Truth flag for if */
static int iffail=0; /* JM: Depth where ifflag became 0 */
/* Suspend macro record/play to allow for user input.
*
* Stop recording current macro, make recursive call to edit loop, which
* runs until dialog is complete, then continue with macro recording.
*
* When the macro is played, edit loop is run as a subroutine until dialog
* is complete, then uquery returns, which continues macro execution.
*
* Completion of a dialog is indicated with 'notify' flag (look at interactive
* dialogs in ufile.c).
*/
int uquery(W *w, int k)
{
int ret;
int oid=ifdepth, oifl=ifflag, oifa=iffail;
struct recmac *tmp = recmac;
recmac = NULL;
ret = edloop(1);
recmac = tmp;
ifdepth = oid; ifflag = oifl; iffail = oifa;
return ret;
}
/* Macro execution */
MACRO *curmacro = NULL; /* Set if we're in a macro */
static int macroptr;
static int arg = 0; /* Repeat argument */
static int argset = 0; /* Set if 'arg' is set */
/* Execute a macro which is just a simple command */
static int exsimple(MACRO *m, int myarg, int u, int k)
{
CMD *cmd = m->cmd;
int flg = 0; /* set if we should not try to merge minor changes into single undo record */
int ret = 0;
/* Find command to execute if repeat argument is negative */
if (myarg < 0) {
myarg = -myarg;
if (cmd->negarg)
cmd = findcmd(cmd->negarg);
else
myarg = 0; /* Do not execute */
}
/* Check if command doesn't like an arg... */
if (myarg != 1 && !cmd->arg)
myarg = 0; /* Do not execute */
if (myarg != 1 || !(cmd->flag & EMINOR)
|| maint->curwin->watom->what == TYPEQW) /* Undo work right for s & r */
flg = 1;
if (ifflag || (cmd->flag&EMETA)) {
if (flg && u)
umclear();
/* Repeat... */
while (myarg-- && !leave && !ret)
ret = execmd(cmd, m->k != NO_MORE_DATA ? m->k : k);
if (leave)
return ret;
if (flg && u)
umclear();
if (u)
undomark();
}
return ret;
}
int current_arg = 1;
int current_arg_set = 0;
int exmacro(MACRO *m, int u, int k)
{
int larg;
int negarg = 0;
int oid=0, oifl=0, oifa=0;
int ret = 0;
int main_ret = 0;
int o_arg_set = argset;
int o_arg = arg;
/* Take argument */
if (argset) {
larg = arg;
arg = 0;
argset = 0;
} else {
larg = 1;
}
/* Just a simple command? */
if (!m->steps) {
return exsimple(m, larg, u, k);
}
/* Must be a real macro then... */
if (larg < 0) {
larg = -larg;
negarg = 1;
}
if (ifflag) {
if (u)
umclear();
/* Repeat... */
while (larg && !leave && !ret) {
MACRO *tmpmac = curmacro;
int tmpptr = macroptr;
int x = 0;
int stk = nstack;
/* Steps of macro... */
while (m && x != m->n && !leave && !ret) {
MACRO *d;
int tmp_arg;
int tmp_set;
d = m->steps[x++];
curmacro = m;
macroptr = x;
tmp_arg = current_arg;
tmp_set = current_arg_set;
current_arg = o_arg;
current_arg_set = o_arg_set;
if(d->steps) oid=ifdepth, oifl=ifflag, oifa=iffail, ifdepth=iffail=0;
/* If this step wants to know about negative args... */
if ((d->flg&4)) {
argset = o_arg_set;
arg = o_arg;
larg = 1;
} else if ((d->flg&1) && negarg) {
if (argset) {
arg = -arg;
} else {
argset = 1;
arg = -1;
}
}
if (d->flg&8) {
larg = 1;
}
/* This is the key step of the macro... */
if (d->flg&2)
main_ret = exmacro(d, 0, k);
else
ret = exmacro(d, 0, k);
if(d->steps) ifdepth=oid, ifflag=oifl, iffail=oifa;
current_arg = tmp_arg;
current_arg_set = tmp_set;
m = curmacro;
x = macroptr;
}
curmacro = tmpmac;
macroptr = tmpptr;
/* Pop ^KB ^KK stack */
while (nstack > stk)
upop(NULL, 0);
--larg;
}
ret |= main_ret;
if (leave)
return ret;
if (u)
umclear();
if (u)
undomark();
}
return ret;
}
/* Execute a macro - for user typing */
/* Records macro in macro recorder, resets if */
int exemac(MACRO *m, int k)
{
record(m, k);
ifflag=1; ifdepth=iffail=0;
return exmacro(m, 1, k);
}
/* Keyboard macro user routines */
static int dorecord(W *w, int c, void *object, int *notify)
{
int n;
struct recmac *r;
if (notify)
*notify = 1;
if (c > '9' || c < '0') {
nungetc(c);
return -1;
}
for (n = 0; n != 10; ++n)
if (playmode[n])
return -1;
r = (struct recmac *) joe_malloc(SIZEOF(struct recmac));
r->m = mkmacro(NO_MORE_DATA, 0, 0, NULL);
r->next = recmac;
r->n = c - '0';
recmac = r;
return 0;
}
int urecord(W *w, int c)
{
if (c >= '0' && c <= '9')
return dorecord(w, c, NULL, NULL);
else if (mkqw(w, sz(joe_gettext(_("Macro to record (0-9 or %{abort} to abort): "))), dorecord, NULL, NULL, NULL))
return 0;
else
return -1;
}
extern time_t timer_macro_delay;
extern MACRO *timer_macro;
static int dotimer1(W *w, char *s, void *object, int *notify)
{
BW *bw;
long num;
if (notify)
*notify = 1;
WIND_BW(bw, w);
num = (long)calc(bw, s, 0);
if (merr) {
msgnw(w, merr);
return -1;
}
timer_macro_delay = num;
vsrm(s);
return 0;
}
static int dotimer(W *w, int c, void *object, int *notify)
{
if (c < '0' || c > '9')
return -1;
c -= '0';
if (kbdmacro[c]) {
if (timer_macro) {
rmmacro(timer_macro);
}
timer_macro = dupmacro(kbdmacro[c]);
timer_macro_delay = 0;
if (wmkpw(w, joe_gettext(_("Delay in seconds between macro invocation (%{abort} to abort): ")), NULL, dotimer1, NULL, NULL, math_cmplt, NULL, NULL, utf8_map,0))
return 0;
else
return -1;
} else {
return -1;
}
}
int utimer(W *w, int k)
{
timer_macro_delay = 0;
if (timer_macro) {
rmmacro(timer_macro);
timer_macro = 0;
}
if (mkqw(w, sz(joe_gettext(_("Macro to play (0-9 or %{abort} to abort): "))), dotimer, NULL, NULL, NULL))
return 0;
else
return -1;
}
int ustop(W *w, int k)
{
unmac();
if (recmac) {
struct recmac *r = recmac;
MACRO *m;
dostaupd = 1;
recmac = r->next;
if (kbdmacro[r->n])
rmmacro(kbdmacro[r->n]);
kbdmacro[r->n] = r->m;
if (recmac)
record(m = mkmacro(r->n + '0', 0, 0, findcmd("play")), NO_MORE_DATA), rmmacro(m);
joe_free(r);
}
return 0;
}
static int doplay(W *w, int c, void *object, int *notify)
{
if (notify)
*notify = 1;
if (c >= '0' && c <= '9') {
int ret;
c -= '0';
if (playmode[c] || !kbdmacro[c])
return -1;
playmode[c] = 1;
ret = exmacro(kbdmacro[c], 0, c);
playmode[c] = 0;
return ret;
} else {
nungetc(c);
return -1;
}
}
int umacros(W *w, int k)
{
int x;
char buf[1024];
BW *bw;
WIND_BW(bw, w);
p_goto_eol(bw->cursor);
for (x = 0; x != 10; ++x)
if (kbdmacro[x]) {
mtext(buf, kbdmacro[x]);
binss(bw->cursor, buf);
p_goto_eol(bw->cursor);
joe_snprintf_2(buf, JOE_MSGBUFSIZE, "\t^K %c\tMacro %d", x + '0', x);
binss(bw->cursor, buf);
p_goto_eol(bw->cursor);
binsc(bw->cursor, '\n');
pgetc(bw->cursor);
}
return 0;
}
void save_macros(FILE *f)
{
int x;
char buf[1024];
for(x = 0; x!= 10; ++x)
if(kbdmacro[x]) {
mtext(buf, kbdmacro[x]);
fprintf(f," %d ",x);
emit_string(f,buf,zlen(buf));
fprintf(f,"\n");
}
fprintf(f,"done\n");
}
void load_macros(FILE *f)
{
char buf[1024];
char bf[1024];
while(fgets(buf,sizeof(buf),f) && zcmp(buf,"done\n")) {
const char *p = buf;
int n;
ptrdiff_t len;
ptrdiff_t sta;
parse_ws(&p, '#');
if(!parse_int(&p,&n)) {
parse_ws(&p, '#');
len = parse_string(&p,bf,SIZEOF(bf));
if (len>0)
kbdmacro[n] = mparse(NULL,bf,&sta,0);
}
}
}
int uplay(W *w, int c)
{
if (c >= '0' && c <= '9')
return doplay(w, c, NULL, NULL);
else if (mkqwna(w, sz(joe_gettext(_("Play-"))), doplay, NULL, NULL, NULL))
return 0;
else
return -1;
}
/* Repeat-count setting */
static int doarg(W *w, char *s, void *object, int *notify)
{
BW *bw;
int num;
WIND_BW(bw, w);
if (notify)
*notify = 1;
num = (int)calc(bw, s, 1);
if (merr) {
msgnw(w, merr);
return -1;
}
arg = num;
argset = 1;
vsrm(s);
return 0;
}
int uarg(W *w, int k)
{
if (wmkpw(w, joe_gettext(_("No. times to repeat next command (%{abort} to abort): ")), NULL, doarg, NULL, NULL, math_cmplt, NULL, NULL, utf8_map,0))
return 0;
else
return -1;
}
static int doif(W *w,char *s,void *object,int *notify)
{
int num;
BW *bw;
if (notify) *notify=1;
WIND_BW(bw, w);
num = (int)calc(bw, s, 0);
if (merr) {
msgnw(w, merr);
return -1;
}
ifflag = (num ? 1 : 0);
iffail = ifdepth;
vsrm(s);
return 0;
}
static int ifabrt(W *w, void *object)
{
ifdepth--;
return 0;
}
int uif(W *w, int k)
{
ifdepth++;
if (!ifflag) return 0;
if (wmkpw(w,joe_gettext(_("If (%{abort} to abort): ")),NULL,doif,NULL,ifabrt,math_cmplt,NULL,NULL,utf8_map,0)) return 0;
else return -1;
}
int uelsif(W *w, int k)
{
if (!ifdepth) {
msgnw(w,joe_gettext(_("Elsif without if")));
return -1;
} else if(ifflag) {
ifflag=iffail=0; /* don't let the next else/elsif get run */
} else if(ifdepth == iffail) {
ifflag=1; /* so the script can type the condition :) */
if(wmkpw(w,joe_gettext(_("Else if: ")),NULL,doif,NULL,NULL,math_cmplt,NULL,NULL,locale_map,0)) return 0;
else return -1;
}
return 0;
}
int uelse(W *w, int k)
{
if (!ifdepth) {
msgnw(w,joe_gettext(_("Else without if")));
return -1;
} else if(ifdepth == iffail) {
ifflag = !ifflag;
}
return 0;
}
int uendif(W *w, int k)
{
if(!ifdepth) {
msgnw(w,joe_gettext(_("Endif without if")));
return -1;
}
if(iffail==ifdepth) iffail--, ifflag=1;
ifdepth--;
if(ifdepth==0) ifflag=1;
return 0;
}
int unaarg;
int negarg;
static int douarg(W *w, int c, void *object, int *notify)
{
if (c == '-')
negarg = !negarg;
else if (c >= '0' && c <= '9')
unaarg = unaarg * 10 + c - '0';
else if (c == 'U' - '@')
if (unaarg)
unaarg *= 4;
else
unaarg = 16;
else if (c == 7 || c == 3 || c == 32) {
if (notify)
*notify = 1;
return -1;
} else {
nungetc(c);
if (unaarg)
arg = unaarg;
else if (negarg)
arg = 1;
else
arg = 4;
if (negarg)
arg = -arg;
argset = 1;
if (notify)
*notify = 1;
return 0;
}
joe_snprintf_2(msgbuf, JOE_MSGBUFSIZE, joe_gettext(_("Repeat %s%d")), negarg ? "-" : "", unaarg);
if (mkqwna(w, sz(msgbuf), douarg, NULL, NULL, notify))
return 0;
else
return -1;
}
int uuarg(W *w, int c)
{
unaarg = 0;
negarg = 0;
if ((c >= '0' && c <= '9') || c == '-')
return douarg(w, c, NULL, NULL);
else if (mkqwna(w, sz(joe_gettext(_("Repeat"))), douarg, NULL, NULL, NULL))
return 0;
else
return -1;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.