Changeset 8693


Ignore:
Timestamp:
2004-11-29T15:56:09+13:00 (19 years ago)
Author:
kjdon
Message:

added some changes made by Emanuel Dejanu (Simple Words)

Location:
trunk/gsdl/packages/mg
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/packages/mg/lib/memlib.c

    r439 r8693  
    2424/*
    2525   $Log$
     26   Revision 1.2  2004/11/29 02:56:09  kjdon
     27   added some changes made by Emanuel Dejanu (Simple Words)
     28
    2629   Revision 1.1  1999/08/10 21:16:54  sjboddie
    2730   renamed mg-1.3d directory mg
     
    4245
    4346/* Defined as strdup is not an ANSI function */
     47/* change the name so we do not have problems with other libs */
    4448char *
    45 my_strdup(const char *str)
     49my_mg_strdup(const char *str)
    4650{
    4751  char *ret_str = malloc(strlen(str)+1);
     
    5761Free_func Xfree = free;
    5862
    59 Strdup_func Xstrdup = my_strdup;
     63Strdup_func Xstrdup = my_mg_strdup;
  • trunk/gsdl/packages/mg/src/text/bool_parser.c

    r1860 r8693  
    10171017    {
    10181018      /* jump over whitespace */
    1019       while (isspace(*buf_ptr))
    1020     buf_ptr++;
    1021  
     1019      buf_ptr = skipspace(buf_ptr, end);
     1020
    10221021      if (inaword(buf_ptr, end))
    10231022    {
  • trunk/gsdl/packages/mg/src/text/bool_parser.y

    r819 r8693  
    137137    {
    138138      /* jump over whitespace */
    139       while (isspace(*buf_ptr))
    140     buf_ptr++;
    141  
     139      buf_ptr = skipspace(buf_ptr, end);
     140     
    142141      if (inaword(buf_ptr, end))
    143142    {
  • trunk/gsdl/packages/mg/src/text/mg_passes.c

    r4191 r8693  
    2828#endif
    2929
     30#include <stdlib.h>
    3031#include "memlib.h"
    3132#include "messages.h"
     
    4445/*
    4546   $Log$
     47   Revision 1.5  2004/11/29 02:56:09  kjdon
     48   added some changes made by Emanuel Dejanu (Simple Words)
     49
    4650   Revision 1.4  2003/04/18 01:41:46  sjboddie
    4751   Added a new -M option to mg_passes, allowing "maxnumeric" to be altered.
  • trunk/gsdl/packages/mg/src/text/words.c

    r439 r8693  
    1010  return 0;
    1111}
     12
     13/* Return a the UTF-8 encoded Unicode string with begining
     14   unicode spaces skipped. */
     15u_char *skipspace(u_char *here, u_char *end)
     16{
     17  unsigned short c;
     18  int length;
     19  while(here != end) {
     20    length = parse_utf8_char(here, end, &c);
     21    if (length == 0 || !is_unicode_space(c)) break;
     22    here += length;
     23  }
     24  return here;
     25}
     26
     27/* It determines whether a given place in a UTF-8 encoded
     28   Unicode string is a unicode space. */
     29int isaspace (const u_char *here, const u_char *end)
     30{
     31  unsigned short c;
     32  if (parse_utf8_char(here, end, &c) > 0) return is_unicode_space(c);
     33  return 0;
     34}
  • trunk/gsdl/packages/mg/src/text/words.h

    r4191 r8693  
    8181       is part of a word. */
    8282
     83int isaspace (const u_char *here, const u_char *end);
     84        /* It determines whether a given place in a UTF-8 encoded
     85       Unicode string is a unicode space. */
     86 
     87u_char *skipspace(u_char *here, u_char *end);
     88        /* Return a the UTF-8 encoded Unicode string with beginning
     89       unicode spaces skipped. */
     90 
    8391
    8492/* =========================================================================
  • trunk/gsdl/packages/mg/sysfuncs.h

    r4907 r8693  
    271271
    272272#ifndef _POSIX_VERSION
    273 #ifdef __MSDOS__
     273#if defined(__WIN32__)
     274#include <io.h>
     275#define lseek _lseek
     276#elif defined(__MSDOS__)
    274277#include <io.h>
    275278#else
Note: See TracChangeset for help on using the changeset viewer.