Revert "[media] docs-rst: escape [] characters"

This patch touches on places where it shouldn't: image
files and code examples. Also, it doesn't fix all array
occurrences.

So, let's revert it.

This reverts commit ffbab694ed.
This commit is contained in:
Mauro Carvalho Chehab
2016-07-13 08:43:30 -03:00
parent d2cd627be0
commit 8968da9b86
68 changed files with 188 additions and 188 deletions

View File

@@ -35,16 +35,16 @@ file: uapi/v4l/keytable.c
struct parse_key *p;
for (p=keynames;p->name!=NULL;p++) {
if (p->value == (unsigned)codes\[1\]) {
printf("scancode 0x%04x = %s (0x%02x)\\n", codes\[0\], p->name, codes\[1\]);
if (p->value == (unsigned)codes[1]) {
printf("scancode 0x%04x = %s (0x%02x)\\n", codes[0], p->name, codes[1]);
return;
}
}
if (isprint (codes\[1\]))
printf("scancode %d = '%c' (0x%02x)\\n", codes\[0\], codes\[1\], codes\[1\]);
if (isprint (codes[1]))
printf("scancode %d = '%c' (0x%02x)\\n", codes[0], codes[1], codes[1]);
else
printf("scancode %d = 0x%02x\\n", codes\[0\], codes\[1\]);
printf("scancode %d = 0x%02x\\n", codes[0], codes[1]);
}
int parse_code(char *string)
@@ -63,7 +63,7 @@ file: uapi/v4l/keytable.c
{
int fd;
unsigned int i, j;
int codes\[2\];
int codes[2];
if (argc<2 || argc>4) {
printf ("usage: %s <device> to get table; or\\n"
@@ -72,7 +72,7 @@ file: uapi/v4l/keytable.c
return -1;
}
if ((fd = open(argv\[1\], O_RDONLY)) < 0) {
if ((fd = open(argv[1], O_RDONLY)) < 0) {
perror("Couldn't open input device");
return(-1);
}
@@ -80,16 +80,16 @@ file: uapi/v4l/keytable.c
if (argc==4) {
int value;
value=parse_code(argv\[3\]);
value=parse_code(argv[3]);
if (value==-1) {
value = strtol(argv\[3\], NULL, 0);
value = strtol(argv[3], NULL, 0);
if (errno)
perror("value");
}
codes \[0\] = (unsigned) strtol(argv\[2\], NULL, 0);
codes \[1\] = (unsigned) value;
codes [0] = (unsigned) strtol(argv[2], NULL, 0);
codes [1] = (unsigned) value;
if(ioctl(fd, EVIOCSKEYCODE, codes))
perror ("EVIOCSKEYCODE");
@@ -102,9 +102,9 @@ file: uapi/v4l/keytable.c
if (argc==3) {
FILE *fin;
int value;
char *scancode, *keycode, s\[2048\];
char *scancode, *keycode, s[2048];
fin=fopen(argv\[2\],"r");
fin=fopen(argv[2],"r");
if (fin==NULL) {
perror ("opening keycode file");
return -1;
@@ -113,8 +113,8 @@ file: uapi/v4l/keytable.c
/* Clears old table */
for (j = 0; j < 256; j++) {
for (i = 0; i < 256; i++) {
codes\[0\] = (j << 8) | i;
codes\[1\] = KEY_RESERVED;
codes[0] = (j << 8) | i;
codes[1] = KEY_RESERVED;
ioctl(fd, EVIOCSKEYCODE, codes);
}
}
@@ -149,12 +149,12 @@ file: uapi/v4l/keytable.c
perror("value");
}
codes \[0\] = (unsigned) strtol(scancode, NULL, 0);
codes \[1\] = (unsigned) value;
codes [0] = (unsigned) strtol(scancode, NULL, 0);
codes [1] = (unsigned) value;
// printf("\\t%04x=%04x\\n",codes\[0\], codes\[1\]);
// printf("\\t%04x=%04x\\n",codes[0], codes[1]);
if(ioctl(fd, EVIOCSKEYCODE, codes)) {
fprintf(stderr, "Setting scancode 0x%04x with 0x%04x via ",codes\[0\], codes\[1\]);
fprintf(stderr, "Setting scancode 0x%04x with 0x%04x via ",codes[0], codes[1]);
perror ("EVIOCSKEYCODE");
}
@@ -167,8 +167,8 @@ file: uapi/v4l/keytable.c
/* Get scancode table */
for (j = 0; j < 256; j++) {
for (i = 0; i < 256; i++) {
codes\[0\] = (j << 8) | i;
if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes\[1\] != KEY_RESERVED)
codes[0] = (j << 8) | i;
if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
prtcode(codes);
}
}