eval.c (291128) | eval.c (298879) |
---|---|
1/* $OpenBSD: eval.c,v 1.74 2015/02/05 12:59:57 millert Exp $ */ 2/* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ 3 4/* 5 * Copyright (c) 1989, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> | 1/* $OpenBSD: eval.c,v 1.74 2015/02/05 12:59:57 millert Exp $ */ 2/* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ 3 4/* 5 * Copyright (c) 1989, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 20 unchanged lines hidden (view full) --- 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/usr.bin/m4/eval.c 291128 2015-11-21 11:05:38Z bapt $"); | 37__FBSDID("$FreeBSD: head/usr.bin/m4/eval.c 298879 2016-05-01 16:13:05Z pfg $"); |
38 39 40/* 41 * eval.c 42 * Facility: m4 macro processor 43 * by: oz 44 */ 45 --- 844 unchanged lines hidden (view full) --- 890 * map: 891 * map every character of s1 that is specified in from 892 * into s3 and replace in s. (source s1 remains untouched) 893 * 894 * This is derived from the a standard implementation of map(s,from,to) 895 * function of ICON language. Within mapvec, we replace every character 896 * of "from" with the corresponding character in "to". 897 * If "to" is shorter than "from", than the corresponding entries are null, | 38 39 40/* 41 * eval.c 42 * Facility: m4 macro processor 43 * by: oz 44 */ 45 --- 844 unchanged lines hidden (view full) --- 890 * map: 891 * map every character of s1 that is specified in from 892 * into s3 and replace in s. (source s1 remains untouched) 893 * 894 * This is derived from the a standard implementation of map(s,from,to) 895 * function of ICON language. Within mapvec, we replace every character 896 * of "from" with the corresponding character in "to". 897 * If "to" is shorter than "from", than the corresponding entries are null, |
898 * which means that those characters dissapear altogether. | 898 * which means that those characters disappear altogether. |
899 */ 900static void 901map(char *dest, const char *src, const char *from, const char *to) 902{ 903 const char *tmp; 904 unsigned char sch, dch; 905 static char frombis[257]; 906 static char tobis[257]; --- 108 unchanged lines hidden --- | 899 */ 900static void 901map(char *dest, const char *src, const char *from, const char *to) 902{ 903 const char *tmp; 904 unsigned char sch, dch; 905 static char frombis[257]; 906 static char tobis[257]; --- 108 unchanged lines hidden --- |