1 /*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18 /* clang-format off */
19
20 /* getfileinfoqq3f.c - Implements DFLIB getfileinfoqq subprogram. */
21 #if defined(WIN64) || defined(WIN32)
22 #include <windows.h>
23 #endif
24 #include <string.h>
25 #include <stdlib.h>
26 /* must include ent3f.h AFTER io3f.h */
27 #include "io3f.h"
28 #include "ent3f.h"
29
30 #if defined(WIN64) || defined(WIN32)
31 extern char *__fstr2cstr();
32 extern void __GetTimeToSecondsSince1970(ULARGE_INTEGER *fileTime,
33 unsigned int *out);
34 extern int __GETFILEINFOQQ(DCHAR(ffiles), char *buffer,
35 int *handle DCLEN(ffiles));
36
ENT3F(GETFILEINFOQQ,getfileinfoqq)37 int ENT3F(GETFILEINFOQQ, getfileinfoqq)(DCHAR(ffiles), char *buffer,
38 int *handle DCLEN(ffiles))
39 {
40 return __GETFILEINFOQQ(CADR(ffiles), buffer, handle, CLEN(ffiles));
41 }
42 #else
ENT3F(GETFILEINFOQQ,getfileinfoqq)43 int ENT3F(GETFILEINFOQQ, getfileinfoqq)(DCHAR(ffiles), int *buffer,
44 int *handle DCLEN(ffiles))
45 {
46 fprintf(__io_stderr(), "getfileinfoqq() not implemented on this target\n");
47 return 0;
48 }
49
50 #endif
51