GnuCash 2.4.99
finproto.h
00001 /***************************************************************************
00002  *              -------------------
00003  *    create   : Tue Jul 11 20:21:18 2000
00004  *    copyright: (C) 2000 by Terry D. Boldt
00005  *    email    : tboldt@attglobal.net
00006  *              -------------------
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 /***************************************************************************
00017  *  Global Function Prototypes
00018  *  Tue Jul 11 20:21:18 2000
00019  *
00020  ***************************************************************************/
00021 
00022 #ifndef FINPROTO_H
00023 #define FINPROTO_H
00024 
00025 #include <stdio.h>
00026 
00027 #include "finvar.h"
00028 
00029 /*==================================================*/
00030 /* fin.c */
00031 
00032 unsigned fi_calc_num_payments (fi_ptr fi);
00033 
00034 double
00035 _fi_calc_num_payments (double nint,     /* nominal interest rate */
00036                        double pv,       /* present value */
00037                        double pmt,      /* periodic payment */
00038                        double fv,       /* future value */
00039                        unsigned CF,     /* compounding frequency */
00040                        unsigned PF,     /* payment frequency */
00041                        unsigned disc,   /* discrete/continuous compounding */
00042                        unsigned bep);   /* beginning/end of period payment */
00043 
00044 double fi_calc_interest (fi_ptr fi);
00045 
00046 double
00047 _fi_calc_interest (unsigned per,  /* number of periods */
00048                    double pv,     /* present value */
00049                    double pmt,    /* periodic payment */
00050                    double fv,     /* future value */
00051                    unsigned CF,   /* compounding frequency */
00052                    unsigned PF,   /* payment frequency */
00053                    unsigned disc, /* discrete/continuous compounding */
00054                    unsigned bep); /* beginning/end of period payment */
00055 
00056 double fi_calc_present_value (fi_ptr fi);
00057 
00058 double
00059 _fi_calc_present_value (unsigned per,   /* number of periods */
00060                         double nint,    /* nominal interest rate */
00061                         double pmt,     /* periodic payment */
00062                         double fv,      /* future value */
00063                         unsigned CF,    /* compounding frequency */
00064                         unsigned PF,    /* payment frequency */
00065                         unsigned disc,  /* discrete/continuous compounding */
00066                         unsigned bep);  /* beginning/end of period payment */
00067 
00068 double fi_calc_payment (fi_ptr fi);
00069 
00070 double
00071 _fi_calc_payment (unsigned per,  /* number of periods */
00072                   double nint,   /* nominal interest rate */
00073                   double pv,     /* present value */
00074                   double fv,     /* future value */
00075                   unsigned CF,   /* compounding frequency */
00076                   unsigned PF,   /* payment frequency */
00077                   unsigned disc, /* discrete/continuous compounding */
00078                   unsigned bep); /* beginning/end of period payment */
00079 
00080 double fi_calc_future_value (fi_ptr fi);
00081 
00082 double
00083 _fi_calc_future_value (unsigned per,    /* number of periods */
00084                        double nint,     /* nominal interest rate */
00085                        double pv,       /* present value */
00086                        double pmt,      /* periodic payment */
00087                        unsigned CF,     /* compounding frequency */
00088                        unsigned PF,     /* payment frequency */
00089                        unsigned disc,   /* discrete/continuous compounding */
00090                        unsigned bep);   /* beginning/end of period payment */
00091 
00092 void set_default (fi_ptr fi);
00093 
00094 unsigned long julian_day_number (unsigned year, unsigned month, unsigned day);
00095 
00096 amort_sched_ptr Amortization_init (amort_sched_ptr amortsched);
00097 
00098 amort_sched_ptr Amortization_Schedule (amort_sched_ptr amortsched);
00099 
00100 void Amortization_free (amort_sched_ptr amortsched);
00101 
00102 
00103 /*==================================================*/
00104 /* expression_parser.c */
00105 
00106 void exit_parser (parser_env_ptr pe);
00107 
00108 ParseError get_parse_error (parser_env_ptr pe);
00109 
00110 var_store_ptr parser_get_vars (parser_env_ptr pe);
00111 
00112 unsigned delete_var (char *var_name, parser_env_ptr pe);
00113 
00114 char *parse_string (var_store_ptr value,
00115                     const char *string, parser_env_ptr pe);
00116 
00117 
00118 /*==================================================*/
00119 /* amort_opt.c */
00120 amort_sched_ptr amort_opt (amort_sched_ptr amortsched, void *parse_env);
00121 
00122 
00123 /*==================================================*/
00124 /* amort_prt.c */
00125 void prt_amortization_schedule (amort_sched_ptr amortsched, FILE * ofile);
00126 
00127 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines