Plan 9 from Bell Labs’s /usr/web/sources/contrib/tristan/root/sys/src/cmd/geo/proj/proj.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <u.h>
#include <libc.h>

#include "project.h"

static struct {
	int (*init)(projection*, elliptic*, char*);
	char *name, *description;
} proj_list[] = {
	tmin,	"tm",	"Transverse Mercator",
	utmin,	"utm", "Universal Transverse Mercator",
};

int
get_projection(projection *p, char *name) {
	int i, m;

	if(name==nil) return 0;

	m = sizeof(proj_list)/sizeof(*proj_list);
	for(i=0;i<m;i++)
		if(!strcmp(name, proj_list[i].name)) break;
	if(i==m) return 0;

	p->description = proj_list[i].description;
	p->init = proj_list[i].init;

	return 1;
};

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.