Unnamed Fossil Project

Check-in [68488771a5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:updated
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:68488771a5053dd2ce0865fcfedf184d5a73d072
User & Date: alexey@sudachen.name 2011-09-22 23:27:51
Context
2011-10-06
08:01
updated check-in: d61fab19de user: alexey@sudachen.name tags: trunk
2011-09-22
23:27
updated check-in: 68488771a5 user: alexey@sudachen.name tags: trunk
2011-09-19
16:11
updated check-in: aa42f8b20a user: alexey@sudachen.name tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bigint.hc.

1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
....
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
    YOYO_BIGINT *pr = Bigint_Alloca(Bigint_Digits_Of_Bits(pBits)+1);
    YOYO_BIGINT *qr = Bigint_Alloca(Bigint_Digits_Of_Bits(qBits)+1);
    YOYO_BIGINT *nr = Bigint_Alloca(Bigint_Digits_Of_Bits(bits)+1);

    nMax = Bigint_Sub_Short(Bigint_Lshift(nMax,bits),1);
    nMin = Bigint_Lshift(nMin,bits-1);

    REQUIRE(bits >= 64);
    STRICT_REQUIRE(pBits > 0);
    STRICT_REQUIRE(qBits > 0);
    STRICT_REQUIRE(Bigint_Less(nMin,nMax));

    for(;;)
      {
        __Purge(&lt);
        p = q = 0;
        p = Bigint_Prime(pBits,0,0,pr);
        q = Bigint_Prime(qBits,0,0,qr);
        n = Bigint_Mul(Bigint_Copy_To(p,nr),q);
        if ( Bigint_Less(n,nMax) || Bigint_Less(nMin,n) )
          break;
      }
  
    *rsa_P = (p == pr) ? Bigint_Copy(p) : p;
    *rsa_Q = (q == qr) ? Bigint_Copy(q) : q; 
    *rsa_N = (n == nr) ? Bigint_Copy(n) : n;
  }
