comparison lib/progreloc.c @ 5164:773a21466082

Rename FILESYSTEM_PREFIX_LEN.
author Bruno Haible <bruno@clisp.org>
date Sun, 08 Aug 2004 16:53:10 +0000
parents eebff8c51a9b
children b084a75dc8bc
comparison
equal deleted inserted replaced
5163:b8139e37c5bd 5164:773a21466082
1 /* Provide relocatable programs. 1 /* Provide relocatable programs.
2 Copyright (C) 2003 Free Software Foundation, Inc. 2 Copyright (C) 2003-2004 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2003. 3 Written by Bruno Haible <bruno@clisp.org>, 2003.
4 4
5 This program is free software; you can redistribute it and/or modify it 5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published 6 under the terms of the GNU Library General Public License as published
7 by the Free Software Foundation; either version 2, or (at your option) 7 by the Free Software Foundation; either version 2, or (at your option)
65 # define HAS_DEVICE(P) \ 65 # define HAS_DEVICE(P) \
66 ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ 66 ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
67 && (P)[1] == ':') 67 && (P)[1] == ':')
68 # define IS_PATH_WITH_DIR(P) \ 68 # define IS_PATH_WITH_DIR(P) \
69 (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) 69 (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
70 # define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) 70 # define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
71 #else 71 #else
72 /* Unix */ 72 /* Unix */
73 # define ISSLASH(C) ((C) == '/') 73 # define ISSLASH(C) ((C) == '/')
74 # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) 74 # define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
75 # define FILESYSTEM_PREFIX_LEN(P) 0 75 # define FILE_SYSTEM_PREFIX_LEN(P) 0
76 #endif 76 #endif
77 77
78 #undef set_program_name 78 #undef set_program_name
79 79
80 80