|
C-Menu 0.2.9
A User Interface Toolkit
|
Installment Loan Calculator. More...
#include <math.h>#include <signal.h>#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>Go to the source code of this file.
Macros | |
| #define | FALSE 0 |
| #define | TRUE 1 |
Functions | |
| void | numbers (char *d, char *s) |
| double | calculate_i (double, double, double) |
| double | calculate_n (double, double, double) |
| double | calculate_pmt (double, double, double) |
| double | calculate_pv (double, double, double) |
| int | is_numeric (char *) |
| void | accept_str (char *s) |
| char * | format_currency (float) |
| char * | format_interest (float) |
| double | accept_pv () |
| double | accept_n () |
| double | accept_i () |
| double | accept_pmt () |
| void | error_press_any_key (char *) |
| void | ABEND (int) |
| int | main (int argc, char **argv) |
| iloan is a trivial application to demonstrate how a command-line program can be integrated into C-Menu Form with simple file, argument, or pipe i-o. | |
Variables | |
| char | in_str [BUFSIZ+1] |
| int | f_pv = 0 |
| int | f_n = 0 |
| int | f_i = 0 |
| int | f_pmt = 0 |
| bool | f_quiet = false |
| void ABEND | ( | int | e | ) |
| double accept_i | ( | ) |
Definition at line 221 of file iloan.c.
References accept_str(), error_press_any_key(), in_str, and is_numeric().
Referenced by main().
| double accept_n | ( | ) |
Definition at line 205 of file iloan.c.
References accept_str(), error_press_any_key(), in_str, and is_numeric().
Referenced by main().
| double accept_pmt | ( | ) |
Definition at line 242 of file iloan.c.
References accept_str(), error_press_any_key(), in_str, and is_numeric().
Referenced by main().
| double accept_pv | ( | ) |
Definition at line 184 of file iloan.c.
References accept_str(), error_press_any_key(), in_str, and is_numeric().
Referenced by main().
| void accept_str | ( | char * | s | ) |
Definition at line 349 of file iloan.c.
References in_str.
Referenced by accept_i(), accept_n(), accept_pmt(), and accept_pv().
| double calculate_i | ( | double | pv, |
| double | n, | ||
| double | pmt ) |
Definition at line 291 of file iloan.c.
References error_press_any_key(), f_quiet, and format_interest().
Referenced by main().
| double calculate_n | ( | double | pv, |
| double | i, | ||
| double | pmt ) |
Definition at line 279 of file iloan.c.
References error_press_any_key(), f_quiet, and format_currency().
Referenced by main().
| double calculate_pmt | ( | double | pv, |
| double | n, | ||
| double | i ) |
Definition at line 328 of file iloan.c.
References error_press_any_key(), f_quiet, and format_currency().
Referenced by main().
| double calculate_pv | ( | double | n, |
| double | i, | ||
| double | pmt ) |
Definition at line 266 of file iloan.c.
References error_press_any_key(), f_quiet, and format_currency().
Referenced by main().
| void error_press_any_key | ( | char * | s | ) |
Definition at line 260 of file iloan.c.
Referenced by accept_i(), accept_n(), accept_pmt(), accept_pv(), calculate_i(), calculate_n(), calculate_pmt(), calculate_pv(), and main().
| char * format_currency | ( | float | a | ) |
Definition at line 354 of file iloan.c.
Referenced by calculate_n(), calculate_pmt(), calculate_pv(), and main().
| char * format_interest | ( | float | a | ) |
Definition at line 393 of file iloan.c.
Referenced by calculate_i(), and main().
| int is_numeric | ( | char * | s | ) |
Definition at line 340 of file iloan.c.
Referenced by accept_i(), accept_n(), accept_pmt(), and accept_pv().
| int main | ( | int | argc, |
| char ** | argv ) |
iloan is a trivial application to demonstrate how a command-line program can be integrated into C-Menu Form with simple file, argument, or pipe i-o.
Definition at line 74 of file iloan.c.
References ABEND(), accept_i(), accept_n(), accept_pmt(), accept_pv(), calculate_i(), calculate_n(), calculate_pmt(), calculate_pv(), error_press_any_key(), f_i, f_n, f_pmt, f_pv, f_quiet, format_currency(), format_interest(), and numbers().
| void numbers | ( | char * | d, |
| char * | s ) |
| bool f_quiet = false |
Definition at line 41 of file iloan.c.
Referenced by calculate_i(), calculate_n(), calculate_pmt(), calculate_pv(), and main().
| char in_str[BUFSIZ+1] |
Definition at line 20 of file iloan.c.
Referenced by accept_i(), accept_n(), accept_pmt(), accept_pv(), and accept_str().