| # | Line 175 | Line 175 | int ihost_configure(ihost_state_t *ihost_state){ | |
|---|---|---|
| 175 | } | |
| 176 | ||
| 177 | return 0; | |
| 178 | – | |
| 178 | } | |
| 179 | ||
| 180 | < | int main(){ |
| 180 | > | int main(int argc, char **argv){ |
| 181 | ihost_state_t ihost_state; | |
| 182 | + | errf_set_progname(argv[0]); |
| 183 | + | if(argc!=3){ |
| 184 | + | errf_usage("<host> <port>"); |
| 185 | + | exit(1); |
| 186 | + | } |
| 187 | ||
| 188 | < | ihost_state.fm_host=strdup("kernow.ukc.ac.uk"); |
| 189 | < | ihost_state.fm_port=4567; |
| 188 | > | ihost_state.fm_host=argv[1]; |
| 189 | > | ihost_state.fm_port=atoi(argv[2]); |
| 190 | ||
| 191 | if(ihost_configure(&ihost_state)!=0){ | |
| 192 | errf("configure failed"); | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |