Changeset 6565 for trunk/tools


Ignore:
Timestamp:
Aug 19, 2001, 4:04:44 PM (24 years ago)
Author:
sandervl
Message:

updates

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:32 sandervl Exp $
     1$Id: LICENSE.TXT,v 1.2 2001-08-19 14:04:43 sandervl Exp $
    22@c This is an additional Odin license agreement.
    33@c It supercedes the main Odin license, but is only valid in
    44@c the source directory in which it is present.
    5 @c READ THE SECTION `WARRANTY' BELOW CAREFULLY FOR A STATEMENT ON THE WARRANTY.
    65
    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).
    289
     10Copyright (c) 1993-2000 the Wine project authors (see the file AUTHORS
     11for a complete list)
    2912
    30 WARRANTY:
     13Permission is hereby granted, free of charge, to any person obtaining a copy
     14of this software and associated documentation files (the "Software"), to deal
     15in the Software without restriction, including without limitation the rights
     16to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     17copies of the Software, and to permit persons to whom the Software is
     18furnished to do so, subject to the following conditions:
    3119
    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.
     20The above copyright notice and this permission notice shall be included in
     21all copies or substantial portions of the Software.
     22
     23THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     24IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     25FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
     26COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
     27IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
     28CONNECTION 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 bird Exp $
     1# $Id: makefile,v 1.3 2001-08-19 14:04:43 sandervl Exp $
    22
    33#
     
    66#       Makefile for regedit.exe.
    77#
    8 
     8STACKSIZE = 0x10000
     9VIO = 1
     10EXETARGET = 1
    911
    1012#
     
    6264# Target name - name of the exe without extention and path.
    6365#
    64 TARGET = regedit
     66TARGET = regapi
    6567
    6668
     
    7173
    7274
    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 EXE
    84 #$(PROJ).EXE: $(BASE_OBJS) $(PROJ_OBJS)
    85 #        $(LD) $(LDFLAGSEXE) -Fe$@ $(PROJ_OBJS) $(BASE_OBJS)
    86 
    87 # Rules for cleaning out those old files
    88 #clean:
    89 #    del *.bak *.pdb *.obj *.res *.exp *.map *.sbr *.bsc
  • trunk/tools/regedit/regapi.c

    r3424 r6565  
    99
    1010#include <stdio.h>
    11 #include <malloc.h>
     11#include <stdlib.h>
    1212#include <windows.h>
    1313#include <winreg.h>
     
    1515#include <winnt.h>
    1616#include <string.h>
    17 #include <shell.h>
    1817
    1918#ifdef __WIN32OS2__
     
    2625{
    2726  char *ret = strchr(*string, *token);
     27  char *ret1;
    2828
    2929   if(ret) {
     
    3131        ret++;
    3232        (*string) = ret;
     33        ret1 = strchr(ret, *token);
     34        if(ret1) *ret1 = 0;
    3335   }
    3436   return ret;
     
    121123
    122124/*
    123  * current supported api
     125 * Currently supported api
    124126 */
    125127static const char* commandNames[COMMAND_COUNT] = {
     
    160162
    161163/*
    162  * Generic prototyes
    163  */
    164 static HKEY    getDataType(LPSTR *lpValue);
     164 * Generic prototypes
     165 */
     166static DWORD   getDataType(LPSTR *lpValue);
    165167static LPSTR   getRegKeyName(LPSTR lpLine);
    166168static HKEY    getRegClass(LPSTR lpLine);
     
    190192static char helpText[] =
    191193"NAME\n"
    192 "          regapi - provide a command line interface to the wine registry.\n"
     194"          regapi - perform certain actions on the wine registry.\n"
    193195"\n"
    194196"SYNOPSIS\n"
     
    196198"\n"
    197199"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"
    201204"\n"
    202205"OPTIONS\n"
     
    251254/******************************************************************************
    252255 * This function returns the HKEY associated with the data type encoded in the
    253  * value.  It modify the input parameter (key value) in order to skip this
     256 * value.  It modifies the input parameter (key value) in order to skip this
    254257 * "now useless" data type information.
    255258 */
    256 HKEY getDataType(LPSTR *lpValue)
     259DWORD getDataType(LPSTR *lpValue)
    257260{
    258261  INT   counter  = 0;
     
    305308/******************************************************************************
    306309 * 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 '\'
    308311 */
    309312static HKEY getRegClass(LPSTR lpClass)
     
    315318 
    316319  if (lpClass == NULL)
    317     return ERROR_INVALID_PARAMETER;
     320    return (HKEY)ERROR_INVALID_PARAMETER;
    318321
    319322  strcpy(lpClassCopy, lpClass);
    320323
    321324  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 */
    325326  classNameBeg  = &lpClassCopy[1];            /* Skip the '[' */
    326327 
     
    336337    return  HKEY_CURRENT_USER;
    337338  else
    338     return ERROR_INVALID_PARAMETER;
     339    return (HKEY)ERROR_INVALID_PARAMETER;
    339340}
    340341
     
    615616  /* Get the registry class */
    616617  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;
    619620
    620621  /* Get the key name */
     
    642643}
    643644/******************************************************************************
    644  * This function is a wrapper arround the setValue function.  It prepares the
     645 * This function is a wrapper for the setValue function.  It prepares the
    645646 * land and clean the area once completed.
    646647 */
     
    660661    argv[counter]=NULL;
    661662
    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 #else
    671663  while( (token = strsep(&cmdline, setValueDelim[argCounter])) != NULL )
    672664  {
     
    676668      break;  /* Stop processing args no matter what */
    677669  }
    678 #endif
    679670
    680671  hRes = setValue(argv);
     
    708699
    709700/******************************************************************************
    710  * This function is a wrapper arround the queryValue function.  It prepares the
     701 * This function is a wrapper for the queryValue function.  It prepares the
    711702 * land and clean the area once completed.
    712703 */
     
    10301021
    10311022/******************************************************************************
    1032  * MAIN - The main simply validate the first parameter (command to perform)
    1033  *        It then read the STDIN lines by lines forwarding their processing
     1023 * MAIN - WinMain simply validates the first parameter (command to perform)
     1024 *        It then reads the STDIN lines by lines forwarding their processing
    10341025 *        to the appropriate method.
    10351026 */
    1036 int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show)
     1027int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
    10371028{
    10381029  LPSTR  token          = NULL;  /* current token analized */
Note: See TracChangeset for help on using the changeset viewer.