🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Jeff-Relf.Me Sat, 30 Apr 2016 22:53
I might strike "Brc.EXE" ( and its "pcre.DLL" ) from the list.
#260232
Author: Jeff-Relf.Me
Date: Sat, 30 Apr 2016 22:53
105 lines
5280 bytes
<h2><PRE Style='Font-Family: OCR A, monospace !important;'> 
  The DOS Console tools I add to my Win8 system
  are interesting to me, so I posted them.

  No one cares if you (MickeyVarney) liked it or not.
  Tune me out, and tune in something else, if you want.
  Selecting what to read is _your_ job, not ours.

I might remove "Brc.EXE" ( and its "pcre.DLL" ) from my system
because I wrote some Visual C++ code for that; to wit:

  //  From "X.CPP" in "http://Jeff-Relf.Me/X.ZIP"

  typedef wchar_t  wchar ;  typedef wchar  *LnP, Ch0, Ch, Ch2 ;
  LnP  SubDir ;  wchar PathBuf[444];

  #define  LOOP  while(1)
  #define  While( ↻ )  Ch = 1, P-- ;  \
     while( ( Ch0 = Ch ) && ( Ch = *++P, Ch2 = !Ch ? 0 : P[1], ↻ ) )

  #define  WhileBac( ↻ )  \
    Ch = Ch2 = 0, E ? 0 : E = B + szStr( B ), P = E ;  \
    while ( P >= B && ( Ch2 = *P, ( Ch = --P < B ? 0 : *P ) && ( ↻ ) ) )

  inline int  isLowr( int Ch ) { return Ch >= 'a' && Ch &lt;= 'z';  }
  inline int  isUppr( int Ch ) { return Ch >= 'A' && Ch &lt;= 'Z' ;  }
  inline int  isAlpha( int Ch ) { return isLowr( Ch ) || isUppr( Ch ) ;  }
  inline int  isDigit( int Ch ) { return Ch >= '0' && Ch &lt;= '9' ;  }

  void CleanFile( int Deep ) { 
    int AnEXT, GoodEXT, Sz, s00e00, Dirt, Tries, Fail, OnWord ;
    LnP  _fNam, fNam, D, B, P, E ;  wchar To[444], EXT[44];
    E = 0, AnEXT = Dirt = Tries = OnWord = 0, B = P = fNam = SubDir ;
    WhileBac( Ch ) 
      if ( Ch == '.' ) { AnEXT = P < E - 1, E = P ;  break ;  }

    GoodEXT = !AnEXT || E > B + 2 && E[-2] == 32 && isUppr( E[1] );
    Str( EXT, L"%s", E ), Up_Str( EXT );  

    if ( B = P = fNam, E > B + 3 && isDigit( B[0] )
    && isDigit( B[1] ) && !isDigit( B[2] ) ) P += 2 ;

    While( Ch &lt;= 32 || Ch == '.' || Ch == '-' || Ch == '_' );
    Dirt = P > fNam, _fNam = P ;

    //  #define  DropArtist( Artist )  ( Sz = szStr( Artist ),  \
    //      !EqN( Artist, _fNam, Sz ) ? 0 : ( Dirt = 1, _fNam += Sz ) )
    //  
    //  If it had (exactly) two leading digits ("10. -- "),
    //  it's gone now.
    //  DropArtist( L"[ Suuns ]-" );

    if ( D = To, Deep ) D += Str( D, L"%s/", UglyDir );
    B = P = D ; 
    D += Sz = Str( B, L"%.*s", int( E - _fNam ), _fNam ), E = D ;
    While( Ch ) 
      if ( Ch == '.' || Ch == '_' || Ch == '-' ) 
        Dirt = 1, *P = 32, OnWord = 0 ;

      else if ( !( isAlpha( Ch ) || Ch == '\'' || Ch >= 128 ) )
        OnWord = 0 ;

      else if ( !OnWord ) 
        OnWord = 1, s00e00 = isDigit( Ch0 ) || isDigit( Ch2 ), 
        !s00e00 && isLowr( Ch ) && !EqN( P, L"of ", 3 ) 
        ? ( Dirt = 1, RaisC( P ) ) 
        : s00e00 && isUppr( Ch ) 
          ? ( Dirt = 1, *P = tolower( Ch ) ) :  0 ;

    if ( !Dirt && !Deep && GoodEXT ) return ;
    LOOP { 
      !Tries 
      ? Str( E, GoodEXT ? L"%s" : L"  %s", EXT ) 
      : Str( E, L"  [%d]  %s", Tries, EXT ), Tries++ ;

      if ( Fail = _wrename( fNam, To ), !Fail ) break ;  }

    Sh( L"ReName (%s):\n  %s  >>  %s\n\n", PathBuf, fNam, To );  }

  void _CleanDir( LnP eParent ) { LnP ePath ;  DirA

    if ( EqN( SubDir, L"zzz", 3 ) ) return ;  
    ePath = eParent, ePath += Str( eParent, L"/%s", SubDir );

    #define CleanDir( Deep )  \
       if ( CD( PathBuf ), DirI( L"*", 0  ) )  \
         LOOP { gF_Nam  SubDir = FF_Rec.cFileName ;    \
           !Is_a_Dir ? CleanFile( Deep ) : _CleanDir( ePath );  }

    CleanDir(1)  *eParent = 0, CD( PathBuf ), SubDir = eParent + 1 ;
    Sh( L"DEL DIR (%s):\n  %s\n\n", PathBuf, SubDir );
    Delete_Dir( SubDir );  }

      ...........
  if ( Eq( Hit, L"CleanDir" ) ) {
    //  The "CleanDir" toolbar button was hit.
    //  
    //  Traverse "UglyDir" and it's subdirectories, recursively,
    //  to "clean" ( pretty up ) fileNames.
    //  SubFolders (other than "zzz") end up deleted.

    DirA  LnP ePath ;  SubDir = 0 ;  ClearScreen ;
    ePath = PathBuf, ePath += Str( ePath, L"%s", UglyDir );
    CleanDir(0)  CD( StartDir ), Sh( L"'%s' got Cleaned.", UglyDir );
    return ;  }
