TextSrc.c

Go to the documentation of this file.
00001 /* $XConsortium: TextSrc.c,v 1.15 94/04/17 20:13:14 kaleb Exp $ */
00002 /*
00003 
00004 Copyright (c) 1989, 1994  X Consortium
00005 
00006 Permission is hereby granted, free of charge, to any person obtaining a copy
00007 of this software and associated documentation files (the "Software"), to deal
00008 in the Software without restriction, including without limitation the rights
00009 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00010 copies of the Software, and to permit persons to whom the Software is
00011 furnished to do so, subject to the following conditions:
00012 
00013 The above copyright notice and this permission notice shall be included in
00014 all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00019 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00020 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00021 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022 
00023 Except as contained in this notice, the name of the X Consortium shall not be
00024 used in advertising or otherwise to promote the sale, use or other dealings
00025 in this Software without prior written authorization from the X Consortium.
00026 
00027 */
00028 
00029 /*
00030  * Author:  Chris Peterson, MIT X Consortium.
00031  * Much code taken from X11R3 String and Disk Sources.
00032  */
00033 
00034 /*
00035  * TextSrc.c - TextSrc object. (For use with the text widget).
00036  *
00037  */
00038 
00039 #include <X11/IntrinsicP.h>
00040 #include <X11/StringDefs.h>
00041 #include <X11/Xutil.h>
00042 #include <X11/Xaw3d/XawInit.h>
00043 #include <X11/Xaw3d/TextSrcP.h>
00044 #include <X11/Xmu/Atoms.h>
00045 #include <X11/Xmu/CharSet.h>
00046 #include "XawI18n.h"
00047 #include <stdio.h>
00048 #include <ctype.h>
00049 
00050 /****************************************************************
00051  *
00052  * Full class record constant
00053  *
00054  ****************************************************************/
00055 
00056 /* Private Data */
00057 
00058 #define offset(field) XtOffsetOf(TextSrcRec, textSrc.field)
00059 static XtResource resources[] = {
00060     {XtNeditType, XtCEditType, XtREditMode, sizeof(XawTextEditType), 
00061         offset(edit_mode), XtRString, "read"},
00062 };
00063 
00064 static void ClassInitialize(), ClassPartInitialize(), SetSelection();
00065 static void CvtStringToEditMode();
00066 static Boolean ConvertSelection();
00067 static XawTextPosition Search(), Scan(), Read();
00068 static int Replace();
00069 
00070 #define SuperClass              (&objectClassRec)
00071 TextSrcClassRec textSrcClassRec = {
00072   {
00073 /* core_class fields */ 
00074     /* superclass               */      (WidgetClass) SuperClass,
00075     /* class_name               */      "TextSrc",
00076     /* widget_size              */      sizeof(TextSrcRec),
00077     /* class_initialize         */      ClassInitialize,
00078     /* class_part_initialize    */      ClassPartInitialize,
00079     /* class_inited             */      FALSE,
00080     /* initialize               */      NULL,
00081     /* initialize_hook          */      NULL,
00082     /* realize                  */      NULL,
00083     /* actions                  */      NULL,
00084     /* num_actions              */      0,
00085     /* resources                */      resources,
00086     /* num_resources            */      XtNumber(resources),
00087     /* xrm_class                */      NULLQUARK,
00088     /* compress_motion          */      FALSE,
00089     /* compress_exposure        */      FALSE,
00090     /* compress_enterleave      */      FALSE,
00091     /* visible_interest         */      FALSE,
00092     /* destroy                  */      NULL,
00093     /* resize                   */      NULL,
00094     /* expose                   */      NULL,
00095     /* set_values               */      NULL,
00096     /* set_values_hook          */      NULL,
00097     /* set_values_almost        */      NULL,
00098     /* get_values_hook          */      NULL,
00099     /* accept_focus             */      NULL,
00100     /* version                  */      XtVersion,
00101     /* callback_private         */      NULL,
00102     /* tm_table                 */      NULL,
00103     /* query_geometry           */      NULL,
00104     /* display_accelerator      */      NULL,
00105     /* extension                */      NULL,
00106   },
00107 /* textSrc_class fields */
00108   {
00109     /* Read                     */      Read,
00110     /* Replace                  */      Replace,
00111     /* Scan                     */      Scan,
00112     /* Search                   */      Search,
00113     /* SetSelection             */      SetSelection,
00114     /* ConvertSelection         */      ConvertSelection
00115   }
00116 };
00117 
00118 WidgetClass textSrcObjectClass = (WidgetClass)&textSrcClassRec;
00119 
00120 static void 
00121 ClassInitialize ()
00122 {
00123     XawInitializeWidgetSet ();
00124     XtAddConverter(XtRString, XtREditMode,   CvtStringToEditMode,   NULL, 0);
00125 }
00126 
00127 
00128 static void
00129 ClassPartInitialize(wc)
00130 WidgetClass wc;
00131 {
00132   TextSrcObjectClass t_src, superC;
00133 
00134   t_src = (TextSrcObjectClass) wc;
00135   superC = (TextSrcObjectClass) t_src->object_class.superclass;
00136 
00137 /* 
00138  * We don't need to check for null super since we'll get to TextSrc
00139  * eventually.
00140  */
00141     if (t_src->textSrc_class.Read == XtInheritRead) 
00142       t_src->textSrc_class.Read = superC->textSrc_class.Read;
00143 
00144     if (t_src->textSrc_class.Replace == XtInheritReplace) 
00145       t_src->textSrc_class.Replace = superC->textSrc_class.Replace;
00146 
00147     if (t_src->textSrc_class.Scan == XtInheritScan) 
00148       t_src->textSrc_class.Scan = superC->textSrc_class.Scan;
00149 
00150     if (t_src->textSrc_class.Search == XtInheritSearch) 
00151       t_src->textSrc_class.Search = superC->textSrc_class.Search;
00152 
00153     if (t_src->textSrc_class.SetSelection == XtInheritSetSelection) 
00154       t_src->textSrc_class.SetSelection = superC->textSrc_class.SetSelection;
00155 
00156     if (t_src->textSrc_class.ConvertSelection == XtInheritConvertSelection) 
00157       t_src->textSrc_class.ConvertSelection =
00158                                        superC->textSrc_class.ConvertSelection;
00159 }
00160 
00161 /************************************************************
00162  *
00163  * Class specific methods.
00164  *
00165  ************************************************************/
00166 
00167 /*      Function Name: Read
00168  *      Description: This function reads the source.
00169  *      Arguments: w - the TextSrc Object.
00170  *                 pos - position of the text to retreive.
00171  * RETURNED        text - text block that will contain returned text.
00172  *                 length - maximum number of characters to read.
00173  *      Returns: The number of characters read into the buffer.
00174  */
00175 
00176 /* ARGSUSED */
00177 static XawTextPosition
00178 Read(w, pos, text, length)
00179 Widget w;
00180 XawTextPosition pos;
00181 XawTextBlock *text;     
00182 int length;             
00183 {
00184   XtAppError(XtWidgetToApplicationContext(w), 
00185              "TextSrc Object: No read function is defined.");
00186 
00187   return( (XawTextPosition) 0 ); /* for gcc -Wall and lint */
00188 }
00189 
00190 /*      Function Name: Replace.
00191  *      Description: Replaces a block of text with new text.
00192  *      Arguments: src - the Text Source Object.
00193  *                 startPos, endPos - ends of text that will be removed.
00194  *                 text - new text to be inserted into buffer at startPos.
00195  *      Returns: XawEditError.
00196  */
00197 
00198 /*ARGSUSED*/
00199 static int 
00200 Replace (w, startPos, endPos, text)
00201 Widget w;
00202 XawTextPosition startPos, endPos;
00203 XawTextBlock *text;
00204 {
00205   return(XawEditError);
00206 }
00207 
00208 /*      Function Name: Scan
00209  *      Description: Scans the text source for the number and type
00210  *                   of item specified.
00211  *      Arguments: w - the TextSrc Object.
00212  *                 position - the position to start scanning.
00213  *                 type - type of thing to scan for.
00214  *                 dir - direction to scan.
00215  *                 count - which occurance if this thing to search for.
00216  *                 include - whether or not to include the character found in
00217  *                           the position that is returned. 
00218  *      Returns: EXITS WITH AN ERROR MESSAGE.
00219  *
00220  */
00221 
00222 /* ARGSUSED */
00223 static 
00224 XawTextPosition 
00225 Scan (w, position, type, dir, count, include)
00226 Widget                w;
00227 XawTextPosition       position;
00228 XawTextScanType       type;
00229 XawTextScanDirection  dir;
00230 int                   count;
00231 Boolean               include;
00232 {
00233   XtAppError(XtWidgetToApplicationContext(w), 
00234              "TextSrc Object: No SCAN function is defined.");
00235 
00236   return( (XawTextPosition) 0 ); /* for gcc -Wall and lint */
00237 }
00238 
00239 /*      Function Name: Search
00240  *      Description: Searchs the text source for the text block passed
00241  *      Arguments: w - the TextSource Object.
00242  *                 position - the position to start scanning.
00243  *                 dir - direction to scan.
00244  *                 text - the text block to search for.
00245  *      Returns: XawTextSearchError.
00246  */
00247 
00248 /* ARGSUSED */
00249 static XawTextPosition 
00250 Search(w, position, dir, text)
00251 Widget                w;
00252 XawTextPosition       position;
00253 XawTextScanDirection  dir;
00254 XawTextBlock *        text;
00255 {
00256   return(XawTextSearchError);
00257 }
00258 
00259 /*      Function Name: ConvertSelection
00260  *      Description: Dummy selection converter.
00261  *      Arguments: w - the TextSrc object.
00262  *                 selection - the current selection atom.
00263  *                 target    - the current target atom.
00264  *                 type      - the type to conver the selection to.
00265  * RETURNED        value, length - the return value that has been converted.
00266  * RETURNED        format    - the format of the returned value.
00267  *      Returns: TRUE if the selection has been converted.
00268  *
00269  */
00270 
00271 /* ARGSUSED */
00272 static Boolean
00273 ConvertSelection(w, selection, target, type, value, length, format)
00274 Widget w;
00275 Atom * selection, * target, * type;
00276 XtPointer * value;
00277 unsigned long * length;
00278 int * format;
00279 {
00280   return(FALSE);
00281 }
00282 
00283 /*      Function Name: SetSelection
00284  *      Description: allows special setting of the selection.
00285  *      Arguments: w - the TextSrc object.
00286  *                 left, right - bounds of the selection.
00287  *                 selection - the selection atom.
00288  *      Returns: none
00289  */
00290 
00291 /* ARGSUSED */
00292 static void
00293 SetSelection(w, left, right, selection)
00294 Widget w;
00295 XawTextPosition left, right;
00296 Atom selection;
00297 {
00298   /* This space intentionally left blank. */
00299 }
00300 
00301 
00302 /* ARGSUSED */
00303 static void 
00304 CvtStringToEditMode(args, num_args, fromVal, toVal)
00305 XrmValuePtr args;               /* unused */
00306 Cardinal        *num_args;      /* unused */
00307 XrmValuePtr     fromVal;
00308 XrmValuePtr     toVal;
00309 {
00310   static XawTextEditType editType;
00311   static  XrmQuark  QRead, QAppend, QEdit;
00312   XrmQuark    q;
00313   char        lowerName[40];
00314   static Boolean inited = FALSE;
00315     
00316   if ( !inited ) {
00317     QRead   = XrmPermStringToQuark(XtEtextRead);
00318     QAppend = XrmPermStringToQuark(XtEtextAppend);
00319     QEdit   = XrmPermStringToQuark(XtEtextEdit);
00320     inited = TRUE;
00321   }
00322 
00323   if (strlen ((char*) fromVal->addr) < sizeof lowerName) {
00324     XmuCopyISOLatin1Lowered (lowerName, (char *)fromVal->addr);
00325     q = XrmStringToQuark(lowerName);
00326 
00327     if      (q == QRead)   editType = XawtextRead;
00328     else if (q == QAppend) editType = XawtextAppend;
00329     else if (q == QEdit)   editType = XawtextEdit;
00330     else {
00331       toVal->size = 0;
00332       toVal->addr = NULL;
00333       return;
00334     }
00335     toVal->size = sizeof editType;
00336     toVal->addr = (XPointer) &editType;
00337     return;
00338   }
00339   toVal->size = 0;
00340   toVal->addr = NULL;
00341 }
00342 
00343 
00344 
00345 /************************************************************
00346  *
00347  * Public Functions.
00348  *
00349  ************************************************************/
00350 
00351 /*      Function Name: XawTextSourceRead
00352  *      Description: This function reads the source.
00353  *      Arguments: w - the TextSrc Object.
00354  *                 pos - position of the text to retreive.
00355  * RETURNED        text - text block that will contain returned text.
00356  *                 length - maximum number of characters to read.
00357  *      Returns: The number of characters read into the buffer.
00358  */
00359 
00360 XawTextPosition
00361 #if NeedFunctionPrototypes
00362 XawTextSourceRead(Widget w, XawTextPosition pos, XawTextBlock *text,
00363                   int length)
00364 #else
00365 XawTextSourceRead(w, pos, text, length)
00366 Widget w;
00367 XawTextPosition pos;
00368 XawTextBlock *text;     
00369 int length;
00370 #endif
00371 {
00372   TextSrcObjectClass class = (TextSrcObjectClass) w->core.widget_class;
00373 
00374   if ( !XtIsSubclass( w, textSrcObjectClass ) )
00375       XtErrorMsg("bad argument", "textSource", "XawError",
00376                 "XawTextSourceRead's 1st parameter must be subclass of asciiSrc.",
00377                    NULL, NULL);
00378 
00379   return((*class->textSrc_class.Read)(w, pos, text, length));
00380 }
00381 
00382 /*      Function Name: XawTextSourceReplace.
00383  *      Description: Replaces a block of text with new text.
00384  *      Arguments: src - the Text Source Object.
00385  *                 startPos, endPos - ends of text that will be removed.
00386  *                 text - new text to be inserted into buffer at startPos.
00387  *      Returns: XawEditError or XawEditDone.
00388  */
00389 
00390 /*ARGSUSED*/
00391 int
00392 #if NeedFunctionPrototypes
00393 XawTextSourceReplace (Widget w, XawTextPosition startPos, 
00394                       XawTextPosition endPos, XawTextBlock *text)
00395 #else
00396 XawTextSourceReplace (w, startPos, endPos, text)
00397 Widget w;
00398 XawTextPosition startPos, endPos;
00399 XawTextBlock *text;
00400 #endif
00401 {
00402   TextSrcObjectClass class = (TextSrcObjectClass) w->core.widget_class;
00403 
00404   if ( !XtIsSubclass( w, textSrcObjectClass ) )
00405       XtErrorMsg("bad argument", "textSource", "XawError",
00406                 "XawTextSourceReplace's 1st parameter must be subclass of asciiSrc.",
00407                    NULL, NULL);
00408 
00409   return((*class->textSrc_class.Replace)(w, startPos, endPos, text));
00410 }
00411 
00412 /*      Function Name: XawTextSourceScan
00413  *      Description: Scans the text source for the number and type
00414  *                   of item specified.
00415  *      Arguments: w - the TextSrc Object.
00416  *                 position - the position to start scanning.
00417  *                 type - type of thing to scan for.
00418  *                 dir - direction to scan.
00419  *                 count - which occurance if this thing to search for.
00420  *                 include - whether or not to include the character found in
00421  *                           the position that is returned. 
00422  *      Returns: The position of the text.
00423  *
00424  */
00425 
00426 XawTextPosition
00427 #if NeedFunctionPrototypes
00428 XawTextSourceScan(Widget w, XawTextPosition position,
00429 #if NeedWidePrototypes
00430                   int type, int dir,
00431 #else
00432                   XawTextScanType type, XawTextScanDirection dir,
00433 #endif
00434                   int count,
00435 #if NeedWidePrototypes
00436                   int include)
00437 #else
00438                   Boolean include)
00439 #endif
00440 #else
00441 XawTextSourceScan(w, position, type, dir, count, include)
00442 Widget                w;
00443 XawTextPosition       position;
00444 XawTextScanType       type;
00445 XawTextScanDirection  dir;
00446 int                   count;
00447 Boolean               include;
00448 #endif
00449 {
00450   TextSrcObjectClass class = (TextSrcObjectClass) w->core.widget_class;
00451 
00452   if ( !XtIsSubclass( w, textSrcObjectClass ) )
00453       XtErrorMsg("bad argument", "textSource", "XawError",
00454                 "XawTextSourceScan's 1st parameter must be subclass of asciiSrc.",
00455                    NULL, NULL);
00456 
00457   return((*class->textSrc_class.Scan)(w, position, type, dir, count, include));
00458 }
00459 
00460 /*      Function Name: XawTextSourceSearch
00461  *      Description: Searchs the text source for the text block passed
00462  *      Arguments: w - the TextSource Object.
00463  *                 position - the position to start scanning.
00464  *                 dir - direction to scan.
00465  *                 text - the text block to search for.
00466  *      Returns: The position of the text we are searching for or
00467  *               XawTextSearchError.
00468  */
00469 
00470 XawTextPosition 
00471 #if NeedFunctionPrototypes
00472 XawTextSourceSearch(Widget w, XawTextPosition position,
00473 #if NeedWidePrototypes
00474                     int dir,
00475 #else
00476                     XawTextScanDirection dir,
00477 #endif
00478                     XawTextBlock *text)
00479 #else
00480 XawTextSourceSearch(w, position, dir, text)
00481 Widget                w;
00482 XawTextPosition       position;
00483 XawTextScanDirection  dir;
00484 XawTextBlock *        text;
00485 #endif
00486 {
00487   TextSrcObjectClass class = (TextSrcObjectClass) w->core.widget_class;
00488 
00489   if ( !XtIsSubclass( w, textSrcObjectClass ) )
00490       XtErrorMsg("bad argument", "textSource", "XawError",
00491                 "XawTextSourceSearch's 1st parameter must be subclass of asciiSrc.",
00492                    NULL, NULL);
00493 
00494   return((*class->textSrc_class.Search)(w, position, dir, text));
00495 }
00496 
00497 /*      Function Name: XawTextSourceConvertSelection
00498  *      Description: Dummy selection converter.
00499  *      Arguments: w - the TextSrc object.
00500  *                 selection - the current selection atom.
00501  *                 target    - the current target atom.
00502  *                 type      - the type to conver the selection to.
00503  * RETURNED        value, length - the return value that has been converted.
00504  * RETURNED        format    - the format of the returned value.
00505  *      Returns: TRUE if the selection has been converted.
00506  *
00507  */
00508 
00509 Boolean
00510 #if NeedFunctionPrototypes
00511 XawTextSourceConvertSelection(Widget w, Atom *selection, Atom *target, 
00512                               Atom *type, XtPointer *value,
00513                               unsigned long *length, int *format)
00514 #else
00515 XawTextSourceConvertSelection(w, selection, 
00516                               target, type, value, length, format)
00517 Widget w;
00518 Atom * selection, * target, * type;
00519 XtPointer * value;
00520 unsigned long * length;
00521 int * format;
00522 #endif
00523 {
00524   TextSrcObjectClass class = (TextSrcObjectClass) w->core.widget_class;
00525 
00526   if ( !XtIsSubclass( w, textSrcObjectClass ) )
00527       XtErrorMsg("bad argument", "textSource", "XawError",
00528                 "XawTextSourceConvertSelectionXawTextSourceConvertSelection's 1st parameter must be subclass of asciiSrc.",
00529                    NULL, NULL);
00530 
00531   return((*class->textSrc_class.ConvertSelection)(w, selection, target, type,
00532                                                   value, length, format));
00533 }
00534 
00535 /*      Function Name: XawTextSourceSetSelection
00536  *      Description: allows special setting of the selection.
00537  *      Arguments: w - the TextSrc object.
00538  *                 left, right - bounds of the selection.
00539  *                 selection - the selection atom.
00540  *      Returns: none
00541  */
00542 
00543 void
00544 #if NeedFunctionPrototypes
00545 XawTextSourceSetSelection(Widget w, XawTextPosition left, 
00546                           XawTextPosition right, Atom selection)
00547 #else
00548 XawTextSourceSetSelection(w, left, right, selection)
00549 Widget w;
00550 XawTextPosition left, right;
00551 Atom selection;
00552 #endif
00553 {
00554   TextSrcObjectClass class = (TextSrcObjectClass) w->core.widget_class;
00555 
00556   if ( !XtIsSubclass( w, textSrcObjectClass ) )
00557       XtErrorMsg("bad argument", "textSource", "XawError",
00558                 "'s 1st parameter must be subclass of asciiSrc.",
00559                    NULL, NULL);
00560 
00561   (*class->textSrc_class.SetSelection)(w, left, right, selection);
00562 }
00563 
00564 /********************************************************************
00565  *
00566  *      External Functions for Multi Text.
00567  *
00568  ********************************************************************/
00569 
00570 /*
00571  * TextFormat(): 
00572  *   returns the format of text: FMT8BIT or FMTWIDE. 
00573  *  
00574  */
00575 XrmQuark
00576 #if NeedFunctionPrototypes
00577 _XawTextFormat(TextWidget tw)
00578 #else
00579 _XawTextFormat(tw)
00580     TextWidget tw;
00581 #endif
00582 {
00583   return (((TextSrcObject)(tw->text.source))->textSrc.text_format);
00584 }
00585 
00586 
00587 /* _XawTextWCToMB():
00588  *   convert the wchar string to external encoding.
00589  *   The caller is responsible for freeing both the source and ret string.
00590  *
00591  * wstr       - source wchar string.
00592  * len_in_out - lengh of string.
00593  *              As In, length of source wchar string, measured in wchar.
00594  *              As Out, length of returned string. 
00595  */
00596 
00597 
00598 char *
00599 _XawTextWCToMB( d, wstr, len_in_out )
00600     Display*    d;
00601     wchar_t*    wstr;
00602     int*        len_in_out;
00603 
00604 {
00605     XTextProperty textprop;
00606     if (XwcTextListToTextProperty(d, (wchar_t**)&wstr, 1,
00607       XTextStyle, &textprop) < Success) {
00608       XtWarningMsg("convertError", "textSource", "XawError",
00609                  "Non-character code(s) in buffer.", NULL, NULL);
00610       *len_in_out = 0;
00611       return( NULL );
00612     }
00613     *len_in_out = textprop.nitems;
00614     return((char *)textprop.value);
00615 }
00616 
00617 
00618 /* _XawTextMBToWC():
00619  *   convert the string to internal processing codeset WC.
00620  *   The caller is responsible for freeing both the source and ret string.
00621  * 
00622  * str        - source string.
00623  * len_in_out - lengh of string.
00624  *              As In, it is length of source string.
00625  *              As Out, it is length of returned string, measured in wchar.
00626  */
00627 
00628 wchar_t* _XawTextMBToWC( d, str, len_in_out )
00629 Display         *d;
00630 char            *str;
00631 int             *len_in_out;
00632 {
00633   if (*len_in_out == 0) {
00634     return(NULL);
00635   } else {
00636     XTextProperty textprop;
00637     char *buf;
00638     wchar_t **wlist, *wstr;
00639     int count;
00640     buf = XtMalloc(*len_in_out + 1);
00641     if (!buf) {
00642         XtErrorMsg("convertError", "multiSourceCreate", "XawError",
00643                  "No Memory", NULL, NULL);
00644         *len_in_out = 0;
00645         return (NULL);   /* The above function doesn't really return. */
00646     }
00647     strncpy(buf, str, *len_in_out);
00648     *(buf + *len_in_out) = '\0';
00649     if (XmbTextListToTextProperty(d, &buf, 1, XTextStyle, &textprop)
00650                         != Success) {
00651         XtWarningMsg("convertError", "textSource", "XawError",
00652                  "No Memory, or Locale not supported.", NULL, NULL);
00653         XtFree(buf);
00654         *len_in_out = 0;
00655         return (NULL);
00656     }
00657     XtFree(buf);
00658     if (XwcTextPropertyToTextList(d, &textprop,
00659                         (wchar_t***)&wlist, &count) != Success) {
00660         XtWarningMsg("convertError", "multiSourceCreate", "XawError",
00661                  "Non-character code(s) in source.", NULL, NULL);
00662         *len_in_out = 0;
00663         return (NULL);
00664     }
00665     wstr = wlist[0];
00666     *len_in_out = wcslen(wstr);
00667     XFree((char**)wlist); /* this is evil */
00668     return(wstr);
00669   }
00670 }
00671 

Generated on Sun Mar 4 15:03:55 2007 for Scilab [trunk] by  doxygen 1.5.1