TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: Joseph Larsen
from: mark lewis
date: 2016-07-30 10:47:36
subject: .FLO files.

30 Jul 16 01:03, you wrote to me:

 ml>> of course another way, instead of adjusting the code, is to make your

 JL> A friend of mine has said that he'll look at the BinkP code. The idea
 JL> is that we'll get BinkP to send UPPERCASE bundles.

you're better off to fix the problem where it lies instead... the problem
is in hpt/dos's code... it needs to write all uppercase filenames to the
?lo files instead of the mixed case ones it is writing now... when one
program creates a workaround to fix a problem (aka bug) in another program,
the buggy program never gets fixed as long as the work around exists...
please don't do that...

if the problem can't be fixed within hpt/dos (and it can be -
hpt/src/fcommon.c or maybe hpt/src/toss.c adding something like an
"#IFDEF DOS upcase(filename) #ENDIF" type construct) then you
could maybe run sed or awk or even tr over the flo files and upcase the
file names listed before binkd gets to them... or, here's a bash script
that is pretty close to doing it... it needs more work to loop completely
and not eat itself when renaming the tmp files... if you can find a way to
easily feed the flo file names to it, only the inner loop and the mv at the
end need be used... that's actually how it started out... it definitely
needs work for the various outbound directories and to ensure that it only
grabs the extension via the last dot... it may also need double-quotes in
places to handle directories and file names with spaces in them... its a
quick script, untested... can be made to work with some effort...

===== start fixit =====
#!/bin/bash

# loop through all flo files in outdirfiles
outdirfiles=/your/path/to/out/*.?[Ll][Oo]

for filename in $outdirfiles
do
  echo "Processing $filename..."
  while read -r floline
  do
    # get the extension after the last dot
    flofext=${floline##*.}

    # get the filename.extension
    floname=${floline##*/}

    # chop off after the last dot
    flofname=${floname%%.*}

    # upcase the file name
    flofname="$(echo $flofname | tr '[a-z]' '[A-Z]')"

    # get the directory
    flofdir=${floline%/*}

    # write modified line to temp file
    echo "$flofdir/$flofname.$flofext" >> $filename.tmp
  done < "$filename"
done

# now loop the tmp files and move them to their real names
for filename in $outdirfiles
do
  if [ -e $filename.tmp ]
  then
    # move temp file to flo file
    mv $filename.tmp $filename
  fi
done

===== end fixit =====


but it is still best to fix this in hpt/dos... infinitely better...


)\/(ark

Always Mount a Scratch Monkey

... Laissez les bons temps rouler.
---
* Origin: (1:3634/12.73)
SEEN-BY: 3/50 103/705 109/500 116/116 123/5 52 140 500 789 6502 124/5013 5014
SEEN-BY: 135/300 140/1 153/757 154/0 10 20 203/0 221/6 226/600 227/51 201
SEEN-BY: 229/426 230/0 240/1661 5832 249/303 261/38 280/464 5003 292/854
SEEN-BY: 310/31 320/119 322/759 340/800 342/11 423/120 633/267 280 640/384
SEEN-BY: 712/550 848 770/1 2320/100 3634/12 22 27 50
@PATH: 3634/12 123/500 154/10 280/464 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.