When my monitor comes on after 4 to 16 hours of being off...
#260234
Author: Jeff-Relf.Me
Date: Sun, 01 May 2016 01:45
48 lines
3455 bytes
<h2><PRE Style='Font-Family: OCR A, monospace !important;'> 
You (ClutterFreak) asked me:
> Could you describe how your sleep software works?
>   http://jeff-relf.me/SleepPat.PNG
>   http://jeff-relf.me/SleepPat.HTM

When my monitor comes on after 4 to 16 hours of being off,
it's assumed ( not always correctly ) that I just woke up;
so, whenever I'm away from the keyboard that long,
with the monitor off, it gives a false positive.

To see the "SleepPat" report, I hit "SleepPat" (a toolbar item).

"X.EXE" is always running, recording monitor Off/On events.
The log ( SleepLog.TXT ) looks like this:

   7.4 hours awake, 41% offline.

    .2        Apr 30 {  5:56 P, 2016 }:49       Vɹʁʩ
          .6  Apr 30 {  5:41 P, 2016 }:59       Vɹɾჵ

   1.1        Apr 30 {  5: 8 P, 2016 }:23       Vɹɹʏ
         2.8  Apr 30 {  4: 4 P, 2016 }:17       VɹɮϿ

   1.7        Apr 30 {  1:17 P, 2016 }:29       Vɹɒთ
         1.1  Apr 30 { 11:35 A, 2016 }:14       Vɹȷш


  20.8 hour Day, 46% offline:

   7.1        Apr 30 { 10:30 A, 2016 }:         Vɹt0
         4.0  Apr 30 {  3:26 A, 2016 }:30       Vɸღʖ

The "Vɹʁʩ" stuff is the number seconds since 1970,
as is the standard, in Base360 (to save screen space).

  const wchar Digits[] = //  In code_point order, for binary search.
    L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
    L"ȴȵȶȷȸȹȺȻȼȽȾȿɀɁɄɅɌɍɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂ"
    L"ʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯ"

    L"ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψω"
    L"ϐϑϒϓϕϖϗϘϙϚϛϜϝϞϟϠϡϰϱϲϳϴϵ϶ϷϸϹϺϻϼϽϾϿ"

    L"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
    L"აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵ";
  const uint Base360 = ( sizeof Digits - 1 ) / szChr ;
  const int  mxDigits = 9 ;  //  ln(2^64)/ln(360) + 2 = 9.5
Re: I might strike "Brc.EXE" ( and its "pcre.DLL" ) from the list.
#260235
Author: Fabian Russell
Date: Sun, 01 May 2016 18:53
20 lines
1868 bytes
On Sat, 30 Apr 2016 15:53:04 -0700, Jeff-Relf.Me wrote:

> 
>   No one cares if you (MickeyVarney) liked it or not.
>   Tune me out, and tune in something else, if you want.
>   Selecting what to read is _your_ job, not ours.
> 

Good man, Jeffery!  Don't be deterred by the wisdom of your
superiors.  Stand tall.  Stand firm.  To thine own self be true.

C'mon Jeffery, say it loud: "I'm a dumb-fuck asshole, and I'm proud!"

C'mon Jeffery, say it loud: "I'm a dumb-fuck asshole, and I'm proud!"

All the way till death, baby!  All the way till death!

Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!

Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!
If Michael C.M. Varney were smart, he wouldn't have to boast.
#260237
Author: Jeff-Relf.Me
Date: Sun, 01 May 2016 21:51
3 lines
1377 bytes
<h2><PRE Style='Font-Family: OCR A, monospace !important;'> 
If "Fabian Russell" ( Michael C.M. Varney ) were actually smart,
he wouldn't have to boast.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads