/* ** pmerge() - Portable replacement for fnmerge(), _makepath(), etc. ** ** Forms a full DOS pathname from drive, path, file, and extension ** specifications. ** ** Arguments: 1 - Buffer to receive full pathname ** 2 - Drive ** 3 - Path ** 4 - Name ** 5 - Extension ** ** Returns: Nothing ** ** public domain by Bob Stout */ #include #define LAST_CHAR(s) ((s)[strlen(s) - 1]) void pmerge(char *path, char *drive, char *dir, char *fname, char *ext) { *path = '\0'; if (drive && *drive) { strcat(path, drive); if (':' != LAST_CHAR(path)) strcat(path, ":"); } if (dir && *dir) { char *p; strcat(path, dir); for (p = path; *p; ++p) if ('/' == *p) *p = '\\'; if ('\\' != LAST_CHAR(path)) strcat(path, "\\"); } if (fname && *fname) { strcat(path, fname); if (ext && *ext) { if ('.' != *ext) strcat(path, "."); strcat(path, ext); } } } #ifdef TEST #include int main(int argc, char *argv[]) { char pathname[FILENAME_MAX]; pmerge(pathname, argv[1], argv[2], argv[3], argv[4]); printf("pmerge (%s, %s, %s, %s) returned:\n %s\n", argv[1], argv[2], argv[3], argv[4], pathname); } efs/?id=4586f1d067c73e1865d6e1af251fabe5334265cd'>refslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Santa <carlos.santa@intel.com>2016-08-17 12:30:53 -0700
committerRodrigo Vivi <rodrigo.vivi@intel.com>2016-09-07 16:07:09 -0700
commit4586f1d067c73e1865d6e1af251fabe5334265cd (patch)
tree580a6c641813be10afa2ac9cf7a8fc496cedb0f4
parente1a52536c20a75c56dcb8ceedf2d6b1c2b285e32 (diff)
drm/i915: Move HAS_LOGICAL_RING_CONTEXTS definition to platform
Moving all GPU features to the platform definition allows for - standard place when adding new features from new platforms - possible to see supported features when dumping struct definitions Signed-off-by: Carlos Santa <carlos.santa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h3
-rw-r--r--drivers/gpu/drm/i915/i915_pci.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h