<div dir="auto">So you want every file to have a modeline for every editor? Is there no way to do this at the directory level, like you can with emacs? I thought there was some editorconfig thing...</div><div class="gmail_extra"><br><div class="gmail_quote">On Dec 21, 2016 8:44 AM, "Thierry Reding" <<a href="mailto:thierry.reding@gmail.com">thierry.reding@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Thierry Reding <<a href="mailto:treding@nvidia.com">treding@nvidia.com</a>><br>
<br>
Add a vim modeline that defines the identation style used in this file.<br>
This is useful to avoid vim's defaults (8-column tabs) from getting in<br>
the way.<br>
<br>
While at it, fix up a few cases where inconsistent indentation is used.<br>
<br>
Signed-off-by: Thierry Reding <<a href="mailto:treding@nvidia.com">treding@nvidia.com</a>><br>
---<br>
src/loader/loader.c | 28 +++++++++++++++-------------<br>
1 file changed, 15 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/src/loader/loader.c b/src/loader/loader.c<br>
index 449ff54d1377..eb536ac970f9 100644<br>
--- a/src/loader/loader.c<br>
+++ b/src/loader/loader.c<br>
@@ -86,9 +86,9 @@ loader_open_device(const char *device_name)<br>
#ifdef USE_DRICONF<br>
static const char __driConfigOptionsLoader[] =<br>
DRI_CONF_BEGIN<br>
- DRI_CONF_SECTION_<wbr>INITIALIZATION<br>
- DRI_CONF_DEVICE_ID_PATH_TAG()<br>
- DRI_CONF_SECTION_END<br>
+ DRI_CONF_SECTION_<wbr>INITIALIZATION<br>
+ DRI_CONF_DEVICE_ID_PATH_TAG()<br>
+ DRI_CONF_SECTION_END<br>
DRI_CONF_END;<br>
<br>
static char *loader_get_dri_config_device_<wbr>id(void)<br>
@@ -115,13 +115,13 @@ static char *drm_construct_id_path_tag(<wbr>drmDevicePtr device)<br>
char *tag = NULL;<br>
<br>
if (device->bustype == DRM_BUS_PCI) {<br>
- tag = calloc(PCI_ID_PATH_TAG_LENGTH, sizeof(char));<br>
- if (tag == NULL)<br>
- return NULL;<br>
+ tag = calloc(PCI_ID_PATH_TAG_LENGTH, sizeof(char));<br>
+ if (tag == NULL)<br>
+ return NULL;<br>
<br>
- snprintf(tag, PCI_ID_PATH_TAG_LENGTH, "pci-%04x_%02x_%02x_%1u",<br>
- device->businfo.pci->domain, device->businfo.pci->bus,<br>
- device->businfo.pci->dev, device->businfo.pci->func);<br>
+ snprintf(tag, PCI_ID_PATH_TAG_LENGTH, "pci-%04x_%02x_%02x_%1u",<br>
+ device->businfo.pci->domain, device->businfo.pci->bus,<br>
+ device->businfo.pci->dev, device->businfo.pci->func);<br>
}<br>
return tag;<br>
}<br>
@@ -386,8 +386,8 @@ loader_get_driver_for_fd(int fd)<br>
<br>
out:<br>
log_(driver ? _LOADER_DEBUG : _LOADER_WARNING,<br>
- "pci id for fd %d: %04x:%04x, driver %s\n",<br>
- fd, vendor_id, chip_id, driver);<br>
+ "pci id for fd %d: %04x:%04x, driver %s\n",<br>
+ fd, vendor_id, chip_id, driver);<br>
return driver;<br>
}<br>
<br>
@@ -415,9 +415,11 @@ loader_get_extensions_name(<wbr>const char *driver_name)<br>
<br>
const size_t len = strlen(name);<br>
for (size_t i = 0; i < len; i++) {<br>
- if (name[i] == '-')<br>
- name[i] = '_';<br>
+ if (name[i] == '-')<br>
+ name[i] = '_';<br>
}<br>
<br>
return name;<br>
}<br>
+<br>
+/* vim: set et sts=3 sw=3 ts=3: */<br>
<font color="#888888">--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br></div>