summaryrefslogtreecommitdiffstats
path: root/Documentation/media/uapi/rc
diff options
context:
space:
mode:
authorMauro Carvalho Chehab2016-07-13 13:43:30 +0200
committerMauro Carvalho Chehab2016-07-13 13:43:30 +0200
commit8968da9b8622f2da9b7f0a695acbe341ea28f55e (patch)
tree8ea0037207dd445a512abc4d72d90a8b29255da5 /Documentation/media/uapi/rc
parent[media] doc-rst: update CEC_RECEIVE (diff)
downloadkernel-qcow2-linux-8968da9b8622f2da9b7f0a695acbe341ea28f55e.tar.gz
kernel-qcow2-linux-8968da9b8622f2da9b7f0a695acbe341ea28f55e.tar.xz
kernel-qcow2-linux-8968da9b8622f2da9b7f0a695acbe341ea28f55e.zip
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 ffbab694ede33c294e5864a5e0bf4d1474446a71.
Diffstat (limited to 'Documentation/media/uapi/rc')
-rw-r--r--Documentation/media/uapi/rc/keytable.c.rst42
1 files changed, 21 insertions, 21 deletions
diff --git a/Documentation/media/uapi/rc/keytable.c.rst b/Documentation/media/uapi/rc/keytable.c.rst
index 5ee6e8c6639d..e6ce1e3f5a78 100644
--- a/Documentation/media/uapi/rc/keytable.c.rst
+++ b/Documentation/media/uapi/rc/keytable.c.rst
@@ -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);
}
}