b3eb964f476a95f2cfba3e0e71b1995812468999
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 */
22 #include <stdio.h>
23 #include <stdint.h>
24 #include <assert.h>
31 /* extract drive name */
37 }
41 /* search for end of string or stream separator */
43 end++;
45 /* search for begin of file extension */
50 }
54 ext++;
56 /* search for end of directory name */
59 p++;
61 }
68 }
75 }
76 }
80 }
83 #if 1
85 #else
88 }
89 #endif
90 }
96 }
102 }
108 }
112 }
116 }
121 }
126 }
131 {
134 }
136 }