Deleted Added
full compact
token.l (147874) token.l (177483)
1%{
2/*-
3 * DEVD (Device action daemon)
4 *
5 * Copyright (c) 2002 M. Warner Losh <imp@freebsd.org>.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1%{
2/*-
3 * DEVD (Device action daemon)
4 *
5 * Copyright (c) 2002 M. Warner Losh <imp@freebsd.org>.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sbin/devd/token.l 147874 2005-07-10 03:37:15Z imp $
29 * $FreeBSD: head/sbin/devd/token.l 177483 2008-03-21 20:38:28Z imp $
30 */
31
32#include <ctype.h>
33#include <stdlib.h>
34#include <string.h>
35#include <syslog.h>
36#include "devd.h"
37#include "y.tab.h"

--- 18 unchanged lines hidden (view full) ---

56; { return SEMICOLON; }
57#.*$ ;
58\/\/.*$ ;
59\/\*([^*]|(\*+([^*\/])))*\*+\/ { update_lineno(yytext); }
60\{ { return BEGINBLOCK; }
61\} { return ENDBLOCK; }
62[0-9]+ { yylval.i = atoi(yytext); return NUMBER; }
63\"[^"]+\" {
30 */
31
32#include <ctype.h>
33#include <stdlib.h>
34#include <string.h>
35#include <syslog.h>
36#include "devd.h"
37#include "y.tab.h"

--- 18 unchanged lines hidden (view full) ---

56; { return SEMICOLON; }
57#.*$ ;
58\/\/.*$ ;
59\/\*([^*]|(\*+([^*\/])))*\*+\/ { update_lineno(yytext); }
60\{ { return BEGINBLOCK; }
61\} { return ENDBLOCK; }
62[0-9]+ { yylval.i = atoi(yytext); return NUMBER; }
63\"[^"]+\" {
64 update_lineno(yytext);
65 int len = strlen(yytext) - 2;
66 char *walker;
67 int i;
64 int len = strlen(yytext) - 2;
65 char *walker;
66 int i;
67 update_lineno(yytext);
68 if ((yylval.str = (char *) malloc(len + 1)) == NULL)
69 goto out;
70 walker = yylval.str;
71 for (i = 1; i <= len; i++) {
72 if (yytext[i] == '\\' &&
73 yytext[i + 1] == '\n') {
74 i += 2;
75 while(isspace(yytext[i]))

--- 35 unchanged lines hidden ---
68 if ((yylval.str = (char *) malloc(len + 1)) == NULL)
69 goto out;
70 walker = yylval.str;
71 for (i = 1; i <= len; i++) {
72 if (yytext[i] == '\\' &&
73 yytext[i + 1] == '\n') {
74 i += 2;
75 while(isspace(yytext[i]))

--- 35 unchanged lines hidden ---