File:  [CSRG BSD Unix] / 43BSD / contrib / B / src / bint / b2tar.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */

/*
  $Header: /var/lib/cvsd/repos/CSRG/43BSD/contrib/B/src/bint/b2tar.c,v 1.1.1.1 2018/04/24 16:12:54 root Exp $
*/

#include "b.h"
#include "b1obj.h"
#include "b2par.h"
#include "b2syn.h"
#include "b2nod.h"
#include "b3err.h"

Forward parsetree singtarg();

Visible parsetree targ(q) txptr q; {
	return collateral(q, singtarg);
}

Hidden parsetree singtarg(q) txptr q; {
	parsetree v; value t;
	skipsp(&tx);
	if (nothing(q, "target")) return NilTree;
	if (open_sign()) v= compound(q, targ);
	else if (is_tag(&t)) v= node2(TAG, t);
	else {
		parerr(MESS(2500, "no target where expected"));
		tx= q;
		return NilTree;
	}
	selection(q, &v);
	tar_trimmed_text(q, &v);
	upto(q, "target");
	return v;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.