Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/sys/src/cmd/bns/names.h

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


/*
 * Path names.
 */

typedef struct Name Name;

struct Name {
	// may be used from outside...
	char**	elems;	// element list, like in walk(5)
	int	nelems;	// # of used elems

	// implementation...
	int	aelems;	// # of allocated elems
	char*	base;	// memory for elements
	char*	end;	// end of allocated memory
	char*	ptr;	// ptr into end of used memory
};

Name*	n_new(void);
void	n_reset(Name*);
void	n_append(Name*, char*);
void	n_copy(Name* cn, Name* n);
int	n_eq(Name* n1, Name* n2);
void	n_free(Name*);
void	n_getpos(Name*, int* a, int* b);
void	n_setpos(Name*,	int a, int b);

int	namefmt(Fmt*);
#pragma     varargck    type  "N"   Name*

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].