2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-29 13:28:01 +00:00

The sensors.conf file syntax currently allows for octal escape sequences, which

nobody uses. This feature is not even mentioned in the sensors.conf man page.
Kill it.



git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4797 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark M. Hoffman 2007-09-16 15:47:16 +00:00
parent 91866b3ea1
commit fb362daf8d

View File

@ -74,10 +74,6 @@ FLOAT [[:digit:]]*\.?[[:digit:]]+
NUM 0|([1-9][[:digit:]]*) NUM 0|([1-9][[:digit:]]*)
/* Only number between 1 and 255, octally represented. */
OCTESC (1[0-7]{0,2})|([2-7][0-7]?)|(0[1-7][0-7]?)|(00[1-7])
%% %%
@ -311,26 +307,12 @@ ignore{BLANK}* {
\\t buffer_add_char("\t"); \\t buffer_add_char("\t");
\\v buffer_add_char("\v"); \\v buffer_add_char("\v");
/* We can't support \0, this would cause havoc! */
\\{OCTESC} {
int res;
sscanf(sensors_yytext+1,"%o",&res);
buffer_add_char(&res);
}
/* Other escapes: just copy the character behind the slash */ /* Other escapes: just copy the character behind the slash */
\\. { \\. {
buffer_add_char(&sensors_yytext[1]); buffer_add_char(&sensors_yytext[1]);
} }
/* This prevents backing up; it is otherwise purely redundant */
\\00 {
buffer_add_char("00");
}
/* Anything else (including a bare '\' which may be followed by EOF) */ /* Anything else (including a bare '\' which may be followed by EOF) */
\\ | \\ |