Changeset 9407 for trunk/src


Ignore:
Timestamp:
Nov 13, 2002, 1:17:19 PM (23 years ago)
Author:
sandervl
Message:

Wine resync

Location:
trunk/src/riched32
Files:
1 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/riched32/LICENSE.TXT

    r6379 r9407  
    1 $Id: LICENSE.TXT,v 1.1 2001-07-21 08:58:46 sandervl Exp $
    2 @c This is an additional Odin license agreement.
    3 @c It supercedes the main Odin license, but is only valid in
    4 @c the source directory in which it is present.
     1$Id: LICENSE.TXT,v 1.2 2002-11-13 12:17:17 sandervl Exp $
     2This is an additional Odin license agreement.
     3It supercedes the main Odin license, but is only valid in
     4the source directory in which it is present.
    55
    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).
    9 
    10 Copyright (c) 1993-2000 the Wine project authors (see the file AUTHORS
     6Copyright (c) 1993-2002 the Wine project authors (see the file AUTHORS
    117for a complete list)
    128
    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:
     9Wine is free software; you can redistribute it and/or modify it under
     10the terms of the GNU Lesser General Public License as published by the
     11Free Software Foundation; either version 2.1 of the License, or (at
     12your option) any later version.
    1913
    20 The above copyright notice and this permission notice shall be included in
    21 all copies or substantial portions of the Software.
     14This program is distributed in the hope that it will be useful, but
     15WITHOUT ANY WARRANTY; without even the implied warranty of
     16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     17Lesser General Public License for more details.
    2218
    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.
     19A copy of the GNU Lesser General Public License is included in the
     20Wine distribution in the file COPYING.LIB. If you did not receive this
     21copy, write to the Free Software Foundation, Inc., 59 Temple Place,
     22Suite 330, Boston, MA 02111-1307 USA.
  • trunk/src/riched32/ansi_gen.h

    r3515 r9407  
    1313 characters.*/
    1414
    15 int ansi_gen[] = 
     15int ansi_gen[] =
    1616{
    1717  rtfSC_formula          ,0x06,
  • trunk/src/riched32/ansi_sym.h

    r3515 r9407  
    11/*
    22 * RTF ANSI character set (\ansi) Symbol font map
    3  * 
     3 *
    44 * Field 1 is the standard character name which the character value in
    55 * field 2 maps onto.  (It doesn't mean "to produce the character in field 1,
    66 * use the value in field 2.)
    7  * 
     7 *
    88 * The character value may be given either as a single character (which will be
    99 * converted to the ASCII value of the character), or in numeric format, either
    1010 * in decimal or 0xyy as hex yy.  Single or double quotes may be used to quote
    1111 * characters.
    12  * 
     12 *
    1313 */
    14  
     14
    1515int ansi_sym[] =
    1616{
  • trunk/src/riched32/charlist.c

    r3922 r9407  
    1 /* $Id: charlist.c,v 1.2 2000-08-02 14:58:40 bird Exp $ */
    21/*
    32 *
     
    65 *  Copyright (c) 2000 by Jean-Claude Batista
    76 *
     7 * This library is free software; you can redistribute it and/or
     8 * modify it under the terms of the GNU Lesser General Public
     9 * License as published by the Free Software Foundation; either
     10 * version 2.1 of the License, or (at your option) any later version.
     11 *
     12 * This library is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15 * Lesser General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU Lesser General Public
     18 * License along with this library; if not, write to the Free Software
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    820 */
    921
     
    1325#include <ctype.h>
    1426#include <stdlib.h>
     27
    1528#include "charlist.h"
    16 #include "windows.h"
     29#include "windef.h"
     30#include "winbase.h"
     31#include "wine/debug.h"
     32
     33WINE_DEFAULT_DEBUG_CHANNEL(richedit);
    1734
    1835extern HANDLE RICHED32_hHeap;
     
    2340    pNewEntry->pNext = NULL;
    2441    pNewEntry->myChar = myChar;
     42
     43    TRACE("\n");
    2544
    2645    if(pCharList->pTail == NULL)
     
    4059{
    4160    CHARLISTENTRY* pNewEntry = malloc(sizeof(CHARLISTENTRY));
     61
     62    TRACE("\n");
    4263
    4364    pNewEntry->myChar = myChar;
     
    6384    char myChar;
    6485
     86    TRACE("\n");
     87
    6588    if(pCharList->nCount == 0)
    6689      return 0;
     
    85108int CHARLIST_GetNbItems(CHARLIST* pCharList)
    86109{
     110    TRACE("\n");
     111
    87112    return pCharList->nCount;
    88113}
    89114
    90115void CHARLIST_FreeList(CHARLIST* pCharList){
     116    TRACE("\n");
     117
    91118    while(pCharList->nCount)
    92119        CHARLIST_Dequeue(pCharList);
    93120}
    94121
    95 /* this function count the number of occurences of a caracter */
     122/* this function counts the number of occurrences of a caracter */
    96123int CHARLIST_CountChar(CHARLIST* pCharList, char myChar)
    97124{
    98125    CHARLISTENTRY *pCurrent;
    99126    int nCount = 0;
     127
     128    TRACE("\n");
    100129
    101130    for(pCurrent =pCharList->pHead ;pCurrent;pCurrent=pCurrent->pNext)
     
    108137int CHARLIST_toBuffer(CHARLIST* pCharList, char* pBuffer, int nBufferSize)
    109138{
     139
     140   TRACE("\n");
    110141
    111142   /* we add one to store a NULL caracter */
  • trunk/src/riched32/charlist.h

    r3515 r9407  
     1/*
     2 * Character List
     3 *
     4 * Copyright (c) 2000 by Jean-Claude Batista
     5 *
     6 * This library is free software; you can redistribute it and/or
     7 * modify it under the terms of the GNU Lesser General Public
     8 * License as published by the Free Software Foundation; either
     9 * version 2.1 of the License, or (at your option) any later version.
     10 *
     11 * This library is distributed in the hope that it will be useful,
     12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     14 * Lesser General Public License for more details.
     15 *
     16 * You should have received a copy of the GNU Lesser General Public
     17 * License along with this library; if not, write to the Free Software
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     19 */
     20
    121#ifndef _CHARLIST
    222#define _CHARLIST
     
    1030typedef struct _tagCHARLIST
    1131{
    12     unsigned int nCount; // Entries Count;
     32    unsigned int nCount; /* Entries Count; */
    1333    CHARLISTENTRY *pHead;
    1434    CHARLISTENTRY *pTail;
  • trunk/src/riched32/initriched32.cpp

    r6891 r9407  
    1 /* $Id: initriched32.cpp,v 1.3 2001-09-30 08:45:52 bird Exp $ */
     1/* $Id: initriched32.cpp,v 1.4 2002-11-13 12:17:18 sandervl Exp $ */
    22/*
    33 * DLL entry point
     
    5353   {
    5454   case DLL_PROCESS_ATTACH:
    55     return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);
     55       return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);
    5656
    5757   case DLL_THREAD_ATTACH:
    5858   case DLL_THREAD_DETACH:
    59     return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);
     59       return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);
    6060
    6161   case DLL_PROCESS_DETACH:
    62     ret = RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);
    63     ctordtorTerm();
    64         return ret;
     62       ret = RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);
     63       ctordtorTerm();
     64       return ret;
    6565   }
    6666   return FALSE;
     
    8888      case 0 :
    8989         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    90      dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&riched32_PEResTab);
     90         dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&riched32_PEResTab);
    9191         if(dllHandle == 0)
    92         return 0UL;
     92             return 0UL;
    9393
    9494         break;
     95
    9596      case 1 :
    9697         if(dllHandle) {
    97         UnregisterLxDll(dllHandle);
     98             UnregisterLxDll(dllHandle);
    9899         }
    99100         break;
  • trunk/src/riched32/makefile

    r6895 r9407  
    1 # $Id: makefile,v 1.7 2001-09-30 09:34:43 bird Exp $
     1# $Id: makefile,v 1.8 2002-11-13 12:17:18 sandervl Exp $
    22
    33#
     
    2727$(OBJDIR)\reader.obj \
    2828$(OBJDIR)\charlist.obj \
    29 $(OBJDIR)\textwriter.obj \
     29$(OBJDIR)\text-writer.obj \
    3030$(OBJDIR)\richedit.obj \
    3131$(OBJDIR)\initterm.obj \
  • trunk/src/riched32/reader.c

    r3922 r9407  
    1 /* $Id: reader.c,v 1.2 2000-08-02 14:58:40 bird Exp $ */
    21/*
    32 * - Need to document error code meanings.
     
    7473
    7574#include <stdlib.h>
     75
    7676#include "charlist.h"
    77 #include "windows.h"
     77#include "windef.h"
     78#include "winbase.h"
     79#include "wine/debug.h"
     80
     81WINE_DEFAULT_DEBUG_CHANNEL(richedit);
    7882
    7983extern HANDLE RICHED32_hHeap;
     
    9397
    9498# define        maxCSStack              10
    95 
    96 #ifndef __WIN32OS2__
    97 #ifndef THINK_C
    98 extern char     *malloc ();
    99 #else
    100 extern void     *malloc(size_t);
    101 #endif
    102 #endif
    10399
    104100static int      _RTFGetChar();
     
    128124int     rtfMinor;
    129125int     rtfParam;
     126int     rtfFormat;
    130127char    *rtfTextBuf = (char *) NULL;
    131128int     rtfTextLen;
     
    166163 */
    167164
    168 static char     *stdCharName[] =
    169 {
    170 # include       "stdcharnames.h"
    171         (char *) NULL
    172 };
    173 
     165#include "stdcharnames.h"
    174166
    175167/*
     
    214206 */
    215207
    216 int
    217 _RTFGetChar()
     208int _RTFGetChar(void)
    218209{
    219210    char myChar;
     211
     212    TRACE("\n");
     213
    220214    if(CHARLIST_GetNbItems(&inputCharList) == 0)
    221215    {
     
    232226}
    233227
    234 void
    235 RTFSetEditStream(EDITSTREAM *es)
    236 {
     228void RTFSetEditStream(EDITSTREAM *es)
     229{
     230    TRACE("\n");
     231
    237232    editstream.dwCookie = es->dwCookie;
    238233    editstream.dwError  = es->dwError;
     
    246241 */
    247242
    248 void
    249 RTFInit ()
     243void RTFInit(void)
    250244{
    251245int     i;
     
    254248RTFStyle        *sp;
    255249RTFStyleElt     *eltList, *ep;
     250
     251    TRACE("\n");
    256252
    257253        if (rtfTextBuf == (char *) NULL)        /* initialize the text buffers */
     
    337333 */
    338334
    339 void
    340 RTFSetInputName (name)
    341 char    *name;
    342 {
     335void RTFSetInputName(char *name)
     336{
     337    TRACE("\n");
     338
    343339        if ((inputName = RTFStrSave (name)) == (char *) NULL)
    344340                RTFPanic ("RTFSetInputName: out of memory");
     
    346342
    347343
    348 char *
    349 RTFGetInputName ()
     344char *RTFGetInputName(void)
    350345{
    351346        return (inputName);
     
    353348
    354349
    355 void
    356 RTFSetOutputName (name)
    357 char    *name;
    358 {
     350void RTFSetOutputName(char *name)
     351{
     352    TRACE("\n");
     353
    359354        if ((outputName = RTFStrSave (name)) == (char *) NULL)
    360355                RTFPanic ("RTFSetOutputName: out of memory");
     
    362357
    363358
    364 char *
    365 RTFGetOutputName ()
     359char *RTFGetOutputName(void)
    366360{
    367361        return (outputName);
     
    385379
    386380
    387 void
    388 RTFSetClassCallback (class, callback)
    389 int             class;
    390 RTFFuncPtr      callback;
     381void RTFSetClassCallback(int class, RTFFuncPtr callback)
    391382{
    392383        if (class >= 0 && class < rtfMaxClass)
     
    395386
    396387
    397 RTFFuncPtr
    398 RTFGetClassCallback (class)
    399 int     class;
     388RTFFuncPtr RTFGetClassCallback(int class)
    400389{
    401390        if (class >= 0 && class < rtfMaxClass)
     
    412401
    413402
    414 void
    415 RTFSetDestinationCallback (dest, callback)
    416 int             dest;
    417 RTFFuncPtr      callback;
     403void RTFSetDestinationCallback(int dest, RTFFuncPtr callback)
    418404{
    419405        if (dest >= 0 && dest < rtfMaxDestination)
     
    422408
    423409
    424 RTFFuncPtr
    425 RTFGetDestinationCallback (dest)
    426 int     dest;
     410RTFFuncPtr RTFGetDestinationCallback(int dest)
    427411{
    428412        if (dest >= 0 && dest < rtfMaxDestination)
     
    444428 */
    445429
    446 void
    447 RTFRead ()
     430void RTFRead(void)
    448431{
    449432        while (RTFGetToken () != rtfEOF)
     
    458441 */
    459442
    460 void
    461 RTFRouteToken ()
     443void RTFRouteToken(void)
    462444{
    463445RTFFuncPtr      p;
     446
     447    TRACE("\n");
    464448
    465449        if (rtfClass < 0 || rtfClass >= rtfMaxClass)    /* watchdog */
     
    491475 */
    492476
    493 void
    494 RTFSkipGroup ()
     477void RTFSkipGroup(void)
    495478{
    496479int     level = 1;
     480    TRACE("\n");
    497481
    498482        while (RTFGetToken () != rtfEOF)
     
    518502 */
    519503
    520 int
    521 RTFGetToken ()
     504int RTFGetToken(void)
    522505{
    523506RTFFuncPtr      p;
     507    TRACE("\n");
    524508
    525509        for (;;)
     
    530514
    531515                /* Silently discard newlines, carriage returns, nulls.  */
    532                 if (!(rtfClass == rtfText
    533                         && (rtfMajor == '\n' || rtfMajor == '\r'
    534                                                 || rtfMajor == '\0')))
     516                if (!(rtfClass == rtfText && rtfFormat != SF_TEXT
     517                        && (rtfMajor == '\r' || rtfMajor == '\n' || rtfMajor == '\0')))
    535518                        break;
    536519        }
     
    546529
    547530
    548 void
    549 RTFSetReadHook (f)
    550 RTFFuncPtr      f;
     531void RTFSetReadHook(RTFFuncPtr f)
    551532{
    552533        readHook = f;
     
    554535
    555536
    556 RTFFuncPtr
    557 RTFGetReadHook ()
     537RTFFuncPtr RTFGetReadHook(void)
    558538{
    559539        return (readHook);
     
    561541
    562542
    563 void
    564 RTFUngetToken ()
    565 {
     543void RTFUngetToken(void)
     544{
     545    TRACE("\n");
     546
    566547        if (pushedClass >= 0)   /* there's already an ungotten token */
    567548                RTFPanic ("cannot unget two tokens");
     
    576557
    577558
    578 int
    579 RTFPeekToken ()
     559int RTFPeekToken(void)
    580560{
    581561        _RTFGetToken ();
     
    585565
    586566
    587 static void
    588 _RTFGetToken ()
     567static void _RTFGetToken(void)
    589568{
    590569RTFFont *fp;
     570
     571    TRACE("\n");
     572
     573        if (rtfFormat == SF_TEXT) {
     574            rtfMajor = GetChar ();
     575            rtfMinor = rtfSC_nothing;
     576            rtfParam = rtfNoParam;
     577            rtfTextBuf[rtfTextLen = 0] = '\0';
     578            if (rtfMajor == EOF)
     579                rtfClass = rtfEOF;
     580            else
     581                rtfClass = rtfText;
     582            return;
     583        }
    591584
    592585        /* first check for pushed token from RTFUngetToken() */
     
    660653/* this shouldn't be called anywhere but from _RTFGetToken() */
    661654
    662 static void
    663 _RTFGetToken2 ()
     655static void _RTFGetToken2(void)
    664656{
    665657int     sign;
    666658int     c;
     659
     660    TRACE("\n");
    667661
    668662        /* initialize token vars */
     
    831825
    832826
    833 static int
    834 GetChar ()
     827static int GetChar(void)
    835828{
    836829int     c;
    837830int     oldBumpLine;
     831
     832    TRACE("\n");
    838833
    839834        if ((c = _RTFGetChar()) != EOF)
     
    874869 */
    875870
    876 void
    877 RTFSetToken (class, major, minor, param, text)
    878 int     class, major, minor, param;
    879 char    *text;
    880 {
     871void RTFSetToken(int class, int major, int minor, int param, char *text)
     872{
     873    TRACE("\n");
     874
    881875        rtfClass = class;
    882876        rtfMajor = major;
     
    911905 */
    912906
    913 static void
    914 CharSetInit ()
    915 {
     907static void CharSetInit(void)
     908{
     909    TRACE("\n");
     910
    916911        autoCharSetFlags = (rtfReadCharSet | rtfSwitchCharSet);
    917912        RTFFree (genCharSetFile);
     
    931926 */
    932927
    933 void
    934 RTFSetCharSetMap (name, csId)
    935 char    *name;
    936 int     csId;
    937 {
     928void RTFSetCharSetMap (char *name, int csId)
     929{
     930    TRACE("\n");
     931
    938932        if ((name = RTFStrSave (name)) == (char *) NULL)        /* make copy */
    939933                RTFPanic ("RTFSetCharSetMap: out of memory");
     
    961955 */
    962956
    963 static void
    964 ReadCharSetMaps ()
     957static void ReadCharSetMaps(void)
    965958{
    966959char    buf[rtfBufSiz];
     960
     961    TRACE("\n");
    967962
    968963        if (genCharSetFile != (char *) NULL)
     
    987982 */
    988983
    989 int
    990 RTFReadCharSetMap (csId)
    991 int     csId;
     984int RTFReadCharSetMap(int csId)
    992985{
    993986        int     *stdCodeArray;
    994987        int i;
     988
     989    TRACE("\n");
     990
    995991        switch (csId)
    996992        {
     
    10371033 */
    10381034
    1039 int
    1040 RTFStdCharCode (name)
    1041 char    *name;
     1035int RTFStdCharCode(char *name)
    10421036{
    10431037int     i;
     1038
     1039    TRACE("\n");
    10441040
    10451041        for (i = 0; i < rtfSC_MaxChar; i++)
     
    10571053 */
    10581054
    1059 char *
    1060 RTFStdCharName (code)
    1061 int     code;
     1055char *RTFStdCharName(int code)
    10621056{
    10631057        if (code < 0 || code >= rtfSC_MaxChar)
     
    10761070 */
    10771071
    1078 int
    1079 RTFMapChar (c)
    1080 int     c;
    1081 {
     1072int RTFMapChar(int c)
     1073{
     1074    TRACE("\n");
     1075
    10821076        switch (curCharSet)
    10831077        {
     
    11071101 */
    11081102
    1109 void
    1110 RTFSetCharSet (csId)
    1111 int     csId;
    1112 {
     1103void RTFSetCharSet(int csId)
     1104{
     1105    TRACE("\n");
     1106
    11131107        switch (csId)
    11141108        {
     
    11261120
    11271121
    1128 int
    1129 RTFGetCharSet ()
     1122int RTFGetCharSet(void)
    11301123{
    11311124        return (curCharSet);
     
    11611154 */
    11621155
    1163 static void
    1164 ReadFontTbl ()
     1156static void ReadFontTbl(void)
    11651157{
    11661158RTFFont *fp = NULL;
     
    11681160int     old = -1;
    11691161char    *fn = "ReadFontTbl";
     1162
     1163    TRACE("\n");
    11701164
    11711165        for (;;)
     
    13121306 */
    13131307
    1314 static void
    1315 ReadColorTbl ()
     1308static void ReadColorTbl(void)
    13161309{
    13171310RTFColor        *cp;
    13181311int             cnum = 0;
    13191312char            *fn = "ReadColorTbl";
     1313
     1314    TRACE("\n");
    13201315
    13211316        for (;;)
     
    13521347 */
    13531348
    1354 static void
    1355 ReadStyleSheet ()
     1349static void ReadStyleSheet(void)
    13561350{
    13571351RTFStyle        *sp;
     
    13591353char            buf[rtfBufSiz], *bp;
    13601354char            *fn = "ReadStyleSheet";
     1355
     1356    TRACE("\n");
    13611357
    13621358        for (;;)
     
    15021498
    15031499
    1504 static void
    1505 ReadInfoGroup ()
     1500static void ReadInfoGroup(void)
    15061501{
    15071502        RTFSkipGroup ();
     
    15101505
    15111506
    1512 static void
    1513 ReadPictGroup ()
     1507static void ReadPictGroup(void)
    15141508{
    15151509        RTFSkipGroup ();
     
    15181512
    15191513
    1520 static void
    1521 ReadObjGroup ()
     1514static void ReadObjGroup(void)
    15221515{
    15231516        RTFSkipGroup ();
     
    15341527
    15351528
    1536 RTFStyle *
    1537 RTFGetStyle (num)
    1538 int     num;
     1529RTFStyle *RTFGetStyle(int num)
    15391530{
    15401531RTFStyle        *s;
     
    15511542
    15521543
    1553 RTFFont *
    1554 RTFGetFont (num)
    1555 int     num;
     1544RTFFont *RTFGetFont(int num)
    15561545{
    15571546RTFFont *f;
     
    15681557
    15691558
    1570 RTFColor *
    1571 RTFGetColor (num)
    1572 int     num;
     1559RTFColor *RTFGetColor(int num)
    15731560{
    15741561RTFColor        *c;
     
    15921579 */
    15931580
    1594 void
    1595 RTFExpandStyle (n)
    1596 int     n;
     1581void RTFExpandStyle(int n)
    15971582{
    15981583RTFStyle        *s;
    15991584RTFStyleElt     *se;
     1585
     1586    TRACE("\n");
    16001587
    16011588        if (n == -1 || (s = RTFGetStyle (n)) == (RTFStyle *) NULL)
     
    25552542 */
    25562543
    2557 static void
    2558 LookupInit ()
     2544static void LookupInit(void)
    25592545{
    25602546static int      inited = 0;
     
    25752561 */
    25762562
    2577 static void
    2578 Lookup (s)
    2579 char    *s;
     2563static void Lookup(char *s)
    25802564{
    25812565RTFKey  *rp;
    25822566int     hash;
    25832567
     2568        TRACE("\n");
    25842569        ++s;                    /* skip over the leading \ character */
    25852570        hash = Hash (s);
     
    26022587 */
    26032588
    2604 static int
    2605 Hash (s)
    2606 char    *s;
     2589static int Hash(char *s)
    26072590{
    26082591char    c;
     
    26312614 */
    26322615
    2633 char *
    2634 _RTFAlloc (size)
    2635 int     size;
     2616char *_RTFAlloc(int size)
    26362617{
    26372618        return HeapAlloc(RICHED32_hHeap, 0, size);
     
    26442625
    26452626
    2646 char *
    2647 RTFStrSave (s)
    2648 char    *s;
     2627char *RTFStrSave(char *s)
    26492628{
    26502629char    *p;
     
    26562635
    26572636
    2658 void
    2659 RTFFree (p)
    2660 char    *p;
     2637void RTFFree(char *p)
    26612638{
    26622639        if (p != (char *) NULL)
     
    26722649 */
    26732650
    2674 int
    2675 RTFCheckCM (class, major)
    2676 int     class, major;
     2651int RTFCheckCM(int class, int major)
    26772652{
    26782653        return (rtfClass == class && rtfMajor == major);
     
    26802655
    26812656
    2682 int
    2683 RTFCheckCMM (class, major, minor)
    2684 int     class, major, minor;
     2657int RTFCheckCMM(int class, int major, int minor)
    26852658{
    26862659        return (rtfClass == class && rtfMajor == major && rtfMinor == minor);
     
    26882661
    26892662
    2690 int
    2691 RTFCheckMM (major, minor)
    2692 int     major, minor;
     2663int RTFCheckMM(int major, int minor)
    26932664{
    26942665        return (rtfMajor == major && rtfMinor == minor);
     
    26992670
    27002671
    2701 int
    2702 RTFCharToHex (c)
    2703 char    c;
     2672int RTFCharToHex(char c)
    27042673{
    27052674        if (isupper (c))
     
    27112680
    27122681
    2713 int
    2714 RTFHexToChar (i)
    2715 int     i;
     2682int RTFHexToChar(int i)
    27162683{
    27172684        if (i < 10)
     
    27422709 */
    27432710
    2744 int
    2745 RTFReadOutputMap (outMap, reinit)
    2746 char    *outMap[];
    2747 int     reinit;
     2711int RTFReadOutputMap(char *outMap[], int reinit)
    27482712{
    27492713    int  i;
     
    27812745
    27822746
    2783 void
    2784 RTFSetOpenLibFileProc (proc)
    2785 FILE    *(*proc) ();
     2747void RTFSetOpenLibFileProc(FILE *(*proc)())
    27862748{
    27872749    libFileOpen = proc;
     
    27892751
    27902752
    2791 FILE *
    2792 RTFOpenLibFile (file, mode)
    2793 char    *file;
    2794 char    *mode;
     2753FILE *RTFOpenLibFile (char *file, char *mode)
    27952754{
    27962755        if (libFileOpen == NULL)
     
    28132772
    28142773
    2815 static void
    2816 DefaultMsgProc (s)
    2817 char    *s;
    2818 {
    2819         fprintf (stderr, "%s", s);
     2774static void DefaultMsgProc(char *s)
     2775{
     2776    MESSAGE( "%s", s);
    28202777}
    28212778
     
    28242781
    28252782
    2826 void
    2827 RTFSetMsgProc (proc)
    2828 RTFFuncPtr      proc;
     2783void RTFSetMsgProc(RTFFuncPtr proc)
    28292784{
    28302785        msgProc = proc;
     
    28382793 */
    28392794
    2840 void
    2841 RTFMsg (char *fmt, ...)
     2795void RTFMsg (char *fmt, ...)
    28422796{
    28432797char    buf[rtfBufSiz];
     
    28592813 */
    28602814
    2861 void
    2862 RTFMsg (va_alist)
    2863 va_dcl
     2815void RTFMsg (va_dcl va_alist)
    28642816{
    28652817va_list args;
     
    28802832 */
    28812833
    2882 void
    2883 RTFMsg (fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9)
    2884 char    *fmt;
    2885 char    *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9;
     2834void RTFMsg (char *fmt, char *a1, char *a2, char *a3, char *a4, char *a5, char *a6, char *a7, char *a8, char *a9)
    28862835{
    28872836char    buf[rtfBufSiz];
     
    29052854 */
    29062855
    2907 static void
    2908 DefaultPanicProc (s)
    2909 char    *s;
    2910 {
    2911         fprintf (stderr, "%s", s);
     2856static void DefaultPanicProc(char *s)
     2857{
     2858    MESSAGE( "%s", s);
    29122859        /*exit (1);*/
    29132860}
     
    29172864
    29182865
    2919 void
    2920 RTFSetPanicProc (proc)
    2921 RTFFuncPtr      proc;
     2866void RTFSetPanicProc(RTFFuncPtr proc)
    29222867{
    29232868        panicProc = proc;
     
    29312876 */
    29322877
    2933 void
    2934 RTFPanic (char *fmt, ...)
     2878void RTFPanic(char *fmt, ...)
    29352879{
    29362880char    buf[rtfBufSiz];
     
    29592903 */
    29602904
    2961 void
    2962 RTFPanic (va_alist)
    2963 va_dcl
     2905void RTFPanic(va_dcl va_alist)
    29642906{
    29652907va_list args;
     
    29872929 */
    29882930
    2989 void
    2990 RTFPanic (fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9)
    2991 char    *fmt;
    2992 char    *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8, *a9;
     2931void RTFPanic (char *fmt, char *a1, char *a2, char *a3, char *a4, char *a5, char *a6, char *a7, char *a8, char *a9)
    29932932{
    29942933char    buf[rtfBufSiz];
  • trunk/src/riched32/riched32.h

    r3515 r9407  
    44 * Copyright 2000 Jean-Clauyde Batista
    55 *
     6 *
     7 * This library is free software; you can redistribute it and/or
     8 * modify it under the terms of the GNU Lesser General Public
     9 * License as published by the Free Software Foundation; either
     10 * version 2.1 of the License, or (at your option) any later version.
     11 *
     12 * This library is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15 * Lesser General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU Lesser General Public
     18 * License along with this library; if not, write to the Free Software
     19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    620 */
    721
     
    923#define __WINE_RICHED32_H
    1024
     25#include "windef.h"
     26#include "winuser.h"
    1127#include "richedit.h"
    1228
    13 extern HMODULE RICHED32_hModule;
    1429extern VOID RICHED32_Register (VOID);
    1530extern VOID RICHED32_Unregister (VOID);
  • trunk/src/riched32/richedit.c

    r4370 r9407  
    1 /* $Id: richedit.c,v 1.4 2000-10-02 13:36:39 sandervl Exp $ */
    21/*
    32 * RichEdit32  functions
    43 *
    5  * This module is a simple wrap-arround the edit controls.
    6  * At the point, it is good only for application who use the RICHEDIT control to
    7  * display RTF text.
     4 * This module is a simple wrapper for the edit controls.
     5 * At the point, it is good only for application who use the RICHEDIT
     6 * control to display RTF text.
    87 *
    98 * Copyright 2000 by Jean-Claude Batista
    109 *
     10 * This library is free software; you can redistribute it and/or
     11 * modify it under the terms of the GNU Lesser General Public
     12 * License as published by the Free Software Foundation; either
     13 * version 2.1 of the License, or (at your option) any later version.
     14 *
     15 * This library is distributed in the hope that it will be useful,
     16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     18 * Lesser General Public License for more details.
     19 *
     20 * You should have received a copy of the GNU Lesser General Public
     21 * License along with this library; if not, write to the Free Software
     22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1123 */
    1224
    13 #include "windows.h"
     25#include <string.h>
     26#include "windef.h"
    1427#include "winbase.h"
    15 #include "heap.h"
    16 #include "debugtools.h"
     28#include "wingdi.h"
     29#include "winreg.h"
    1730#include "winerror.h"
    1831#include "riched32.h"
    1932#include "richedit.h"
    2033#include "charlist.h"
     34#define NO_SHLWAPI_STREAM
     35#include "shlwapi.h"
    2136
    2237#include "rtf.h"
    2338#include "rtf2text.h"
     39#include "wine/debug.h"
    2440
    2541#define ID_EDIT      1
    2642
    27 DEFAULT_DEBUG_CHANNEL(richedit)
     43WINE_DEFAULT_DEBUG_CHANNEL(richedit);
    2844
    2945HANDLE RICHED32_hHeap = (HANDLE)NULL;
    30 DWORD  RICHED32_dwProcessesAttached = 0;
    3146/* LPSTR  RICHED32_aSubclass = (LPSTR)NULL; */
    32 HMODULE RICHED32_hModule = 0;
    33 
    34 /*
    35  * RICHED32_LibMain [Internal] Initializes the internal 'RICHED32.DLL'.
     47
     48#define DPRINTF_EDIT_MSG32(str) \
     49        TRACE(\
     50                     "32 bit : " str ": hwnd=%p, wParam=%08x, lParam=%08x\n"\
     51                     , \
     52                     hwnd, (UINT)wParam, (UINT)lParam)
     53
     54
     55/***********************************************************************
     56 * DllMain [Internal] Initializes the internal 'RICHED32.DLL'.
    3657 *
    3758 * PARAMS
    38  *     hinstDLL    [I] handle to the 'dlls' instance
     59 *     hinstDLL    [I] handle to the DLL's instance
    3960 *     fdwReason   [I]
    40  *     lpvReserved [I] reserverd, must be NULL
     61 *     lpvReserved [I] reserved, must be NULL
    4162 *
    4263 * RETURNS
     
    4566 */
    4667
    47 BOOL WINAPI
    48 RICHED32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     68#ifdef __WIN32OS2__
     69BOOL WINAPI RICHED32_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     70#else
     71BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
     72#endif
    4973{
    50 
    51     switch (fdwReason) {
    52             case DLL_PROCESS_ATTACH:
    53 
    54             if (RICHED32_dwProcessesAttached == 0) {
    55 
    56                     /* This will be wrong for any other process attching in this address-space! */
    57                     RICHED32_hModule = (HMODULE)hinstDLL;
    58 
    59                         /* create private heap */
    60                         RICHED32_hHeap = HeapCreate (0, 0x10000, 0);
    61 
    62                 }
    63 
    64                 /* register the Rich Edit class */
    65                 RICHED32_Register ();
    66 
    67                 RICHED32_dwProcessesAttached++;
    68                 break;
    69 
    70             case DLL_PROCESS_DETACH:
    71                 RICHED32_dwProcessesAttached--;
    72 
    73                 /* unregister all common control classes */
    74                 RICHED32_Unregister ();
    75 
    76                 if (RICHED32_dwProcessesAttached == 0) {
    77                     HeapDestroy (RICHED32_hHeap);
    78                     RICHED32_hHeap = (HANDLE)NULL;
    79                 }
    80                 break;
     74    TRACE("\n");
     75    switch (fdwReason)
     76    {
     77    case DLL_PROCESS_ATTACH:
     78        /* create private heap */
     79        RICHED32_hHeap = HeapCreate (0, 0x10000, 0);
     80        /* register the Rich Edit class */
     81        RICHED32_Register ();
     82        break;
     83
     84    case DLL_PROCESS_DETACH:
     85        /* unregister all common control classes */
     86        RICHED32_Unregister ();
     87        HeapDestroy (RICHED32_hHeap);
     88        RICHED32_hHeap = (HANDLE)NULL;
     89        break;
    8190    }
    82 
    8391    return TRUE;
    8492}
     93
     94/* Support routines for window procedure */
     95   INT RICHEDIT_GetTextRange(HWND hwnd,TEXTRANGEA *tr);
     96   INT RICHEDIT_GetSelText(HWND hwnd,LPSTR lpstrBuffer);
     97
    8598
    8699/*
     
    98111
    99112    static HWND hwndEdit;
     113    static HWND hwndParent;
    100114    static char* rtfBuffer;
    101115    int rtfBufferSize;
    102116
     117    CHARRANGE *cr;
     118    TRACE("previous hwndEdit: %p hwndParent %p\n",hwndEdit,hwndParent);
     119    hwndEdit = GetWindow(hwnd,GW_CHILD);
     120    TRACE("uMsg: 0x%x hwnd: %p hwndEdit: %p\n",uMsg,hwnd,hwndEdit);
     121
    103122    switch (uMsg)
    104123    {
    105124
    106125    case WM_CREATE :
     126            DPRINTF_EDIT_MSG32("WM_CREATE");
    107127
    108128            /* remove SCROLLBARS from the current window style */
     129            hwndParent = ((LPCREATESTRUCTA) lParam)->hwndParent;
     130
    109131            newstyle = style = ((LPCREATESTRUCTA) lParam)->style;
    110132            newstyle &= ~WS_HSCROLL;
     
    113135            newstyle &= ~ES_AUTOVSCROLL;
    114136
    115 #ifdef __WIN32OS2__
    116             style |= WS_CHILD;
    117 #endif
     137    TRACE("previous hwndEdit: %p\n",hwndEdit);
    118138            hwndEdit = CreateWindowA ("edit", ((LPCREATESTRUCTA) lParam)->lpszName,
    119139                                   style, 0, 0, 0, 0,
    120140                                   hwnd, (HMENU) ID_EDIT,
    121141                                   ((LPCREATESTRUCTA) lParam)->hInstance, NULL) ;
     142    TRACE("hwndEdit: %p hwnd: %p\n",hwndEdit,hwnd);
    122143
    123144            SetWindowLongA(hwnd,GWL_STYLE, newstyle);
     
    125146
    126147    case WM_SETFOCUS :
     148            DPRINTF_EDIT_MSG32("WM_SETFOCUS");
    127149            SetFocus (hwndEdit) ;
    128150            return 0 ;
    129151
    130152    case WM_SIZE :
     153            DPRINTF_EDIT_MSG32("WM_SIZE");
    131154            MoveWindow (hwndEdit, 0, 0, LOWORD (lParam), HIWORD (lParam), TRUE) ;
    132155            return 0 ;
    133156
    134157    case WM_COMMAND :
    135             if (LOWORD (wParam) == ID_EDIT)
    136                  if (HIWORD (wParam) == EN_ERRSPACE ||
    137                            HIWORD (wParam) == EN_MAXTEXT)
    138 
    139                       MessageBoxA (hwnd, "RichEdit control out of space.",
     158        DPRINTF_EDIT_MSG32("WM_COMMAND");
     159        switch(HIWORD(wParam)) {
     160                case EN_CHANGE:
     161                case EN_HSCROLL:
     162                case EN_KILLFOCUS:
     163                case EN_SETFOCUS:
     164                case EN_UPDATE:
     165                case EN_VSCROLL:
     166                        return SendMessageA(hwndParent, WM_COMMAND,
     167                                wParam, (LPARAM)(hwnd));
     168
     169                case EN_ERRSPACE:
     170                case EN_MAXTEXT:
     171                        MessageBoxA (hwnd, "RichEdit control out of space.",
    140172                                  "ERROR", MB_OK | MB_ICONSTOP) ;
    141             return 0 ;
    142 
    143 #ifdef __WIN32OS2__
    144     case WM_SETTEXT:
    145             return SetWindowTextA(hwndEdit, lParam);
    146 #endif
     173                        return 0 ;
     174                }
    147175
    148176    case EM_STREAMIN:
     177            DPRINTF_EDIT_MSG32("EM_STREAMIN");
    149178
    150179            /* setup the RTF parser */
    151180            RTFSetEditStream(( EDITSTREAM*)lParam);
     181            rtfFormat = wParam&(SF_TEXT|SF_RTF);
    152182            WriterInit();
    153183            RTFInit ();
     
    169199
    170200            return 0;
     201
     202/* Messages specific to Richedit controls */
     203
     204    case EM_AUTOURLDETECT:
     205            DPRINTF_EDIT_MSG32("EM_AUTOURLDETECT Ignored");
     206            return 0;
     207
     208    case EM_CANPASTE:
     209            DPRINTF_EDIT_MSG32("EM_CANPASTE Ignored");
     210            return 0;
     211
     212    case EM_CANREDO:
     213            DPRINTF_EDIT_MSG32("EM_CANREDO Ignored");
     214            return 0;
     215
     216    case EM_DISPLAYBAND:
     217            DPRINTF_EDIT_MSG32("EM_DISPLAYBAND Ignored");
     218            return 0;
     219
     220    case EM_EXGETSEL:
     221            DPRINTF_EDIT_MSG32("EM_EXGETSEL -> EM_GETSEL");
     222            cr = (VOID *) lParam;
     223            if (hwndEdit) SendMessageA( hwndEdit, EM_GETSEL, (INT)&cr->cpMin, (INT)&cr->cpMax);
     224            TRACE("cpMin: 0x%x cpMax: 0x%x\n",(INT)cr->cpMin,(INT)cr->cpMax);
     225            return 0;
     226
     227    case EM_EXLIMITTEXT:
     228        {
     229           DWORD limit = lParam;
     230           DPRINTF_EDIT_MSG32("EM_EXLIMITTEXT");
     231           if (limit > 65534)
     232           {
     233                limit = 0xFFFFFFFF;
     234           }
     235           return SendMessageA(hwndEdit,EM_SETLIMITTEXT,limit,0);
     236        }
     237
     238    case EM_EXLINEFROMCHAR:
     239            DPRINTF_EDIT_MSG32("EM_EXLINEFROMCHAR -> LINEFROMCHAR");
     240            if (hwndEdit) return SendMessageA( hwndEdit, EM_LINEFROMCHAR, lParam, wParam);
     241            return 0;
     242
     243    case EM_EXSETSEL:
     244            DPRINTF_EDIT_MSG32("EM_EXSETSEL -> EM_SETSEL");
     245            cr = (VOID *) lParam;
     246            if (hwndEdit) SendMessageA( hwndEdit, EM_SETSEL, cr->cpMin, cr->cpMax);
     247            return 0;
     248
     249    case EM_FINDTEXT:
     250            DPRINTF_EDIT_MSG32("EM_FINDTEXT Ignored");
     251            return 0;
     252
     253    case EM_FINDTEXTEX:
     254            DPRINTF_EDIT_MSG32("EM_FINDTEXTEX Ignored");
     255            return 0;
     256
     257    case EM_FINDTEXTEXW:
     258            DPRINTF_EDIT_MSG32("EM_FINDTEXTEXW Ignored");
     259            return 0;
     260
     261    case EM_FINDTEXTW:
     262            DPRINTF_EDIT_MSG32("EM_FINDTEXTW Ignored");
     263            return 0;
     264
     265    case EM_FINDWORDBREAK:
     266            DPRINTF_EDIT_MSG32("EM_FINDWORDBREAK Ignored");
     267            return 0;
     268
     269    case EM_FORMATRANGE:
     270            DPRINTF_EDIT_MSG32("EM_FORMATRANGE Ignored");
     271            return 0;
     272
     273    case EM_GETAUTOURLDETECT:
     274            DPRINTF_EDIT_MSG32("EM_GETAUTOURLDETECT Ignored");
     275            return 0;
     276
     277    case EM_GETBIDIOPTIONS:
     278            DPRINTF_EDIT_MSG32("EM_GETBIDIOPTIONS Ignored");
     279            return 0;
     280
     281    case EM_GETCHARFORMAT:
     282            DPRINTF_EDIT_MSG32("EM_GETCHARFORMAT Ignored");
     283            return 0;
     284
     285    case EM_GETEDITSTYLE:
     286            DPRINTF_EDIT_MSG32("EM_GETEDITSTYLE Ignored");
     287            return 0;
     288
     289    case EM_GETEVENTMASK:
     290            DPRINTF_EDIT_MSG32("EM_GETEVENTMASK Ignored");
     291            return 0;
     292
     293    case EM_GETIMECOLOR:
     294            DPRINTF_EDIT_MSG32("EM_GETIMECOLOR Ignored");
     295            return 0;
     296
     297    case EM_GETIMECOMPMODE:
     298            DPRINTF_EDIT_MSG32("EM_GETIMECOMPMODE Ignored");
     299            return 0;
     300
     301    case EM_GETIMEOPTIONS:
     302            DPRINTF_EDIT_MSG32("EM_GETIMEOPTIONS Ignored");
     303            return 0;
     304
     305    case EM_GETLANGOPTIONS:
     306            DPRINTF_EDIT_MSG32("STUB: EM_GETLANGOPTIONS");
     307            return 0;
     308
     309    case EM_GETOLEINTERFACE:
     310            DPRINTF_EDIT_MSG32("EM_GETOLEINTERFACE Ignored");
     311            return 0;
     312
     313    case EM_GETOPTIONS:
     314            DPRINTF_EDIT_MSG32("EM_GETOPTIONS Ignored");
     315            return 0;
     316
     317    case EM_GETPARAFORMAT:
     318            DPRINTF_EDIT_MSG32("EM_GETPARAFORMAT Ignored");
     319            return 0;
     320
     321    case EM_GETPUNCTUATION:
     322            DPRINTF_EDIT_MSG32("EM_GETPUNCTUATION Ignored");
     323            return 0;
     324
     325    case EM_GETREDONAME:
     326            DPRINTF_EDIT_MSG32("EM_GETREDONAME Ignored");
     327            return 0;
     328
     329    case EM_GETSCROLLPOS:
     330            DPRINTF_EDIT_MSG32("EM_GETSCROLLPOS Ignored");
     331            return 0;
     332
     333    case EM_GETSELTEXT:
     334            DPRINTF_EDIT_MSG32("EM_GETSELTEXT");
     335            return RICHEDIT_GetSelText(hwndEdit,(void *)lParam);
     336
     337    case EM_GETTEXTEX:
     338            DPRINTF_EDIT_MSG32("EM_GETTEXTEX Ignored");
     339            return 0;
     340
     341    case EM_GETTEXTLENGTHEX:
     342            DPRINTF_EDIT_MSG32("EM_GETTEXTLENGTHEX Ignored");
     343            return 0;
     344
     345    case EM_GETTEXTMODE:
     346            DPRINTF_EDIT_MSG32("EM_GETTEXTMODE Ignored");
     347            return 0;
     348
     349    case EM_GETTEXTRANGE:
     350            DPRINTF_EDIT_MSG32("EM_GETTEXTRANGE");
     351            return RICHEDIT_GetTextRange(hwndEdit,(TEXTRANGEA *)lParam);
     352
     353    case EM_GETTYPOGRAPHYOPTIONS:
     354            DPRINTF_EDIT_MSG32("EM_GETTYPOGRAPHYOPTIONS Ignored");
     355            return 0;
     356
     357    case EM_GETUNDONAME:
     358            DPRINTF_EDIT_MSG32("EM_GETUNDONAME Ignored");
     359            return 0;
     360
     361    case EM_GETWORDBREAKPROCEX:
     362            DPRINTF_EDIT_MSG32("EM_GETWORDBREAKPROCEX Ignored");
     363            return 0;
     364
     365    case EM_GETWORDWRAPMODE:
     366            DPRINTF_EDIT_MSG32("EM_GETWORDWRAPMODE Ignored");
     367            return 0;
     368
     369    case EM_GETZOOM:
     370            DPRINTF_EDIT_MSG32("EM_GETZOOM Ignored");
     371            return 0;
     372
     373    case EM_HIDESELECTION:
     374            DPRINTF_EDIT_MSG32("EM_HIDESELECTION Ignored");
     375            return 0;
     376
     377    case EM_PASTESPECIAL:
     378            DPRINTF_EDIT_MSG32("EM_PASTESPECIAL Ignored");
     379            return 0;
     380
     381    case EM_RECONVERSION:
     382            DPRINTF_EDIT_MSG32("EM_RECONVERSION Ignored");
     383            return 0;
     384
     385    case EM_REDO:
     386            DPRINTF_EDIT_MSG32("EM_REDO Ignored");
     387            return 0;
     388
     389    case EM_REQUESTRESIZE:
     390            DPRINTF_EDIT_MSG32("EM_REQUESTRESIZE Ignored");
     391            return 0;
     392
     393    case EM_SELECTIONTYPE:
     394            DPRINTF_EDIT_MSG32("EM_SELECTIONTYPE Ignored");
     395            return 0;
     396
     397    case EM_SETBIDIOPTIONS:
     398            DPRINTF_EDIT_MSG32("EM_SETBIDIOPTIONS Ignored");
     399            return 0;
     400
     401    case EM_SETBKGNDCOLOR:
     402            DPRINTF_EDIT_MSG32("EM_SETBKGNDCOLOR Ignored");
     403            return 0;
     404
     405    case EM_SETCHARFORMAT:
     406            DPRINTF_EDIT_MSG32("EM_SETCHARFORMAT Ignored");
     407            return 0;
     408
     409    case EM_SETEDITSTYLE:
     410            DPRINTF_EDIT_MSG32("EM_SETEDITSTYLE Ignored");
     411            return 0;
     412
     413    case EM_SETEVENTMASK:
     414            DPRINTF_EDIT_MSG32("EM_SETEVENTMASK Ignored");
     415            return 0;
     416
     417    case EM_SETFONTSIZE:
     418            DPRINTF_EDIT_MSG32("EM_SETFONTSIZE Ignored");
     419            return 0;
     420
     421    case EM_SETIMECOLOR:
     422            DPRINTF_EDIT_MSG32("EM_SETIMECOLO Ignored");
     423            return 0;
     424
     425    case EM_SETIMEOPTIONS:
     426            DPRINTF_EDIT_MSG32("EM_SETIMEOPTIONS Ignored");
     427            return 0;
     428
     429    case EM_SETLANGOPTIONS:
     430            DPRINTF_EDIT_MSG32("EM_SETLANGOPTIONS Ignored");
     431            return 0;
     432
     433    case EM_SETOLECALLBACK:
     434            DPRINTF_EDIT_MSG32("EM_SETOLECALLBACK Ignored");
     435            return 0;
     436
     437    case EM_SETOPTIONS:
     438            DPRINTF_EDIT_MSG32("EM_SETOPTIONS Ignored");
     439            return 0;
     440
     441    case EM_SETPALETTE:
     442            DPRINTF_EDIT_MSG32("EM_SETPALETTE Ignored");
     443            return 0;
     444
     445    case EM_SETPARAFORMAT:
     446            DPRINTF_EDIT_MSG32("EM_SETPARAFORMAT Ignored");
     447            return 0;
     448
     449    case EM_SETPUNCTUATION:
     450            DPRINTF_EDIT_MSG32("EM_SETPUNCTUATION Ignored");
     451            return 0;
     452
     453    case EM_SETSCROLLPOS:
     454            DPRINTF_EDIT_MSG32("EM_SETSCROLLPOS Ignored");
     455            return 0;
     456
     457    case EM_SETTARGETDEVICE:
     458            DPRINTF_EDIT_MSG32("EM_SETTARGETDEVICE Ignored");
     459            return 0;
     460
     461    case EM_SETTEXTEX:
     462            DPRINTF_EDIT_MSG32("EM_SETTEXTEX Ignored");
     463            return 0;
     464
     465    case EM_SETTEXTMODE:
     466            DPRINTF_EDIT_MSG32("EM_SETTEXTMODE Ignored");
     467            return 0;
     468
     469    case EM_SETTYPOGRAPHYOPTIONS:
     470            DPRINTF_EDIT_MSG32("EM_SETTYPOGRAPHYOPTIONS Ignored");
     471            return 0;
     472
     473    case EM_SETUNDOLIMIT:
     474            DPRINTF_EDIT_MSG32("EM_SETUNDOLIMIT Ignored");
     475            return 0;
     476
     477    case EM_SETWORDBREAKPROCEX:
     478            DPRINTF_EDIT_MSG32("EM_SETWORDBREAKPROCEX Ignored");
     479            return 0;
     480
     481    case EM_SETWORDWRAPMODE:
     482            DPRINTF_EDIT_MSG32("EM_SETWORDWRAPMODE Ignored");
     483            return 0;
     484
     485    case EM_SETZOOM:
     486            DPRINTF_EDIT_MSG32("EM_SETZOOM Ignored");
     487            return 0;
     488
     489    case EM_SHOWSCROLLBAR:
     490            DPRINTF_EDIT_MSG32("EM_SHOWSCROLLBAR Ignored");
     491            return 0;
     492
     493    case EM_STOPGROUPTYPING:
     494            DPRINTF_EDIT_MSG32("EM_STOPGROUPTYPING Ignored");
     495            return 0;
     496
     497    case EM_STREAMOUT:
     498            DPRINTF_EDIT_MSG32("EM_STREAMOUT Ignored");
     499            return 0;
     500
     501/* Messages dispatched to the edit control */
     502     case EM_CANUNDO:
     503            DPRINTF_EDIT_MSG32("EM_CANUNDO Passed to edit control");
     504            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     505     case EM_CHARFROMPOS:
     506            DPRINTF_EDIT_MSG32("EM_CHARFROMPOS Passed to edit control");
     507            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     508     case EM_EMPTYUNDOBUFFER:
     509            DPRINTF_EDIT_MSG32("EM_EMPTYUNDOBUFFER Passed to edit control");
     510            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     511     case EM_FMTLINES:
     512            DPRINTF_EDIT_MSG32("EM_FMTLINES Passed to edit control");
     513            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     514     case EM_GETFIRSTVISIBLELINE:
     515            DPRINTF_EDIT_MSG32("EM_GETFIRSTVISIBLELINE Passed to edit control");
     516            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     517     case EM_GETHANDLE:
     518            DPRINTF_EDIT_MSG32("EM_GETHANDLE Passed to edit control");
     519            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     520 /*    case EM_GETIMESTATUS:*/
     521     case EM_GETLIMITTEXT:
     522            DPRINTF_EDIT_MSG32("EM_GETLIMITTEXT Passed to edit control");
     523            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     524     case EM_GETLINE:
     525            DPRINTF_EDIT_MSG32("EM_GETLINE Passed to edit control");
     526            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     527     case EM_GETLINECOUNT:
     528            DPRINTF_EDIT_MSG32("EM_GETLINECOUNT Passed to edit control");
     529            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     530     case EM_GETMARGINS:
     531            DPRINTF_EDIT_MSG32("EM_GETMARGINS Passed to edit control");
     532            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     533     case EM_GETMODIFY:
     534            DPRINTF_EDIT_MSG32("EM_GETMODIFY Passed to edit control");
     535            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     536     case EM_GETPASSWORDCHAR:
     537            DPRINTF_EDIT_MSG32("EM_GETPASSWORDCHAR Passed to edit control");
     538            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     539     case EM_GETRECT:
     540            DPRINTF_EDIT_MSG32("EM_GETRECT Passed to edit control");
     541            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     542     case EM_GETSEL:
     543            DPRINTF_EDIT_MSG32("EM_GETSEL Passed to edit control");
     544            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     545     case EM_GETTHUMB:
     546            DPRINTF_EDIT_MSG32("EM_GETTHUMB Passed to edit control");
     547            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     548     case EM_GETWORDBREAKPROC:
     549            DPRINTF_EDIT_MSG32("EM_GETWORDBREAKPROC Passed to edit control");
     550            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     551     case EM_LINEFROMCHAR:
     552            DPRINTF_EDIT_MSG32("EM_LINEFROMCHAR Passed to edit control");
     553            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     554     case EM_LINEINDEX:
     555            DPRINTF_EDIT_MSG32("EM_LINEINDEX Passed to edit control");
     556            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     557     case EM_LINELENGTH:
     558            DPRINTF_EDIT_MSG32("EM_LINELENGTH Passed to edit control");
     559            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     560     case EM_LINESCROLL:
     561            DPRINTF_EDIT_MSG32("EM_LINESCROLL Passed to edit control");
     562            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     563     case EM_POSFROMCHAR:
     564            DPRINTF_EDIT_MSG32("EM_POSFROMCHAR Passed to edit control");
     565            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     566     case EM_REPLACESEL:
     567            DPRINTF_EDIT_MSG32("case EM_REPLACESEL Passed to edit control");
     568            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     569     case EM_SCROLL:
     570            DPRINTF_EDIT_MSG32("case EM_SCROLL Passed to edit control");
     571            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     572     case EM_SCROLLCARET:
     573            DPRINTF_EDIT_MSG32("EM_SCROLLCARET Passed to edit control");
     574            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     575     case EM_SETHANDLE:
     576            DPRINTF_EDIT_MSG32("EM_SETHANDLE Passed to edit control");
     577            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     578 /*    case EM_SETIMESTATUS:*/
     579     case EM_SETLIMITTEXT:
     580            DPRINTF_EDIT_MSG32("EM_SETLIMITTEXT Passed to edit control");
     581            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     582     case EM_SETMARGINS:
     583            DPRINTF_EDIT_MSG32("case EM_SETMARGINS Passed to edit control");
     584            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     585     case EM_SETMODIFY:
     586            DPRINTF_EDIT_MSG32("EM_SETMODIFY Passed to edit control");
     587            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     588     case EM_SETPASSWORDCHAR:
     589            DPRINTF_EDIT_MSG32("EM_SETPASSWORDCHAR Passed to edit control");
     590            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     591     case EM_SETREADONLY:
     592            DPRINTF_EDIT_MSG32("EM_SETREADONLY Passed to edit control");
     593            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     594     case EM_SETRECT:
     595            DPRINTF_EDIT_MSG32("EM_SETRECT Passed to edit control");
     596            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     597     case EM_SETRECTNP:
     598            DPRINTF_EDIT_MSG32("EM_SETRECTNP Passed to edit control");
     599            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     600     case EM_SETSEL:
     601            DPRINTF_EDIT_MSG32("EM_SETSEL Passed to edit control");
     602            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     603     case EM_SETTABSTOPS:
     604            DPRINTF_EDIT_MSG32("EM_SETTABSTOPS Passed to edit control");
     605            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     606     case EM_SETWORDBREAKPROC:
     607            DPRINTF_EDIT_MSG32("EM_SETWORDBREAKPROC Passed to edit control");
     608            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     609     case EM_UNDO:
     610            DPRINTF_EDIT_MSG32("EM_UNDO Passed to edit control");
     611            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     612
     613     case WM_STYLECHANGING:
     614            DPRINTF_EDIT_MSG32("WM_STYLECHANGING Passed to edit control");
     615            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     616     case WM_STYLECHANGED:
     617            DPRINTF_EDIT_MSG32("WM_STYLECHANGED Passed to edit control");
     618            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     619     case WM_NCCALCSIZE:
     620            DPRINTF_EDIT_MSG32("WM_NCCALCSIZE Passed to edit control");
     621            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     622     case WM_GETTEXT:
     623            DPRINTF_EDIT_MSG32("WM_GETTEXT Passed to edit control");
     624            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     625     case WM_GETTEXTLENGTH:
     626            DPRINTF_EDIT_MSG32("WM_GETTEXTLENGTH Passed to edit control");
     627            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     628     case WM_SETTEXT:
     629            DPRINTF_EDIT_MSG32("WM_SETTEXT Passed to edit control");
     630            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     631     case WM_CUT:
     632            DPRINTF_EDIT_MSG32("WM_CUT Passed to edit control");
     633            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     634     case WM_COPY:
     635            DPRINTF_EDIT_MSG32("WM_COPY Passed to edit control");
     636            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     637    case WM_PASTE:
     638            DPRINTF_EDIT_MSG32("WM_PASTE Passed to edit control");
     639            return SendMessageA( hwndEdit, uMsg, wParam, lParam);
     640
     641    /* Messages passed to default handler. */
     642    case WM_NCPAINT:
     643        DPRINTF_EDIT_MSG32("WM_NCPAINT Passed to default");
     644        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     645    case WM_PAINT:
     646        DPRINTF_EDIT_MSG32("WM_PAINT Passed to default");
     647        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     648    case WM_ERASEBKGND:
     649        DPRINTF_EDIT_MSG32("WM_ERASEBKGND Passed to default");
     650        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     651    case WM_KILLFOCUS:
     652        DPRINTF_EDIT_MSG32("WM_KILLFOCUS Passed to default");
     653        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     654    case WM_DESTROY:
     655        DPRINTF_EDIT_MSG32("WM_DESTROY Passed to default");
     656        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     657    case WM_CHILDACTIVATE:
     658        DPRINTF_EDIT_MSG32("WM_CHILDACTIVATE Passed to default");
     659        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     660
     661    case WM_WINDOWPOSCHANGING:
     662        DPRINTF_EDIT_MSG32("WM_WINDOWPOSCHANGING Passed to default");
     663        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     664    case WM_WINDOWPOSCHANGED:
     665        DPRINTF_EDIT_MSG32("WM_WINDOWPOSCHANGED Passed to default");
     666        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     667/*    case WM_INITIALUPDATE:
     668        DPRINTF_EDIT_MSG32("WM_INITIALUPDATE Passed to default");
     669        return DefWindowProcA( hwnd,uMsg,wParam,lParam); */
     670    case WM_CTLCOLOREDIT:
     671        DPRINTF_EDIT_MSG32("WM_CTLCOLOREDIT Passed to default");
     672        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     673    case WM_SETCURSOR:
     674        DPRINTF_EDIT_MSG32("WM_SETCURSOR Passed to default");
     675        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     676    case WM_MOVE:
     677        DPRINTF_EDIT_MSG32("WM_MOVE Passed to default");
     678        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     679    case WM_SHOWWINDOW:
     680        DPRINTF_EDIT_MSG32("WM_SHOWWINDOW Passed to default");
     681        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     682    case WM_NCCREATE:
     683        DPRINTF_EDIT_MSG32("WM_NCCREATE Passed to default");
     684        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     685    case WM_PARENTNOTIFY:
     686        DPRINTF_EDIT_MSG32("WM_PARENTNOTIFY Passed to default");
     687        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     688    case WM_SETREDRAW:
     689        DPRINTF_EDIT_MSG32("WM_SETREDRAW Passed to default");
     690        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     691    case WM_NCDESTROY:
     692        DPRINTF_EDIT_MSG32("WM_NCDESTROY Passed to default");
     693        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     694    case WM_NCHITTEST:
     695        DPRINTF_EDIT_MSG32("WM_NCHITTEST Passed to default");
     696        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     697    case WM_CTLCOLORSTATIC:
     698        DPRINTF_EDIT_MSG32("WM_CTLCOLORSTATIC Passed to default");
     699        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     700    case WM_NCMOUSEMOVE:
     701        DPRINTF_EDIT_MSG32("WM_NCMOUSEMOVE Passed to default");
     702        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     703    case WM_CLEAR:
     704        DPRINTF_EDIT_MSG32("WM_CLEAR Passed to default");
     705        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     706   /*
     707    * used by IE in the EULA box
     708    */
     709    case WM_ALTTABACTIVE:
     710        DPRINTF_EDIT_MSG32("WM_ALTTABACTIVE");
     711        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     712    case WM_GETDLGCODE:
     713        DPRINTF_EDIT_MSG32("WM_GETDLGCODE");
     714        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     715    case WM_SETFONT:
     716        DPRINTF_EDIT_MSG32("WM_SETFONT");
     717        return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     718
    171719    }
    172     /*return SendMessageA( hwndEdit,uMsg,wParam,lParam);*/
    173     return DefWindowProcA( hwnd,uMsg,wParam,lParam);
     720
     721    FIXME("Unknown message 0x%x Passed to default hwnd=%p, wParam=%08x, lParam=%08x\n",
     722           uMsg, hwnd, (UINT)wParam, (UINT)lParam);
     723
     724   return DefWindowProcA( hwnd,uMsg,wParam,lParam);
    174725}
    175726
    176 /*
    177  * DllGetVersion [COMCTL32.25]
    178  *
    179  * Retrieves version information of the 'COMCTL32.DLL'
     727/***********************************************************************
     728 * DllGetVersion [RICHED32.2]
     729 *
     730 * Retrieves version information of the 'RICHED32.DLL'
    180731 *
    181732 * PARAMS
     
    193744RICHED32_DllGetVersion (DLLVERSIONINFO *pdvi)
    194745{
     746    TRACE("\n");
     747
    195748    if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
    196749
     
    219772{
    220773    WNDCLASSA wndClass;
     774
     775    TRACE("\n");
    221776
    222777    ZeroMemory(&wndClass, sizeof(WNDCLASSA));
     
    227782    wndClass.hCursor = LoadCursorA(0, IDC_ARROWA);
    228783    wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
    229     wndClass.lpszClassName = RICHEDIT_CLASS10A;//WC_RICHED32A;
     784    wndClass.lpszClassName = RICHEDIT_CLASS10A; /* WC_RICHED32A; */
    230785
    231786    RegisterClassA (&wndClass);
     
    244799VOID RICHED32_Unregister(void)
    245800{
     801    TRACE("\n");
     802
    246803    UnregisterClassA(RICHEDIT_CLASS10A, (HINSTANCE)NULL);
    247804}
     805
     806INT RICHEDIT_GetTextRange(HWND hwnd,TEXTRANGEA *tr)
     807{
     808    UINT alloc_size, text_size, range_size;
     809    char *text;
     810
     811    TRACE("start: 0x%x stop: 0x%x\n",(INT)tr->chrg.cpMin,(INT)tr->chrg.cpMax);
     812
     813    if (!(alloc_size = SendMessageA(hwnd,WM_GETTEXTLENGTH,0,0))) return FALSE;
     814    if (!(text = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (alloc_size+1))))
     815                return FALSE;
     816    text_size = SendMessageA(hwnd,WM_GETTEXT,alloc_size,(INT)text);
     817
     818    if (text_size > tr->chrg.cpMin)
     819    {
     820       range_size = (text_size> tr->chrg.cpMax) ? (tr->chrg.cpMax - tr->chrg.cpMin) : (text_size - tr->chrg.cpMin);
     821       TRACE("EditText: %.30s ...\n",text+tr->chrg.cpMin);
     822       memcpy(tr->lpstrText,text+tr->chrg.cpMin,range_size);
     823    }
     824    else range_size = 0;
     825    HeapFree(GetProcessHeap(), 0, text);
     826
     827    return range_size;
     828}
     829
     830INT RICHEDIT_GetSelText(HWND hwnd,LPSTR lpstrBuffer)
     831{
     832    TEXTRANGEA textrange;
     833
     834    textrange.lpstrText = lpstrBuffer;
     835    SendMessageA(hwnd,EM_GETSEL,(INT)&textrange.chrg.cpMin,(INT)&textrange.chrg.cpMax);
     836    return RICHEDIT_GetTextRange(hwnd,&textrange);
     837}
  • trunk/src/riched32/rtf.h

    r3515 r9407  
    33
    44#include <stdio.h>
    5 #include <windows.h>
    6 #include <richedit.h>
     5
     6#include "windef.h"
     7#include "winbase.h"
     8#include "wingdi.h"
     9#include "winuser.h"
     10#include "richedit.h"
     11
    712void RTFSetEditStream(EDITSTREAM *es);
    813
     
    428433extern int      rtfMinor;               /* token minor number */
    429434extern int      rtfParam;               /* control symbol parameter */
     435extern int      rtfFormat;              /* either SF_RTF or SF_TEXT */
    430436
    431437# ifdef THINK_C
     
    14211427char            *RTFStrSave ();
    14221428void            RTFFree ();
    1423 int             RTFCharToHex ();
     1429int             RTFCharToHex (char);
    14241430int             RTFHexToChar ();
    14251431void            RTFSetMsgProc ();
  • trunk/src/riched32/stdcharnames.h

    r3515 r9407  
     1static char     *stdCharName[] =
     2{
    13        "nothing",
    24        "space",
     
    351353        "mathequal",
    352354        "mathtilde",
     355        (char *) NULL
     356};
  • trunk/src/riched32/text-writer.c

    r3922 r9407  
    1 /* $Id: text-writer.c,v 1.2 2000-08-02 14:58:40 bird Exp $ */
    21/*
    32 * text-writer -- RTF-to-text translation writer code.
     
    3837 */
    3938
    40 # include       <stdio.h>
    41 
    42 # include       "rtf.h"
    43 # include       "rtf2text.h"
    44 # include       "charlist.h"
     39#include <stdio.h>
     40
     41#include "rtf.h"
     42#include "rtf2text.h"
     43#include "charlist.h"
     44#include "wine/debug.h"
     45
     46WINE_DEFAULT_DEBUG_CHANNEL(richedit);
    4547
    4648static void     TextClass ();
     
    6365   /* we require one more for the '\0'                          */
    6466
     67   TRACE("\n");
    6568
    6669   if(nBufferSize < charlist.nCount + 1) {
     
    121124char    buf[rtfBufSiz];
    122125
    123         if (rtfMinor != rtfSC_nothing)
     126        TRACE("\n");
     127
     128        if (rtfFormat == SF_TEXT)
     129                PutLitChar (rtfMajor);
     130        else if (rtfMinor != rtfSC_nothing)
    124131                PutStdChar (rtfMinor);
    125132        else
     
    137144ControlClass ()
    138145{
     146        TRACE("\n");
    139147        switch (rtfMajor)
    140148        {
     
    158166Destination ()
    159167{
     168
     169        TRACE("\n");
     170
    160171        switch (rtfMinor)
    161172        {
     
    187198void SpecialChar ()
    188199{
     200
     201        TRACE("\n");
     202
    189203        switch (rtfMinor)
    190204        {
     
    251265                RTFPanic ("Unknown character code, logic error\n");
    252266*/
     267        TRACE("\n");
     268
    253269        oStr = outMap[stdCode];
    254270        if (oStr == (char *) NULL)      /* no output sequence in map */
  • trunk/src/riched32/text_map.h

    r3515 r9407  
    11/*
    22 *  Output sequence map for rtf2text
    3  * 
     3 *
    44 *  Field 1 is the standard character name.  Field 2 is the output sequence
    55 *  to produce for that character.
    6  * 
     6 *
    77 *  The output sequence is simply a string of characters.  If it contains
    88 *  whitespace, it may be quoted.  If it contains quotes, it may be quoted
    99 *  with a different quote character.
    10  * 
     10 *
    1111 *  characters in ASCII range (32-127
    1212 */
Note: See TracChangeset for help on using the changeset viewer.