................................................................................
  {
    __Auto_Ptr(*rsa_mod)
      {
        YOYO_BIGINT *p, *q, *n, *phi;
        int pBits = Get_Random(bits/5,bits/2);
        int qBits = (bits+1)-pBits;

        STRICT_REQUIRE(pBits < bits/2);
        STRICT_REQUIRE(pBits+qBits == bits+1);

        n = 0;
        while ( !n ) __Auto_Ptr(n)
          {
            Bigint_Generate_Rsa_PQ(&p,pBits,&q,qBits,&n);








|











|







 







|







1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
....
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
    YOYO_BIGINT *pr = Bigint_Alloca(Bigint_Digits_Of_Bits(pBits)+1);
    YOYO_BIGINT *qr = Bigint_Alloca(Bigint_Digits_Of_Bits(qBits)+1);
    YOYO_BIGINT *nr = Bigint_Alloca(Bigint_Digits_Of_Bits(bits)+1);

    nMax = Bigint_Sub_Short(Bigint_Lshift(nMax,bits),1);
    nMin = Bigint_Lshift(nMin,bits-1);

    REQUIRE(bits >= 33);
    STRICT_REQUIRE(pBits > 0);
    STRICT_REQUIRE(qBits > 0);
    STRICT_REQUIRE(Bigint_Less(nMin,nMax));

    for(;;)
      {
        __Purge(&lt);
        p = q = 0;
        p = Bigint_Prime(pBits,0,0,pr);
        q = Bigint_Prime(qBits,0,0,qr);
        n = Bigint_Mul(Bigint_Copy_To(p,nr),q);
        if ( Bigint_Less(n,nMax) && Bigint_Less(nMin,n) )
          break;
      }
  
    *rsa_P = (p == pr) ? Bigint_Copy(p) : p;
    *rsa_Q = (q == qr) ? Bigint_Copy(q) : q; 
    *rsa_N = (n == nr) ? Bigint_Copy(n) : n;
  }
................................................................................
  {
    __Auto_Ptr(*rsa_mod)
      {
        YOYO_BIGINT *p, *q, *n, *phi;
        int pBits = Get_Random(bits/5,bits/2);
        int qBits = (bits+1)-pBits;

        STRICT_REQUIRE(pBits < bits/2 && pBist > 0 );
        STRICT_REQUIRE(pBits+qBits == bits+1);

        n = 0;
        while ( !n ) __Auto_Ptr(n)
          {
            Bigint_Generate_Rsa_PQ(&p,pBits,&q,qBits,&n);

Changes to datetime.hc.

33
34
35
36
37
38
39









40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
..
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99










100
101
102
103
104
105
106
107


























108
109
110
111
112
113
114
#ifdef _LIBYOYO
#define _YOYO_DATETIME_BUILTIN
#endif

#include "yoyo.hc"

typedef quad_t datetime_t;










uint_t Get_Curr_Date()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    time_t t;
    struct tm *tm;
    time(&t);
    tm = gmtime(&t);
    return (((uint_t)tm->tm_year+1900)<<16)|((uint_t)(tm->tm_mon+1)<<8)|tm->tm_mday;
  }
#endif
  ;

uint_t Get_Mclocks()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    double c = clock();
    return (uint_t)((c/CLOCKS_PER_SEC)*1000);
  }
#endif
  ;

uint_t Get_Curr_Time()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    uint_t msec;
................................................................................
  {
    double c = clock();
    return c/CLOCKS_PER_SEC;
  }
#endif
  ;

quad_t Get_Curr_Datetime()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    uint_t msec,dt,mt;
    time_t t;
    struct tm *tm;
    time(&t);
    tm = gmtime(&t);
    msec = Get_Mclocks();
    dt = (((uint_t)tm->tm_year+1900)<<16)|(((uint_t)tm->tm_mon+1)<<8)|tm->tm_mday;
    mt = ((uint_t)tm->tm_hour<<24)|(uint_t)(tm->tm_min<<16)|((uint_t)tm->tm_sec<<8)|((msec/10)%100);
    return ((quad_t)dt << 32)|(quad_t)mt;
  }
#endif
  ;











#define Dt_Hour(Dt) ((int)((Dt)>>24)&0x0ff)
#define Dt_Min(Dt)  ((int)((Dt)>>16)&0x0ff)
#define Dt_Sec(Dt)  ((int)((Dt)>> 8)&0x0ff)
#define Dt_Msec(Dt) ((int)((Dt)>> 0)&0x0ff)
#define Dt_Year(Dt) ((int)((Dt)>>(32+16))&0x0ffff)
#define Dt_Mon(Dt)  ((int)((Dt)>>(32+ 8))&0x0ff)
#define Dt_Mday(Dt) ((int)((Dt)>>(32+ 0))&0x0ff)



























#ifdef __windoze
  void Timet_To_Filetime(time_t t, FILETIME *pft)
# ifdef _YOYO_DATETIME_BUILTIN
    {
      LONGLONG ll;
      ll = Int32x32To64(t, 10000000) + 116444736000000000;







>
>
>
>
>
>
>
>
>










<
<
<
<
<
<
<
<
<







 







|



<










>
>
>
>
>
>
>
>
>
>








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58









59
60
61
62
63
64
65
..
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#ifdef _LIBYOYO
#define _YOYO_DATETIME_BUILTIN
#endif

#include "yoyo.hc"

typedef quad_t datetime_t;

uint_t Get_Mclocks()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    double c = clock();
    return (uint_t)((c/CLOCKS_PER_SEC)*1000);
  }
#endif
  ;

uint_t Get_Curr_Date()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    time_t t;
    struct tm *tm;
    time(&t);
    tm = gmtime(&t);
    return (((uint_t)tm->tm_year+1900)<<16)|((uint_t)(tm->tm_mon+1)<<8)|tm->tm_mday;
  }









#endif
  ;

uint_t Get_Curr_Time()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    uint_t msec;
................................................................................
  {
    double c = clock();
    return c/CLOCKS_PER_SEC;
  }
#endif
  ;

quad_t Get_Gmtime_Datetime(time_t t)
#ifdef _YOYO_DATETIME_BUILTIN
  {
    uint_t msec,dt,mt;

    struct tm *tm;
    time(&t);
    tm = gmtime(&t);
    msec = Get_Mclocks();
    dt = (((uint_t)tm->tm_year+1900)<<16)|(((uint_t)tm->tm_mon+1)<<8)|tm->tm_mday;
    mt = ((uint_t)tm->tm_hour<<24)|(uint_t)(tm->tm_min<<16)|((uint_t)tm->tm_sec<<8)|((msec/10)%100);
    return ((quad_t)dt << 32)|(quad_t)mt;
  }
#endif
  ;

quad_t Get_Curr_Datetime()
#ifdef _YOYO_DATETIME_BUILTIN
  {
    time_t t;
    time(&t);
    return Get_Gmtime_Datetime(t);
  }
#endif
  ;

#define Dt_Hour(Dt) ((int)((Dt)>>24)&0x0ff)
#define Dt_Min(Dt)  ((int)((Dt)>>16)&0x0ff)
#define Dt_Sec(Dt)  ((int)((Dt)>> 8)&0x0ff)
#define Dt_Msec(Dt) ((int)((Dt)>> 0)&0x0ff)
#define Dt_Year(Dt) ((int)((Dt)>>(32+16))&0x0ffff)
#define Dt_Mon(Dt)  ((int)((Dt)>>(32+ 8))&0x0ff)
#define Dt_Mday(Dt) ((int)((Dt)>>(32+ 0))&0x0ff)

quad_t Get_Datetime(uint_t year, uint_t month, uint_t day, uint_t hour, uint_t minute, uint_t segundo )
#ifdef _YOYO_DATETIME_BUILTIN
  {
    uint_t dt = ((year%0x0ffff)<<16)|((month%13)<<8)|(day%32);
    uint_t mt = ((hour%24)<<24)|((minute%60)<<16)|((segundo%60)<<8);
    return ((quad_t)dt << 32)|(quad_t)mt;
  }
#endif
  ;
  
time_t Get_Posix_Datetime(quad_t dtime)
#ifdef _YOYO_DATETIME_BUILTIN
  {
    struct tm tm;
    memset(&tm,0,sizeof(tm));
    tm.tm_year = Dt_Year(dtime)-1900;
    tm.tm_mon  = Dt_Mon(dtime)-1;
    tm.tm_mday = Dt_Mday(dtime);
    tm.tm_hour = Dt_Hour(dtime);
    tm.tm_min  = Dt_Min(dtime);
    return mktime(&tm);
  }
#endif
  ;


#ifdef __windoze
  void Timet_To_Filetime(time_t t, FILETIME *pft)
# ifdef _YOYO_DATETIME_BUILTIN
    {
      LONGLONG ll;
      ll = Int32x32To64(t, 10000000) + 116444736000000000;

Changes to logout.hc.

38
39
40
41
42
43
44

45
46
47
48
49
50
51
...
186
187
188
189
190
191
192
















193
194
195
196
197
198
199
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#include "file.hc"

enum 
  {
    YOYO_LOG_ERROR   = 0,
    YOYO_LOG_WARN    = 10,
    YOYO_LOG_INFO    = 20,

    YOYO_LOG_ALL     = 100,
  };

#ifdef _YOYO_LOGOUT_BUILTIN
static clock_t YOYO_Log_Clock = 0;
static int YOYO_Log_Line_No = 0;
static int YOYO_Log_Fd = -1;
................................................................................
        Logout(level,text);
        free(text);
        va_end(va);
      }
  }
