Changeset 6565 for trunk/tools
- Timestamp:
- Aug 19, 2001, 4:04:44 PM (24 years ago)
- Location:
- trunk/tools/regedit
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/regedit/LICENSE.TXT
r3424 r6565 1 $Id: LICENSE.TXT,v 1. 1 2000-04-18 20:08:32sandervl Exp $1 $Id: LICENSE.TXT,v 1.2 2001-08-19 14:04:43 sandervl Exp $ 2 2 @c This is an additional Odin license agreement. 3 3 @c It supercedes the main Odin license, but is only valid in 4 4 @c the source directory in which it is present. 5 @c READ THE SECTION `WARRANTY' BELOW CAREFULLY FOR A STATEMENT ON THE WARRANTY.6 5 7 You may without charge, royalty or other payment, copy and 8 distribute copies of this work and derivative works of this work 9 in source or binary form provided that: (1) 10 you appropriately publish on each copy an appropriate copyright 11 notice; (2) faithfully reproduce all prior copyright notices 12 included in the original work (you may also add your own 13 copyright notice); and (3) agree to indemnify and hold all prior 14 authors, copyright holders and licensors of the work harmless 15 from and against all damages arising from use of the work. 16 17 You may distribute sources of derivative works of the work 18 provided that (1) (a) all source files of the original work that 19 have been modified, (b) all source files of the derivative work 20 that contain any party of the original work, and (c) all source 21 files of the derivative work that are necessary to compile, link 22 and run the derivative work without unresolved external calls and 23 with the same functionality of the original work (``Necessary 24 Sources'') carry a prominent notice explaining the nature and date 25 of the modification and/or creation. You are encouraged to make 26 the Necessary Sources available under this license in order to 27 further the development and acceptance of the work. 6 @c This file is processed by GNU's TeXinfo 7 @c If you modify it or move it to another location, make sure that 8 @c TeXinfo works (type `make' in directory documentation). 28 9 10 Copyright (c) 1993-2000 the Wine project authors (see the file AUTHORS 11 for a complete list) 29 12 30 WARRANTY: 13 Permission is hereby granted, free of charge, to any person obtaining a copy 14 of this software and associated documentation files (the "Software"), to deal 15 in the Software without restriction, including without limitation the rights 16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 copies of the Software, and to permit persons to whom the Software is 18 furnished to do so, subject to the following conditions: 31 19 32 EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED 33 WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING 34 BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A 35 PARTICULAR PURPOSE, MERCHANTABILITY OR TITLE. EXCEPT AS 36 OTHERWISE PROVIDED BY LAW, NO AUTHOR, COPYRIGHT HOLDER OR 37 LICENSOR SHALL BE LIABLE TO YOU FOR DAMAGES OF ANY KIND, EVEN IF 38 ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 20 The above copyright notice and this permission notice shall be included in 21 all copies or substantial portions of the Software. 22 23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 27 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 28 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -
trunk/tools/regedit/makefile
r4712 r6565 1 # $Id: makefile,v 1. 2 2000-12-02 23:27:03 birdExp $1 # $Id: makefile,v 1.3 2001-08-19 14:04:43 sandervl Exp $ 2 2 3 3 # … … 6 6 # Makefile for regedit.exe. 7 7 # 8 8 STACKSIZE = 0x10000 9 VIO = 1 10 EXETARGET = 1 9 11 10 12 # … … 62 64 # Target name - name of the exe without extention and path. 63 65 # 64 TARGET = reg edit66 TARGET = regapi 65 67 66 68 … … 71 73 72 74 73 74 75 #CFLAGS = -Q -Si -Ti -Tm+ -Ge- -Ss+ -W3 -Gm+ /Gn+ -I$(ODIN32_INCLUDE)\Win -D__WIN32OS2__ -DDEBUG -D__i386__76 #CXXFLAGS = -Q -Si -Ti -Tm+ -Ge- -Ss+ -W3 -Gm+ /Gn+ -I$(ODIN32_INCLUDE)\Win -D__WIN32OS2__ -DDEBUG -D__i386__77 #CFLAGS = $(CFLAGS) /Ge+ -I$(ODIN32_INCLUDE)78 #CXXFLAGS = $(CXXFLAGS) /Ge+ -I$(ODIN32_INCLUDE)79 #LDFLAGSEXE = $(LDFLAGS) /Ge+ /B"/pmtype:pm /stack:0x30000 /NOBASE /Map" \80 # $(EXTRA_LIBS) $(ODIN32_LIB)\kernel32.lib $(ODIN32_LIB)\user32.lib \81 # $(ODIN32_LIB)\gdi32.lib os2386.lib $(ODIN32_LIB)\odincrt.lib $(RTLLIB_O)82 83 # Build rule for EXE84 #$(PROJ).EXE: $(BASE_OBJS) $(PROJ_OBJS)85 # $(LD) $(LDFLAGSEXE) -Fe$@ $(PROJ_OBJS) $(BASE_OBJS)86 87 # Rules for cleaning out those old files88 #clean:89 # del *.bak *.pdb *.obj *.res *.exp *.map *.sbr *.bsc -
trunk/tools/regedit/regapi.c
r3424 r6565 9 9 10 10 #include <stdio.h> 11 #include < malloc.h>11 #include <stdlib.h> 12 12 #include <windows.h> 13 13 #include <winreg.h> … … 15 15 #include <winnt.h> 16 16 #include <string.h> 17 #include <shell.h>18 17 19 18 #ifdef __WIN32OS2__ … … 26 25 { 27 26 char *ret = strchr(*string, *token); 27 char *ret1; 28 28 29 29 if(ret) { … … 31 31 ret++; 32 32 (*string) = ret; 33 ret1 = strchr(ret, *token); 34 if(ret1) *ret1 = 0; 33 35 } 34 36 return ret; … … 121 123 122 124 /* 123 * currentsupported api125 * Currently supported api 124 126 */ 125 127 static const char* commandNames[COMMAND_COUNT] = { … … 160 162 161 163 /* 162 * Generic prototy es163 */ 164 static HKEYgetDataType(LPSTR *lpValue);164 * Generic prototypes 165 */ 166 static DWORD getDataType(LPSTR *lpValue); 165 167 static LPSTR getRegKeyName(LPSTR lpLine); 166 168 static HKEY getRegClass(LPSTR lpLine); … … 190 192 static char helpText[] = 191 193 "NAME\n" 192 " regapi - p rovide a command line interface tothe wine registry.\n"194 " regapi - perform certain actions on the wine registry.\n" 193 195 "\n" 194 196 "SYNOPSIS\n" … … 196 198 "\n" 197 199 "DESCRIPTION\n" 198 " regapi allows editing the wine registry. It processes the given\n" 199 " commandName for every line in the stdin data stream. Input data\n" 200 " format may vary depending on the commandName see INPUT FILE FORMAT.\n" 200 " regapi modifies settings in the wine registry. It processes\n" 201 " the given commandName for every line in the stdin data stream.\n" 202 " Input data format may vary depending on the commandName\n" 203 " (see INPUT FILE FORMAT).\n" 201 204 "\n" 202 205 "OPTIONS\n" … … 251 254 /****************************************************************************** 252 255 * This function returns the HKEY associated with the data type encoded in the 253 * value. It modif ythe input parameter (key value) in order to skip this256 * value. It modifies the input parameter (key value) in order to skip this 254 257 * "now useless" data type information. 255 258 */ 256 HKEYgetDataType(LPSTR *lpValue)259 DWORD getDataType(LPSTR *lpValue) 257 260 { 258 261 INT counter = 0; … … 305 308 /****************************************************************************** 306 309 * Extracts from a [HKEY/some/key/path] type of line the key class (what 307 * starts after the '[' and end before the first '\'310 * starts after the '[' and ends before the first '\' 308 311 */ 309 312 static HKEY getRegClass(LPSTR lpClass) … … 315 318 316 319 if (lpClass == NULL) 317 return ERROR_INVALID_PARAMETER;320 return (HKEY)ERROR_INVALID_PARAMETER; 318 321 319 322 strcpy(lpClassCopy, lpClass); 320 323 321 324 classNameEnd = strstr(lpClassCopy, "\\"); /* The class name end by '\' */ 322 if(classNameEnd) 323 *classNameEnd = '\0'; /* Isolate the class name */ 324 325 *classNameEnd = '\0'; /* Isolate the class name */ 325 326 classNameBeg = &lpClassCopy[1]; /* Skip the '[' */ 326 327 … … 336 337 return HKEY_CURRENT_USER; 337 338 else 338 return ERROR_INVALID_PARAMETER;339 return (HKEY)ERROR_INVALID_PARAMETER; 339 340 } 340 341 … … 615 616 /* Get the registry class */ 616 617 currentKeyClass = getRegClass(stdInput); /* Sets global variable */ 617 if (currentKeyClass == ERROR_INVALID_PARAMETER)618 return ERROR_INVALID_PARAMETER;618 if (currentKeyClass == (HKEY)ERROR_INVALID_PARAMETER) 619 return (HRESULT)ERROR_INVALID_PARAMETER; 619 620 620 621 /* Get the key name */ … … 642 643 } 643 644 /****************************************************************************** 644 * This function is a wrapper arroundthe setValue function. It prepares the645 * This function is a wrapper for the setValue function. It prepares the 645 646 * land and clean the area once completed. 646 647 */ … … 660 661 argv[counter]=NULL; 661 662 662 #ifdef __WIN32OS2__663 if(*cmdline == '"') cmdline++;664 argv[0] = cmdline;665 token = strsep(&cmdline, setValueDelim[argCounter]);666 if(token && *(token-2) == '"') {667 *(token-2) = 0;668 }669 argv[1] = getArg(token);670 #else671 663 while( (token = strsep(&cmdline, setValueDelim[argCounter])) != NULL ) 672 664 { … … 676 668 break; /* Stop processing args no matter what */ 677 669 } 678 #endif679 670 680 671 hRes = setValue(argv); … … 708 699 709 700 /****************************************************************************** 710 * This function is a wrapper arroundthe queryValue function. It prepares the701 * This function is a wrapper for the queryValue function. It prepares the 711 702 * land and clean the area once completed. 712 703 */ … … 1030 1021 1031 1022 /****************************************************************************** 1032 * MAIN - The main simply validatethe first parameter (command to perform)1033 * It then read the STDIN lines by lines forwarding their processing1023 * MAIN - WinMain simply validates the first parameter (command to perform) 1024 * It then reads the STDIN lines by lines forwarding their processing 1034 1025 * to the appropriate method. 1035 1026 */ 1036 int PASCAL WinMain (H ANDLE inst, HANDLE prev, LPSTR cmdline, int show)1027 int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) 1037 1028 { 1038 1029 LPSTR token = NULL; /* current token analized */
Note:
See TracChangeset
for help on using the changeset viewer.