ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/ihost/ihost.c
(Generate patch)

Comparing projects/cms/source/ihost/ihost.c (file contents):
Revision 1.2 by pajs, Fri May 10 20:05:05 2002 UTC vs.
Revision 1.3 by pajs, Fri May 10 21:32:38 2002 UTC

# 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");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines