source:
plugins/audacity/audacity-libnyquist.diff
@
e5e693e
Last change on this file since e5e693e was 96fb8ad, checked in by , 20 years ago | |
---|---|
|
|
File size: 2.7 KB |
-
lib-src/libnyquist/nyx/nyx.c
old new 620 620 { 621 621 if (moreargs()) { 622 622 unsigned char *cmd; 623 int retval; 623 624 cmd = (unsigned char *)getstring(xlgastring()); 624 fprintf(stderr, "Will not execute system command: %s\n", cmd); 625 //fprintf(stderr, "Will not execute system command: %s\n", cmd); 626 system(cmd); 627 if (retval != 0) 628 fprintf(stderr, 629 "the command \n %s \n exited with the error %d\n", 630 cmd, retval); 625 631 } 626 632 return s_true; 627 633 } -
lib-src/libnyquist/xlisp/xlftab.c
old new 83 83 xgetlambda(void),xmacroexpand(void),x1macroexpand(void), 84 84 xinfo(void), //Added by Ning Hu Apr.2001 85 85 xsetdir(void), //Added by Ning Hu May.2001 86 xatof(void), xftoa(void), //Added by PiemBrossier Jul.2004 86 87 xtrace(void),xuntrace(void),xprofile(void),xstrsearch(void), xsetupconsole(void); 87 88 #endif 88 89 … … 452 453 { "WRITE-INT", S, xwrint }, /* 292 */ 453 454 { "WRITE-FLOAT", S, xwrfloat }, /* 293 */ 454 455 { "INFO", S, xinfo }, /* 294 */ /* Ning Hu, Apr 2001 */ 455 { NULL, S, xnotimp }, /* 295 */ 456 { NULL, S, xnotimp }, /* 296 */ 456 457 { "ATOF", S, xatof }, /* 295 */ /* Paul Brossier <piem@altern.org> */ 458 { "FTOA", S, xftoa }, /* 296 */ /* Jul. 2004 */ 457 459 { NULL, S, xnotimp }, /* 297 */ 458 460 { NULL, S, xnotimp }, /* 298 */ 459 461 { NULL, S, xnotimp }, /* 299 */ -
lib-src/libnyquist/xlisp/xlstr.c
old new 16 16 #define TLEFT 1 17 17 #define TRIGHT 2 18 18 19 /* on the NeXT, atof is a macro in stdlib.h */ 20 #ifndef atof 21 extern double atof(); 22 #endif 23 19 24 /* external variables */ 20 25 extern LVAL k_start,k_end,k_1start,k_1end,k_2start,k_2end; 21 26 extern LVAL s_true; … … 555 560 return (icmp ? s_true : NIL); 556 561 } 557 562 563 /* functions added by Paul Brossier <piem@altern.org> */ 564 LVAL xatof() /* converts a string to a float */ 565 { 566 if (moreargs()) { 567 unsigned char *astring = NULL; 568 float afloat; 569 astring = (unsigned char *)getstring(xlgastring()); 570 xllastarg(); 571 afloat = atof(astring); 572 return cvflonum(afloat); 573 } else 574 return NIL; 575 } 576 577 LVAL xftoa() /* converts a float to a string */ 578 { 579 LVAL arg; 580 FIXTYPE ival=0; 581 FLOTYPE fval=0; 582 if (moreargs()) { 583 /* get the first argument */ 584 arg = xlgetarg(); 585 xllastarg(); 586 587 /* set the type of the first argument */ 588 if (fixp(arg)) { 589 ival = getfixnum(arg); 590 snprintf(buf,STRMAX,"%d",ival); 591 } 592 else if (floatp(arg)) { 593 fval = getflonum(arg); 594 snprintf(buf,STRMAX,"%f",fval); 595 } 596 597 return cvstring(buf); 598 } else 599 return NIL; 600 }
Note: See TracBrowser
for help on using the repository browser.