scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#include <stdio.h>
 2#include <string.h>
 3
 4#include <scc/mach.h>
 5
 6#include "libmach.h"
 7
 8int
 9findsec(Map *map, char *name)
10{
11	int i;
12	Mapsec *sec;
13
14	for (i = 0; i < map->nsec; i++) {
15		char *s = map->sec[i].sec.name;
16		if (s && strcmp(s, name) == 0)
17			return i;
18	}
19
20	return -1;
21}