SPF/SE


SPF/SE (98/ME/W2K/XP/Vista/7/10-32bit/Linux-Wine) - Web Site - Images: 1  2  3  4  5  6  7 

SPF/SE by Command Technologies is an SPF style editor and file manager with a panel system and file-aid type utilities. The display appearance is flexible allowing several choices on how menus and options will look from windows GUI to the old "DOS" or "Legacy" menu style.

SPF/SE is the first SPF editor to use a built-in C interpreter which is easy to use having sufficent capability to do most macro operations. The interpreter allows you to include macro source code at run-time (put the #include statement after main function). The interpreter minimizes variable house-keeping overhead taking a traditional string oriented approach instead of treating strings as character arrays. The trace("on"); and MSG() functions provide feedback needed to find the bug. When the interpreter encounters an error the code is displayed with the error message just above the code.

SPF/SE will work under Wine on Linux (Tahrpup PAE - Ubuntu).

REXX: There is a perception that SPF/SE can not work with REXX. While SPF/SE does not use REXX as it's macro language as did SPF/PC v3/4/PRO, it takes just a few lines of code call a REXX interpreter and pass/return parms. This allows internal (data manipulation etc) and external operations (helps, ftp etc.). You could also use BASIC, Pearl, PHP, Python etc. as well.

Code shows how to call a REXX macro passing parms from command line: Command===> SPF dir2html

void spf(void) {
 char *trexx = "h:\\u\\pcdos\\rexx.exe  h:\\u\\spfpc40\\macros\\";
 char *tcmd;
 int   i;
 strcat(trexx,argv[1]);  //Get Name of REXX macro to execute passed from Edit command line
 strcat(trexx,".spf ");  //Could leave this off or change to REX/CMD etc.
 i = 2;
 while (i < argc) { strcat(trexx,StrCompose(" ",argv[i])); ++i; }//wend
 tcmd = strcompose("system NOBATCH NOSTOP ",trexx); //Build OS Command
 spfservice("cmd",tcmd);             //Send it to OS
}//spf
Code to call REXX macro passing it the name of the edit file: Command===> ftpsend
//FTPSEND.SPF contains code to build FTP command sequence
void ftpsend(void){
 char *tcmd;
 char *tfilespec;
 tfilespec = spfservice("query","filespec");             //Get filespec being edited from SPF/SE
 tcmd = strcompose("system ","h:\\u\\pcdos\\rexx.exe h:\\u\\spfpc40\\macros\\ftpsend.spf ",tfilespec);
 spfservice("cmd",tcmd);     //Send to OS
}//ftpsend
As you can see from these two examples, it doesn't take much effort to use REXX with SPF/SE.

  • SPF/SE C Macros (Right click/Save as to download)
    CALC.C - Pops up Windows calculator.
    CHECK.C - Calls CHECK.SPF to perform syntax checking on HTML, JAVA and PHP code. Displays syntax error messages next to code.
    DBLCLICK.C - Place cursor on keyword, double click left mouse button, info for the keyword is displayed in a window.
    Requires H3.SPF and one of the help indexes listed under H3.SPF. You can use the keys (0.k) menu/primary command to set a function key to call this macro.
    DBLCLICKC.C - Does the same as DBLCLICK.C - Is 100% SPFSE C. Requires x.c functions.
    FTPSEND.C - Sends filespec to FTPSEND.SPF to put code/file on server. Requires FTPSEND.SPF macro.
    FTPSUB.C - Sends filespec to FTPSUB.SPF to put code/file on server AND then executes the code on the server. Requires FTPSUB.SPF macro.
    RDOS.C - Performs DOS command, returns results in new edit session.
    SPF.C - Sends .SPF REXX code to REXX interpreter for execution.
    SUB.C - Submits code to SUB.SPF for execution.
    SUB2.C - Submitt edit code to system for execution. 100% SPFSE C. Requires x.c functions.
    Works with ASM BAS BAT CMD CPP FTP GIF HTM HTML JBS JPG JPEG LBS PBS PDB PDF PHP PRG REX REXX VBS ZBS
    NOTE: Some of these macros require use of a REXX interpreter as a REXX macro is used to do the heavy lifting (meaning I am too lazy to write the C code). See macros further down on this page.

  • SPF/SE Colormaps (Right click/Save as to download)
    ASM  FreeBASIC  C  COBOL  HTML  JCL  MFCOBOL  PowerBASIC  RealiaCOBOL  REXX 


  • SPF/SE Edit Profiles (Right click/Save as to download)
    ASF  COM  FLI  FLV  GIF  HTM  ISO  JPEG  JPG  MP3  PDF  PNG  PPT  RAR  RPM  RTF  SWF  WAV  WMV  ZIP 
  • SPF/SE C Functions (Right click/Save as to download) - These functions are my attempt to make writting SPF/SE macros a little easier from a die-hard REXX programmer's perspective. Usage info in header comment of macro.
    X.C - Contains the following macros:
    CENTER.C - Returns string centered in n pad char. char = xcenter(string,length,padchar);
    COPIES.C - Returns string with n copies of string. char = xcopies(string,n);
    FILESPEC.C - Returns specified parts of a fully qualified filespec. char = xfilespec(string,opt);
    LASTPOS.C - Returns last col in which needle appear in haystack. int = xlastpos(needle, haystack);
    LENGTH.C - Returns length of string. int = xlength(x);
    LEFT.C - Returns Left chars of string padded as needed. char = xleft(string, cols, padchar);
    LOWER.C - Returns string converted to all lower case. char = xlower(string);
    POS.C - Returns start of needle in haystack begining at startcol. char = xpos(needle, haystack,start);
    REXXSERVICE.C - Sends command to REXX interpreter, returns results. char = rexxservice(opt,string);
    Example: T = rexxservice("cmd","54243.001 +2"); == "54245.001" You now have REXX math capability with SPF/SE's C interpreter and other REXX functions.
    Example: T = rexxservice("cmd","XRANGE('a','z')''XRANGE('A','Z')"); == "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" .
    Example: T = rexxservice("exec","filespec"); allows you to directly execute REXX code from within a C maro.
    Any one line REXX command can be executed and result returned. Just be sure to use ticks ' to enclose strings in REXX command. It is not the same as having an embedded REXX interpreter but it will execute a REXX instruction and return the result. If the return string is "REXXERROR" then you had a REXX instruction syntax error. You could write a more complex function to perform ramdom file I/O by writing a macro that accepts filespec and fseek values as parms saving the retrieved results in a file to be read by SPF/SE C macro. Who says you can't have REXX in SPF/SE?
    RIGHT.C - Returns Right chars of string padded as needed. char = xright(string,cols,pad);
    SPACE.C - Returns string with n fill chars between char words. char = xspace(string,padchar,padcnt,delim);
    STRIP.C - Returns string with Leading/Trailing/Both chars lopped from string. char = xstrip(string,opt,stripchar);
    SUBSTR.C - Returns string with from string starting at specified col for n cols with n cols padded as specified.
                       char = xsubstr(string,startcol,length,padchar);
    TRANSLATE.C - Returns string where individual chars are translated as specified in output and input strings.
                            char = xtranslate(string,tableout,tablein);
    TRIML.C - Returns string with n chars lopped off left end of string. char = xtriml(string,n);
    TRIMR.C - Returns string with n chars lopped off right end of string. char = xtrimr(string,n);
    UPPER.C - Returns string converted to all upper case. char = xupper(string);
    WORD.C - Returns nth char delimited word. char = xword(string,n,delim);
    WORDLENGTH.C - Returns length of n char delimited word in string. int = xwordlength(x,n,delim);
    WORDPOS.C - Returns word number of matching char delimited Word after specified start word number.
                            int = xwordpos(word, string, start, delim);
    WORDS.C - Returns number of char delimited words. int = xwords(string,delimchar);

  • SPF/SE Colormaps (Right click/Save as to download)
    ASM  C  COBOL  FreeBASIC  HTML  JCL  MFCOBOL  PowerBASIC  RealiaCOBOL  REXX