property.c (779092a489af71ac21d78870132207e85f59224a) property.c (33a155e400ad53ef923e902dad4881909677f005)
1/*
2 *
3 * Simple property list handling code.
4 *
5 * Copyright (c) 1998
6 * Jordan Hubbard. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

85 if (state != COMMIT) {
86 if (bp == max)
87 state = FILL;
88 else
89 ch = buf[bp++];
90 }
91 switch(state) {
92 case FILL:
1/*
2 *
3 * Simple property list handling code.
4 *
5 * Copyright (c) 1998
6 * Jordan Hubbard. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

85 if (state != COMMIT) {
86 if (bp == max)
87 state = FILL;
88 else
89 ch = buf[bp++];
90 }
91 switch(state) {
92 case FILL:
93 if ((max = read(fd, buf, sizeof buf)) <= 0) {
93 if ((max = read(fd, buf, sizeof buf)) < 0) {
94 properties_free(head);
95 return (NULL);
96 }
97 if (max == 0) {
94 state = STOP;
95 break;
98 state = STOP;
99 break;
96 }
97 else {
100 } else {
98 state = LOOK;
99 ch = buf[0];
100 bp = 1;
101 }
102 /* FALLTHROUGH deliberately since we already have a character and state == LOOK */
103
104 case LOOK:
105 if (isspace((unsigned char)ch))

--- 141 unchanged lines hidden ---
101 state = LOOK;
102 ch = buf[0];
103 bp = 1;
104 }
105 /* FALLTHROUGH deliberately since we already have a character and state == LOOK */
106
107 case LOOK:
108 if (isspace((unsigned char)ch))

--- 141 unchanged lines hidden ---