1 /* Copyright (C) 1996-1997 Aleksey Volynskov
2 * Copyright (C) 2011 Rambo
3 * Copyright (C) 2020 SovietPony
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License ONLY.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
23 #include <stdio.h>
24 #include <stdint.h>
25 #include <assert.h>
32 /* extract drive name */
38 }
42 /* search for end of string or stream separator */
44 end++;
46 /* search for begin of file extension */
51 }
55 ext++;
57 /* search for end of directory name */
60 p++;
62 }
69 }
76 }
77 }
81 }
84 #if 1
86 #else
89 }
90 #endif
91 }
97 }
103 }
109 }
113 }
117 }
122 }
127 }
132 {
135 }
137 }