~ubuntu-branches/ubuntu/breezy/proj/breezy

« back to all changes in this revision

Viewing changes to src/proj.c

  • Committer: Bazaar Package Importer
  • Author(s): Peter S Galbraith
  • Date: 2004-11-06 19:44:53 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041106194453-axnsmkh1zplal8mz
Tags: upstream-4.4.9
ImportĀ upstreamĀ versionĀ 4.4.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
(*informat)(const char *, char **),     /* input data deformatter function */
53
53
fscale = 0.;    /* cartesian scale factor */
54
54
        static projUV
55
 
int_proj(data) projUV data; {
 
55
int_proj(projUV data) {
56
56
        if (prescale) { data.u *= fscale; data.v *= fscale; }
57
57
        data = (*proj)(data, Proj);
58
58
        if (postscale && data.u != HUGE_VAL)
255
255
    else emess_dat.Prog_name = *argv;
256
256
    inverse = ! strncmp(emess_dat.Prog_name, "inv", 3);
257
257
    if (argc <= 1 ) {
258
 
        (void)fprintf(stderr, usage, pj_release, emess_dat.Prog_name);
 
258
        (void)fprintf(stderr, usage, pj_get_release(), emess_dat.Prog_name);
259
259
        exit (0);
260
260
    }
261
261
    /* process run line arguments */
300
300
                    int do_long = arg[1] == 'P', c;
301
301
                    char *str;
302
302
 
303
 
                    for (lp = pj_list ; lp->id ; ++lp) {
 
303
                    for (lp = pj_get_list_ref() ; lp->id ; ++lp) {
 
304
                        if( strcmp(lp->id,"latlong") == 0 
 
305
                            || strcmp(lp->id,"longlat") == 0 
 
306
                            || strcmp(lp->id,"geocent") == 0 )
 
307
                            continue;
 
308
 
304
309
                        (void)printf("%s : ", lp->id);
305
310
                        if (do_long)  /* possibly multiline description */
306
311
                            (void)puts(*lp->descr);
315
320
                    struct PJ_LIST *lp;
316
321
 
317
322
                    arg += 2;
318
 
                    for (lp = pj_list ; lp->id ; ++lp)
 
323
                    for (lp = pj_get_list_ref(); lp->id ; ++lp)
319
324
                        if (!strcmp(lp->id, arg)) {
320
325
                            (void)printf("%9s : %s\n", lp->id, *lp->descr);
321
326
                            break;
323
328
                } else if (arg[1] == 'e') { /* list ellipses */
324
329
                    struct PJ_ELLPS *le;
325
330
 
326
 
                    for (le = pj_ellps; le->id ; ++le)
 
331
                    for (le = pj_get_ellps_ref(); le->id ; ++le)
327
332
                        (void)printf("%9s %-16s %-16s %s\n",
328
333
                                     le->id, le->major, le->ell, le->name);
329
334
                } else if (arg[1] == 'u') { /* list units */
330
335
                    struct PJ_UNITS *lu;
331
336
 
332
 
                    for (lu = pj_units; lu->id ; ++lu)
 
337
                    for (lu = pj_get_units_ref(); lu->id ; ++lu)
333
338
                        (void)printf("%12s %-20s %s\n",
334
339
                                     lu->id, lu->to_meter, lu->name);
335
340
                } else if (arg[1] == 'd') { /* list datums */
336
341
                    struct PJ_DATUMS *ld;
337
342
 
338
343
                    printf("__datum_id__ __ellipse___ __definition/comments______________________________\n" );
339
 
                    for (ld = pj_datums; ld->id ; ++ld)
 
344
                    for (ld = pj_get_datums_ref(); ld->id ; ++ld)
340
345
                    {
341
346
                        printf("%12s %-12s %-30s\n",
342
347
                               ld->id, ld->ellipse_id, ld->defn);
429
434
    } else
430
435
        proj = pj_fwd;
431
436
    if (cheby_str) {
432
 
        extern void gen_cheb(int, projUV(*)(), char *, PJ *, int, char **);
 
437
        extern void gen_cheb(int, projUV(*)(projUV), char *, PJ *, int, char **);
433
438
 
434
439
        gen_cheb(inverse, int_proj, cheby_str, Proj, iargc, iargv);
435
440
        exit(0);