#endif
  ;

















#define Log_Info if (YOYO_Log_Level<YOYO_LOG_INFO); else Log_Info_
void Log_Info_(char *fmt, ...)
#ifdef _YOYO_LOGOUT_BUILTIN  
  {
    va_list va;
    char *text;
................................................................................
    Logout(YOYO_LOG_INFO,text);
    free(text);
    va_end(va);
  }
#endif
  ;

#define Log_Warning if (YOYO_Log_Level<YOYO_LOG_ERROR); else Log_Warning_
void Log_Warning_(char *fmt, ...)
#ifdef _YOYO_LOGOUT_BUILTIN  
  {
    va_list va;
    char *text;
    va_start(va,fmt);
    text = Yo_Format_(fmt,va);







>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
...
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
...
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
#include "file.hc"

enum 
  {
    YOYO_LOG_ERROR   = 0,
    YOYO_LOG_WARN    = 10,
    YOYO_LOG_INFO    = 20,
    YOYO_LOG_DEBUG   = 50,
    YOYO_LOG_ALL     = 100,
  };

#ifdef _YOYO_LOGOUT_BUILTIN
static clock_t YOYO_Log_Clock = 0;
static int YOYO_Log_Line_No = 0;
static int YOYO_Log_Fd = -1;
................................................................................
        Logout(level,text);
        free(text);
        va_end(va);
      }
  }
#endif
  ;

#define Log_Debug if (YOYO_Log_Level<YOYO_LOG_DEBUG); else Log_Debug_
void Log_Debug_(char *fmt, ...)
#ifdef _YOYO_LOGOUT_BUILTIN  
  {
    va_list va;
    char *text;
    va_start(va,fmt);
    text = Yo_Format_(fmt,va);
    Logout(YOYO_LOG_DEBUG,text);
    free(text);
    va_end(va);
  }
#endif
  ;


