unoinfo.cxx (2722cedd) | unoinfo.cxx (a96a8d21) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 52 unchanged lines hidden (view full) --- 61 wchar_t const * backBegin, std::size_t backLength) 62{ 63 wchar_t path[MAX_PATH]; 64 wchar_t * end = tools::buildPath( 65 path, frontBegin, frontEnd, backBegin, backLength); 66 if (end == NULL) { 67 exit(EXIT_FAILURE); 68 } | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 52 unchanged lines hidden (view full) --- 61 wchar_t const * backBegin, std::size_t backLength) 62{ 63 wchar_t path[MAX_PATH]; 64 wchar_t * end = tools::buildPath( 65 path, frontBegin, frontEnd, backBegin, backLength); 66 if (end == NULL) { 67 exit(EXIT_FAILURE); 68 } |
69 std::size_t n = (end - path) * sizeof (wchar_t); 70 if (fwrite(path, 1, n, stdout) != n) { 71 exit(EXIT_FAILURE); 72 } | 69 fprintf(stdout, "%S", path); |
73} 74 75} 76 77#ifdef __MINGW32__ 78int main(int argc, char ** argv, char **) { 79 if (argc == 2 && strcmp(argv[1], "c++") == 0) { 80#else 81int wmain(int argc, wchar_t ** argv, wchar_t **) { 82 if (argc == 2 && wcscmp(argv[1], L"c++") == 0) { 83#endif 84 wchar_t path[MAX_PATH]; 85 wchar_t * pathEnd = getBrandPath(path); | 70} 71 72} 73 74#ifdef __MINGW32__ 75int main(int argc, char ** argv, char **) { 76 if (argc == 2 && strcmp(argv[1], "c++") == 0) { 77#else 78int wmain(int argc, wchar_t ** argv, wchar_t **) { 79 if (argc == 2 && wcscmp(argv[1], L"c++") == 0) { 80#endif 81 wchar_t path[MAX_PATH]; 82 wchar_t * pathEnd = getBrandPath(path); |
86 if (tools::buildPath(path, path, pathEnd, MY_STRING(L"..\\basis-link")) 87 == NULL) 88 { 89 exit(EXIT_FAILURE); 90 } 91 pathEnd = tools::resolveLink(path); 92 if (pathEnd == NULL || 93 (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\ure-link")) == 94 NULL)) 95 { 96 exit(EXIT_FAILURE); 97 } 98 pathEnd = tools::resolveLink(path); | 83 |
99 if (pathEnd == NULL) { 100 exit(EXIT_FAILURE); 101 } | 84 if (pathEnd == NULL) { 85 exit(EXIT_FAILURE); 86 } |
102 writePath(path, pathEnd, MY_STRING(L"\\bin")); | 87 88 writePath(path, pathEnd, MY_STRING(L"")); |
103#ifdef __MINGW32__ 104 } else if (argc == 2 && strcmp(argv[1], "java") == 0) { 105#else 106 } else if (argc == 2 && wcscmp(argv[1], L"java") == 0) { 107#endif 108 if (fwrite("1", 1, 1, stdout) != 1) { 109 exit(EXIT_FAILURE); 110 } 111 wchar_t path[MAX_PATH]; 112 wchar_t * pathEnd = getBrandPath(path); 113 writePath(path, pathEnd, MY_STRING(L"")); | 89#ifdef __MINGW32__ 90 } else if (argc == 2 && strcmp(argv[1], "java") == 0) { 91#else 92 } else if (argc == 2 && wcscmp(argv[1], L"java") == 0) { 93#endif 94 if (fwrite("1", 1, 1, stdout) != 1) { 95 exit(EXIT_FAILURE); 96 } 97 wchar_t path[MAX_PATH]; 98 wchar_t * pathEnd = getBrandPath(path); 99 writePath(path, pathEnd, MY_STRING(L"")); |
114 if (tools::buildPath(path, path, pathEnd, MY_STRING(L"..\\basis-link")) 115 == NULL) 116 { 117 exit(EXIT_FAILURE); 118 } 119 pathEnd = tools::resolveLink(path); | |
120 if (pathEnd == NULL) { 121 exit(EXIT_FAILURE); 122 } 123 writeNull(); | 100 if (pathEnd == NULL) { 101 exit(EXIT_FAILURE); 102 } 103 writeNull(); |
124 writePath(path, pathEnd, MY_STRING(L"\\program\\classes\\unoil.jar")); 125 if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\ure-link")) == 126 NULL) 127 { 128 exit(EXIT_FAILURE); 129 } 130 pathEnd = tools::resolveLink(path); 131 if (pathEnd == NULL) { 132 exit(EXIT_FAILURE); 133 } | 104 writePath(path, pathEnd, MY_STRING(L"classes\\unoil.jar")); |
134 writeNull(); | 105 writeNull(); |
135 writePath(path, pathEnd, MY_STRING(L"\\java\\ridl.jar")); | 106 writePath(path, pathEnd, MY_STRING(L"\classes\\ridl.jar")); |
136 writeNull(); | 107 writeNull(); |
137 writePath(path, pathEnd, MY_STRING(L"\\java\\jurt.jar")); | 108 writePath(path, pathEnd, MY_STRING(L"classes\\jurt.jar")); |
138 writeNull(); | 109 writeNull(); |
139 writePath(path, pathEnd, MY_STRING(L"\\java\\juh.jar")); | 110 writePath(path, pathEnd, MY_STRING(L"classes\\juh.jar")); |
140 } else { 141 exit(EXIT_FAILURE); 142 } 143 exit(EXIT_SUCCESS); 144} | 111 } else { 112 exit(EXIT_FAILURE); 113 } 114 exit(EXIT_SUCCESS); 115} |