/[dtapublic]/projs/dtats/trunk/projs/2018/20180707_cgi_web_tools_aux_exe/dtats_cgi_aux_arith_large/dtats_cgi_aux_arith_large.c
ViewVC logotype

Diff of /projs/dtats/trunk/projs/2018/20180707_cgi_web_tools_aux_exe/dtats_cgi_aux_arith_large/dtats_cgi_aux_arith_large.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 187 by dashley, Sat Jul 14 00:10:29 2018 UTC revision 207 by dashley, Sun Jul 15 21:50:56 2018 UTC
# Line 51  Line 51 
51  //     Calculate the gcd of two integers using Euclid's classic  //     Calculate the gcd of two integers using Euclid's classic
52  //     algorithm and also display the intermediate results.  //     algorithm and also display the intermediate results.
53  //   c)"gmp_prob_prime"  //   c)"gmp_prob_prime"
54  //     Use Miller-Rabin to determine to high certainty whther a  //     Use Miller-Rabin to determine to high certainty whther a
55  //     number is prime or composite.  //     number is prime or composite.
56  //   d)"pfact_18"      //   d)"pfact_18"
57  //     Attempt to factor a number of 18 decimal digits or less into      //     Attempt to factor a number of 18 decimal digits or less into
58  //     component primes.  //     component primes.
59  //   e)"cfbrap"  //   e)"cfbrap"
60  //     Finds the best rational approximation to a rational number subject  //     Finds the best rational approximation to a rational number subject
# Line 109  int SUBFUNC_HELP_main(int argc, char *ar Line 109  int SUBFUNC_HELP_main(int argc, char *ar
109    
110  //Structure type used to hold the jump table of different functions  //Structure type used to hold the jump table of different functions
111  //to handle different subcommands.  //to handle different subcommands.
112  struct struct_ARITH_LARGE_CGI_subcmd_jmp  struct struct_ARITH_LARGE_CGI_subcmd_jmp
113        {        {
114        char *subfunc_string;        char *subfunc_string;
115        int (*subfunc_ptr)(int argc, char *argv[]);        int (*subfunc_ptr)(int argc, char *argv[]);
# Line 143  static void dump_subfunction_choices(int Line 143  static void dump_subfunction_choices(int
143    
144    
145  int main(int argc, char *argv[])  int main(int argc, char *argv[])
146     {       {
147     int i;     int i;
148     int rv = 0;     int rv = 0;
149    
# Line 158  int main(int argc, char *argv[]) Line 158  int main(int argc, char *argv[])
158        {        {
159        if (!strcmp(argv[1], subcmd_jump_tbl[i].subfunc_string))        if (!strcmp(argv[1], subcmd_jump_tbl[i].subfunc_string))
160           {           {
161           rv = (subcmd_jump_tbl[i].subfunc_ptr)(argc, argv);      rv = (subcmd_jump_tbl[i].subfunc_ptr)(argc, argv);
162           goto normal_return;           goto normal_return;
163           }      }
164        }        }
165    
166     printf("Invalid subfunction code.  Choices are:\n");     printf("Invalid subfunction code.  Choices are:\n");

Legend:
Removed from v.187  
changed lines
  Added in v.207

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25