[media] docs-rst: fix cross-references for videodev2.h
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 8 Sep 2016 09:41:26 +0000 (06:41 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 9 Sep 2016 12:57:23 +0000 (09:57 -0300)
commit56683d7dea0ecc3045b3041bc9071eb4fb72c4fb
tree45f574dca8b1c65fb2f8c4489050da88807ea385
parentbe831b34c2182731df77710e2fb8130060b1012f
[media] docs-rst: fix cross-references for videodev2.h

There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:

# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
41 files changed:
Documentation/media/uapi/v4l/buffer.rst
Documentation/media/uapi/v4l/field-order.rst
Documentation/media/uapi/v4l/hist-v4l2.rst
Documentation/media/uapi/v4l/pixfmt-002.rst
Documentation/media/uapi/v4l/pixfmt-003.rst
Documentation/media/uapi/v4l/pixfmt-006.rst
Documentation/media/uapi/v4l/planar-apis.rst
Documentation/media/uapi/v4l/subdev-formats.rst
Documentation/media/uapi/v4l/tuner.rst
Documentation/media/uapi/v4l/v4l2.rst
Documentation/media/uapi/v4l/vidioc-create-bufs.rst
Documentation/media/uapi/v4l/vidioc-cropcap.rst
Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst
Documentation/media/uapi/v4l/vidioc-dqevent.rst
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst
Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst
Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst
Documentation/media/uapi/v4l/vidioc-expbuf.rst
Documentation/media/uapi/v4l/vidioc-g-crop.rst
Documentation/media/uapi/v4l/vidioc-g-edid.rst
Documentation/media/uapi/v4l/vidioc-g-fbuf.rst
Documentation/media/uapi/v4l/vidioc-g-fmt.rst
Documentation/media/uapi/v4l/vidioc-g-frequency.rst
Documentation/media/uapi/v4l/vidioc-g-modulator.rst
Documentation/media/uapi/v4l/vidioc-g-parm.rst
Documentation/media/uapi/v4l/vidioc-g-selection.rst
Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst
Documentation/media/uapi/v4l/vidioc-g-tuner.rst
Documentation/media/uapi/v4l/vidioc-querycap.rst
Documentation/media/uapi/v4l/vidioc-queryctrl.rst
Documentation/media/uapi/v4l/vidioc-reqbufs.rst
Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst
Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-interval.rst
Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-size.rst
Documentation/media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst
Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst
Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst
Documentation/media/uapi/v4l/vidioc-subdev-g-frame-interval.rst
Documentation/media/uapi/v4l/vidioc-subdev-g-selection.rst
Documentation/media/videodev2.h.rst.exceptions