#define Log_Info if (YOYO_Log_Level<YOYO_LOG_INFO); else Log_Info_
void Log_Info_(char *fmt, ...)
#ifdef _YOYO_LOGOUT_BUILTIN  
  {
    va_list va;
    char *text;
................................................................................
    Logout(YOYO_LOG_INFO,text);
    free(text);
    va_end(va);
  }
#endif
  ;

#define Log_Warning if (YOYO_Log_Level<YOYO_LOG_WARN); else Log_Warning_
void Log_Warning_(char *fmt, ...)
#ifdef _YOYO_LOGOUT_BUILTIN  
  {
    va_list va;
    char *text;
    va_start(va,fmt);
    text = Yo_Format_(fmt,va);

Changes to string.hc.

780
781
782
783
784
785
786















787
788
789
790
791
792
793
....
1356
1357
1358
1359
1360
1361
1362

1363
1364
1365
1366
1367
1368
1369
....
1382
1383
1384
1385
1386
1387
1388
1389































1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402




1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
        for( n = 0; *S; ) { out[n++] = Utf8_Get_Wide(&S); }
        out[n] = 0;
      }
    return out;
  }
#endif
  ;
















#define Str_Unicode_To_Utf8(S) Yo_Pool(Str_Unicode_To_Utf8_Npl(S))  
char *Str_Unicode_To_Utf8_Npl(wchar_t *S)
#ifdef _YOYO_STRING_BUILTIN
  {
    char *out = 0;
    if ( S )
................................................................................
        }
        
    return -1;
  }
#endif
  ;
  

#define Str_Search(S,Patt) Str_Search_(S,-1,Patt,-1)
int Str_Search_( char *S, int L, char *patt, int pattL )
#ifdef _YOYO_STRING_BUILTIN
  {
    char *p, *pE;
    
    if ( L < 0 ) L = S?strlen(S):0;
................................................................................
        }
        
    return -1;
  }
#endif
  ;

#define Str_Search_Nocase(S,Patt) Str_Search_Nocase_(S,-1,Patt,-1,1)
































#define Str_Unicode_Replace_Npl(S,Patt,Val) Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,0)
#define Str_Unicode_Replace_Nocase_Npl(S,Patt,Val) __Pool(Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,1))
#define Str_Unicode_Replace(S,Patt,Val) Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,0)
#define Str_Unicode_Replace_Nocase(S,Patt,Val) __Pool(Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,1))
wchar_t *Str_Unicode_Replace_Npl_(wchar_t *S, int L, wchar_t *patt, int pattL, wchar_t *val, int valL, int nocase)
#ifdef _YOYO_STRING_BUILTIN
  {
    int i;
    wchar_t *R = 0;
    int R_count = 0;
    int R_capacity = 0;
    




    while ( 0 <= (i = Str_Unicode_Search_(S,L,patt,pattL,nocase)) )
      {
        if ( i )
          R_count += __Elm_Append_Npl(&R,R_count,S,i,sizeof(wchar_t),&R_capacity);
        if ( valL )
          R_count += __Elm_Append_Npl(&R,R_count,val,valL,sizeof(wchar_t),&R_capacity);
        S += i+pattL; L -= i+pattL;
      }
    
    if ( L )
      __Elm_Append_Npl(&R,R_count,S,L,sizeof(wchar_t),&R_capacity);
    
    return R;
  }
#endif







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







 







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













>
>
>
>
|
|
|
|
|
|
|
|







780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
....
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
....
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
        for( n = 0; *S; ) { out[n++] = Utf8_Get_Wide(&S); }
        out[n] = 0;
      }
    return out;
  }
#endif
  ;

char *Str_Unicode_To_Utf8_Convert(wchar_t *S, char *out, int maxL)
#ifdef _YOYO_STRING_BUILTIN
  {
    int i = 0;
    if ( S )
      {
        for(; *S && i + Utf8_Wide_Length(*S) < maxL; ) 
          { Utf8_Wide_Encode(out+i,*S++,&i); }
      }
    if ( i < maxL ) out[i] = 0;
    return out;
  }
#endif
  ;

#define Str_Unicode_To_Utf8(S) Yo_Pool(Str_Unicode_To_Utf8_Npl(S))  
char *Str_Unicode_To_Utf8_Npl(wchar_t *S)
#ifdef _YOYO_STRING_BUILTIN
  {
    char *out = 0;
    if ( S )
................................................................................
        }
        
    return -1;
  }
#endif
  ;
  
