URI: 
       tmake compile - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 05f5d46b6368978fd22cfbea7155e983b0faa9a7
   DIR parent eacea5a0647ba94a9d5906b2b4b7b5761bcef6e9
  HTML Author: rsc <devnull@localhost>
       Date:   Fri, 17 Feb 2006 18:21:29 +0000
       
       make compile
       
       Diffstat:
         M src/cmd/mpm/mkfile                  |       3 ++-
         M src/cmd/mpm/range.h                 |       2 ++
         M src/cmd/mpm/slug.cc                 |      14 +++++++++++++-
       
       3 files changed, 17 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/src/cmd/mpm/mkfile b/src/cmd/mpm/mkfile
       t@@ -12,7 +12,8 @@ HFILES=misc.h\
        LD=g++
        
        <$PLAN9/src/mkone
       -CFLAGS=
       +CC=g++
       +CFLAGS=-c
        
        slug.$O:        slug.h
        range.$O:        range.h slug.h
   DIR diff --git a/src/cmd/mpm/range.h b/src/cmd/mpm/range.h
       t@@ -18,6 +18,7 @@ class range {
          public:
                range()                { first = 0; accumV = 0; }
                range(slug *p)        { first = p; accumV = 0; }
       +        virtual ~range() { }
                char        *headstr()                {
                        return first ? first->headstr() : (char*)""; }
                char        *typename()                { return first->typename(); }
       t@@ -307,6 +308,7 @@ class generator {
        
        extern stream        ptlist, btlist;                // page titles
        
       +#undef INFINITY
        #define INFINITY 1000001
        
        // A queue is a distinguished kind of stream.
   DIR diff --git a/src/cmd/mpm/slug.cc b/src/cmd/mpm/slug.cc
       t@@ -1,7 +1,6 @@
        #include        "misc.h"
        #include        "slug.h"
        #include        <math.h>
       -#include        <utf.h>
        
        static char        *bufptr(int);
        
       t@@ -149,6 +148,19 @@ static void adds(char *s)
                        addc(*p);
        }
        
       +static int fullrune(char *c, int n)
       +{
       +        if(n <= 0)
       +                return 0;
       +        if(n>=1 && (unsigned char)c[0] < 0x80)
       +                return 1;
       +        if(n>=2 && (unsigned char)c[0] < 0xE0)
       +                return 1;
       +        if(n>=3)
       +                return 1;
       +        return 0;
       +}
       +
        static char *getutf(FILE *fp)        // get 1 utf-encoded char (might be multiple bytes)
        {
                static char buf[100];