/* #define Str_Search_Nocase(S,Patt) Str_Search_Nocase_(S,-1,Patt,-1,1) */
#define Str_Search(S,Patt) Str_Search_(S,-1,Patt,-1)
int Str_Search_( char *S, int L, char *patt, int pattL )
#ifdef _YOYO_STRING_BUILTIN
  {
    char *p, *pE;
    
    if ( L < 0 ) L = S?strlen(S):0;
................................................................................
        }
        
    return -1;
  }
#endif
  ;

#define Str_Replace_Npl(S,Patt,Val) Str_Replace_Npl_(S,-1,Patt,-1,Val,-1)
#define Str_Replace(S,Patt,Val) __Pool(Str_Replace_Npl_(S,-1,Patt,-1,Val,-1))
char *Str_Replace_Npl_(char *S, int L, char *patt, int pattL, char *val, int valL)
#ifdef _YOYO_STRING_BUILTIN
  {
    int i;
    char *R = 0;
    int R_count = 0;
    int R_capacity = 0;
    
    if ( pattL < 0 ) pattL = patt?strlen(patt):0;
    if ( valL < 0 ) valL = val?strlen(val):0;
    
    __Elm_Resize_Npl(&R, 32, 1, &R_capacity);
    
    if ( pattL )
      while ( 0 <= (i = Str_Search_(S,L,patt,pattL)) )
        {
          if ( i )
            R_count += __Elm_Append_Npl(&R,R_count,S,i,1,&R_capacity);
          if ( valL )
            R_count += __Elm_Append_Npl(&R,R_count,val,valL,1,&R_capacity);
          L -= i+pattL; S += i+pattL;
        }
    
    if ( L )
      __Elm_Append_Npl(&R,R_count,S,L,1,&R_capacity);
    
    return R;
  }
#endif
  ;

#define Str_Unicode_Replace_Npl(S,Patt,Val) Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,0)
#define Str_Unicode_Replace_Nocase_Npl(S,Patt,Val) __Pool(Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,1))
#define Str_Unicode_Replace(S,Patt,Val) Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,0)
#define Str_Unicode_Replace_Nocase(S,Patt,Val) __Pool(Str_Unicode_Replace_Npl_(S,-1,Patt,-1,Val,-1,1))
wchar_t *Str_Unicode_Replace_Npl_(wchar_t *S, int L, wchar_t *patt, int pattL, wchar_t *val, int valL, int nocase)
#ifdef _YOYO_STRING_BUILTIN
  {
    int i;
    wchar_t *R = 0;
    int R_count = 0;
    int R_capacity = 0;
    
    if ( pattL < 0 ) pattL = patt?wcslen(patt):0;
    if ( valL < 0 ) valL = val?wcslen(val):0;
    
    if ( pattL )
      while ( 0 <= (i = Str_Unicode_Search_(S,L,patt,pattL,nocase)) )
        {
          if ( i )
            R_count += __Elm_Append_Npl(&R,R_count,S,i,sizeof(wchar_t),&R_capacity);
          if ( valL )
            R_count += __Elm_Append_Npl(&R,R_count,val,valL,sizeof(wchar_t),&R_capacity);
          S += i+pattL; L -= i+pattL;
        }
    
    if ( L )
      __Elm_Append_Npl(&R,R_count,S,L,sizeof(wchar_t),&R_capacity);
    
    return R;
  }
#endif

Changes to yoyo.hc.

1689
1690
1691
1692
1693
1694
1695

1696
1697
1698
1699
1700
1701
1702
      else \
        YOYO_LOCAL_ID(Do_Code):

#define __Gogo \
  if ( 1 ) goto YOYO_LOCAL_ID(__gogo); \
  else YOYO_LOCAL_ID(__gogo):


void Yo_Elm_Resize_Npl(void **inout, int L, int type_width, int *capacity_ptr)
#ifdef _YOYO_CORE_BUILTIN
  {
    int requires = 0;
    int capacity = capacity_ptr?*capacity_ptr:0;
    
    if ( L )







>







1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
      else \
        YOYO_LOCAL_ID(Do_Code):

#define __Gogo \
  if ( 1 ) goto YOYO_LOCAL_ID(__gogo); \
  else YOYO_LOCAL_ID(__gogo):

#define __Elm_Resize_Npl(MemPptr,L,Width,CpsPtr) Yo_Elm_Resize_Npl((void**)MemPptr,L,Width,CpsPtr)
void Yo_Elm_Resize_Npl(void **inout, int L, int type_width, int *capacity_ptr)
#ifdef _YOYO_CORE_BUILTIN
  {
    int requires = 0;
    int capacity = capacity_ptr?*capacity_ptr:0;
    
    if ( L )