ScriptBasic Source Files
by Peter Verhas
Table of Contents
1. Introduction
1.1. scriba.c
1.1.1. scriba_new()
1.1.2. scriba_destroy()
1.1.3. scriba_NewSbData()
1.1.4. scriba_InitSbData()
1.1.5. scriba_UndefSbData()
1.1.6. scriba_NewSbLong()
1.1.7. scriba_NewSbDouble()
1.1.8. scriba_NewSbUndef()
1.1.9. scriba_NewSbString()
1.1.10. scriba_NewSbBytes()
1.1.11. scriba_DestroySbData()
1.1.12. scriba_PurgeReaderMemory()
1.1.13. scriba_PurgeLexerMemory()
1.1.14. scriba_PurgeSyntaxerMemory()
1.1.15. scriba_PurgeBuilderMemory()
1.1.16. scriba_PurgePreprocessorMemory()
1.1.17. scriba_PurgeExecuteMemory()
1.1.18. scriba_SetFileName()
1.1.19. scriba_GettingConfiguration()
1.1.20. scriba_LoadConfiguration()
1.1.21. scriba_GetConfigFileName()
1.1.22. scriba_InheritConfiguration()
1.1.23. scriba_InitModuleInterface()
1.1.24. scriba_InheritModuleInterface()
1.1.25. scriba_InheritExecuteObject()
1.1.26. scriba_SetProcessSbObject()
1.1.27. scriba_ShutdownMtModules()
1.1.28. scriba_SetCgiFlag()
1.1.29. scriba_SetReportFunction()
1.1.30. scriba_SetReportPointer()
1.1.31. scriba_SetStdin()
1.1.32. scriba_SetStdout()
1.1.33. scriba_SetEmbedPointer()
1.1.34. scriba_SetEnvironment()
1.1.35. scriba_LoadBinaryProgramWithOffset()
1.1.36. scriba_LoadBinaryProgram()
1.1.37. scriba_InheritBinaryProgram()
1.1.38. scriba_LoadInternalPreprocessor()
1.1.39. scriba_ReadSource()
1.1.40. scriba_DoLexicalAnalysis()
1.1.41. scriba_DoSyntaxAnalysis()
1.1.42. scriba_BuildCode()
1.1.43. scriba_IsFileBinaryFormat()
1.1.44. scriba_GetCacheFileName()
1.1.45. scriba_UseCacheFile()
1.1.46. scriba_SaveCacheFile()
1.1.47. scriba_RunExternalPreprocessor()
1.1.48. scriba_SaveCode()
1.1.49. scriba_SaveCCode()
1.1.50. scriba_SaveECode()
1.1.51. scriba_LoadSourceProgram()
1.1.52. scriba_LoadProgramString()
1.1.53. scriba_Run()
1.1.54. scriba_NoRun()
1.1.55. scriba_ResetVariables()
1.1.56. scriba_Call()
1.1.57. scriba_CallArg()
1.1.58. scriba_DestroySbArgs()
1.1.59. scriba_NewSbArgs()
1.1.60. scriba_CallArgEx()
1.1.61. scriba_LookupFunctionByName()
1.1.62. scriba_LookupVariableByName()
1.1.63. scriba_GetVariableType()
1.1.64. scriba_GetVariable()
1.1.65. scriba_SetVariable()
1.1.66. scriba_InitStaticModules()
1.1.67. scriba_FinishStaticModules()
1.2. basext.c
1.2.1. basext_GetArgsF()
1.3. memory.c
1.3.1. memory_InitStructure()
1.3.2. memory_RegisterType()
1.3.3. memory_RegisterTypes()
1.3.4. memory_DebugDump()
1.3.5. memory_NewVariable()
1.3.6. memory_ReleaseVariable()
1.3.7. memory_NewString()
1.3.8. memory_NewCString()
1.3.9. memory_SetRef()
1.3.10. memory_NewRef()
1.3.11. memory_IsUndef()
1.3.12. memory_Type()
1.3.13. memory_SelfOrRealUndef()
1.3.14. memory_NewUndef()
1.3.15. memory_ReplaceVariable()
1.3.16. memory_NewLong()
1.3.17. memory_NewDouble()
1.3.18. memory_CopyArray
1.3.19. memory_NewArray()
1.3.20. memory_ReDimArray()
1.3.21. memory_CheckArrayIndex()
1.3.22. memory_Mortalize()
1.3.23. memory_Immortalize()
1.3.24. memory_NewMortal()
1.3.25. memory_DupImmortal()
1.3.26. memory_DupVar()
1.3.27. memory_DupMortalize()
1.3.28. memory_ReleaseMortals()
1.3.29. memory_DebugDumpVariable()
1.3.30. memory_DebugDumpMortals()
1.3.31. memory_NewMortalString()
1.3.32. memory_NewMortalCString()
1.3.33. memory_NewMortalLong()
1.3.34. memory_NewMortalRef()
1.3.35. memory_NewMortalDouble()
1.3.36. memory_NewMortalArray()
1.4. epreproc.c
1.4.1. External preprocessor handling
1.4.2. Execute external preprocessors
1.5. ipreproc.c
1.5.1. Internal preprocessor handling
1.5.2. Initialize the preprocessor structure
1.5.3. Release all memories allocated by preprocessors
1.5.4. Insert a new preprocessor into the preprocessor list
1.5.5. Delete a preprocessor from the list of preprocessors
1.5.6. Load an internal preprocessor
1.5.7. Process preprocessor requests
1.5.8. Preprocessor function
1.6. command.c
1.6.1. Header file for command building
1.6.2. Start a command implementation
1.6.3. Finish a command implementation
1.6.4. Implement a command that has identical functionality
1.6.5. Use the mortals of the caller
1.6.6. Return from the function
1.6.7. Terminate a function with error
1.6.8. The value of the programcounter
1.6.9. Implement jump instructions
1.6.10. Get the next command parameter
1.6.11. Access a command parameter
1.6.12. Get the opcode of a node
1.6.13. Get the parameter list node for a function
1.6.14. Get the car node of a list node
1.6.15. Get the cdr node of a list node
1.6.16. Special variable to store the result
1.6.17. Access certain values of a memory object
1.6.18. Create a new mortal value
1.6.19. Evaluate an expression
1.6.20. Evaluate a left value
1.6.21. Immortalize a variable
1.6.22. Create a new immortal value
1.6.23. Convert a value to other type
1.6.24. Parameter pointer
1.6.25. Allocate memory
1.6.26. Release memory
1.6.27. Decide if a string is integer or not
1.6.28. Basic C variable types to be used
1.6.29. Get the actual type of a value
1.7. lexer.c
1.7.1. lex_SymbolicName()
1.7.2. lex_HandleContinuationLines()
1.7.3. lex_RemoveSkipSymbols()
1.7.4. lex_RemoveComments()
1.7.5. lex_NextLexeme()
1.7.6. lex_SavePosition()
1.7.7. lex_RestorePosition()
1.7.8. lex_StartIteration()
1.7.9. lex_EOF()
1.7.10. lex_Type()
1.7.11. lex_Double()
1.7.12. lex_String()
1.7.13. lex_StrLen()
1.7.14. lex_Long()
1.7.15. lex_LineNumber()
1.7.16. lex_FileName()
1.7.17. lex_XXX()
1.7.18. lex_Finish()
1.7.19. lex_DumpLexemes()
1.7.20. lex_ReadInput()
1.7.21. lex_InitStructure()
1.8. expression.c
1.8.1. What is an expression in ScriptBasic
1.8.2. ex_DumpVariables()
1.8.3. expression_PushNameSpace()
1.8.4. ex_CheckUndefinedLabels()
1.8.5. ex_CleanNameSpaceStack()
1.8.6. expression_PopNameSpace()
1.8.7. ex_PushWaitingLabel()
1.8.8. ex_PopWaitingLabel()
1.8.9. _ex_PushLabel()
1.8.10. _ex_PopLabel()
1.8.11. _ex_CleanLabelStack()
1.8.12. Some NOTE on SymbolXXX functions
1.8.13. _new_SymbolLABEL()
1.8.14. _new_SymbolVAR()
1.8.15. _new_SymbolUF()
1.8.16. _new_eNODE()
1.8.17. _new_eNODE_l()
1.8.18. ex_free()
1.8.19. ex_init()
1.8.20. ex_CleanNamePath()
1.8.21. ex_ConvertName()
1.8.22. ex_IsBFun()
1.8.23. ex_IsUnop()
1.8.24. ex_IsBinop()
1.8.25. ex_LeftValueList()
1.8.26. ex_ExpressionList()
1.8.27. ex_Local()
1.8.28. ex_LocalList()
1.8.29. ex_Global()
1.8.30. ex_GlobalList()
1.8.31. ex_LookupUserFunction()
1.8.32. ex_LookupGlobalVariable
1.8.33. ex_LookupLocallyDeclaredGlobalVariable
1.8.34. ex_LookupLocalVariable
1.8.35. ex_Tag
1.8.36. ex_Expression_i
1.8.37. ex_Expression_r
1.8.38. ex_IsSymbolValidLval(pEx)
1.8.39. ex_LeftValue
1.8.40. ex_PredeclareGlobalLongConst()
1.8.41. ex_IsCommandThis
1.8.42. ex_Command_r()
1.8.43. ex_Command_l()
1.8.44. ex_Pragma
1.8.45. ex_IsCommandCALL()
1.8.46. ex_IsCommandOPEN()
1.8.47. ex_IsCommandSLIF()
1.8.48. ex_IsCommandIF()
1.8.49. ex_IsCommandLET()
1.9. builder.c
1.9.1. The structure of the string table
1.9.2. build_AllocateStringTable()
1.9.3. build_StringIndex()
1.9.4. build_Build_l()
1.9.5. build_Build_r()
1.9.6. build_Build()
1.9.7. build_MagicCode()
1.9.8. build_SaveCCode()
1.9.9. build_SaveCorePart()
1.9.10. build_SaveCore()
1.9.11. build_SaveCode()
1.9.12. build_SaveECode()
1.9.13. build_GetExeCodeOffset()
1.9.14. build_LoadCore()
1.9.15. build_LoadCodeWithOffset()
1.9.16. build_LoadCode()
1.9.17. build_IsFileBinaryFormat()
1.9.18. build_pprint()
1.9.19. build_CreateFTable()
1.9.20. build_CreateVTable()
1.9.21. build_LookupFunctionByName()
1.9.22. build_LookupVariableByName()
1.10. reader.c
1.10.1. reader_IncreaseBuffer()
1.10.2. reader_gets()
1.10.3. reader_ReadLines()
1.10.4. reader_ReadLines_r()
1.10.5. reader_ProcessIncludeFiles()
1.10.6. reader_LoadPreprocessors()
1.10.7. reader_StartIteration()
1.10.8. reader_NextLine()
1.10.9. reader_NextCharacter()
1.10.10. reader_FileName()
1.10.11. reader_LineNumber()
1.10.12. reader_InitStructure()
1.10.13. reader_RelateFile()
1.10.14. reader_DumpLines()
1.11. myalloc.c
1.11.1. Multi-thread use of this module
1.11.2. alloc_InitSegment()
1.11.3. alloc_GlobalUseGlobalMutex()
1.11.4. alloc_SegmentLimit()
1.11.5. alloc_FreeSegment()
1.11.6. alloc_FinishSegment()
1.11.7. alloc_Alloc()
1.11.8. alloc_Free()
1.11.9. alloc_Merge()
1.11.10. alloc_MergeAndFinish()
1.11.11. alloc_InitStat()
1.11.12. alloc_GlobalGetStat()
1.11.13. alloc_GetStat()
1.12. match.c
1.12.1. match_index
1.12.2. InitSets
1.12.3. ModifySet
1.12.4. match
1.12.5. count
1.12.6. parameter
1.12.7. size
1.13. sym.c
1.13.1. sym_NewSymbolTable()
1.13.2. sym_FreeSymbolTable()
1.13.3. sym_TraverseSymbolTable()
1.13.4. sym_LookupSymbol()
1.13.5. sym_DeleteSymbol()
1.14. execute.c
1.14.1. execute_GetCommandByName()
1.14.2. execute_CopyCommandTable()
1.14.3. execute_InitStructure()
1.14.4. execute_ReInitStructure()
1.14.5. execute_Execute_r()
1.14.6. execute_InitExecute()
1.14.7. execute_FinishExecute()
1.14.8. execute_Execute()
1.14.9. execute_ExecuteFunction()
1.14.10. execute_Evaluate()
1.14.11. execute_LeftValue()
1.14.12. execute_EvaluateArray()
1.14.13. execute_EvaluateSarray()
1.14.14. execute_LeftValueArray()
1.14.15. execute_LeftValueSarray()
1.14.16. execute_Convert2String()
1.14.17. execute_Convert2Long()
1.14.18. execute_Convert2LongS()
1.14.19. execute_Convert2Double()
1.14.20. execute_Convert2DoubleS()
1.14.21. execute_Convert2Numeric()
1.14.22. execute_Dereference()
1.14.23. execute_DereferenceS()
1.14.24. execute_GetDoubleValue()
1.14.25. execute_GetLongValue()
1.14.26. execute_IsStringInteger()
1.14.27. execute_IsInteger()
1.15. dynlolib.c
1.15.1. dynlolib_LoadLibrary
1.15.2. dynlolib_FreeLibrary
1.15.3. dynlolib_GetFunctionByName
1.16. conftree.c
1.16.1. cft_init()
1.16.2. cft_GetConfigFileName()
1.16.3. cft_start()
1.16.4. strmyeq()
1.16.5. cft_FindNode()
1.16.6. cft_GetEx()
1.16.7. cft_GetString()
1.16.8. cft_EnumFirst()
1.16.9. cft_EnumNext()
1.16.10. cft_GetKey()
1.16.11. cft_ReadConfig()
1.16.12. cft_WriteConfig()
1.16.13. cft_DropConfig()
1.17. filesys.c
1.17.1. file_fopen
1.17.2. file_fclose
1.17.3. file_size
1.17.4. file_time_accessed
1.17.5. file_time_modified
1.17.6. file_time_created
1.17.7. file_isdir
1.17.8. file_isreg
1.17.9. file_exists
1.17.10. file_truncate
1.17.11. file_fgetc
1.17.12. file_ferror
1.17.13. file_fread
1.17.14. file_fwrite
1.17.15. file_fputc
1.17.16. file_setmode
1.17.17. file_binmode
1.17.18. file_textmode
1.17.19. file_flock
1.17.20. file_lock
1.17.21. file_feof
1.17.22. file_mkdir
1.17.23. file_rmdir
1.17.24. file_remove
1.17.25. file_deltree
1.17.26. file_MakeDirectory
1.17.27. file_opendir
1.17.28. file_readdir
1.17.29. file_closedir
1.17.30. file_sleep
1.17.31. file_curdir
1.17.32. file_chdir
1.17.33. file_chown
1.17.34. file_getowner
1.17.35. file_SetCreateTime
1.17.36. file_SetModifyTime
1.17.37. file_SetAccessTime
1.17.38. file_gethostname
1.17.39. file_gethost
1.17.40. file_tcpconnect
1.17.41. file_tcpsend
1.17.42. file_tcprecv
1.17.43. file_tcpclose
1.17.44. file_killproc
1.17.45. file_fcrypt
1.17.46. file_CreateProcess
1.17.47. file_CreateProcessEx
1.17.48. file_waitpid
1.18. modumana.c
1.18.1. modu_Init
1.18.2. modu_Preload
1.18.3. modu_GetModuleFunctionByName
1.18.4. modu_GetStaticFunctionByName
1.18.5. modu_LoadModule
1.18.6. modu_GetFunctionByName
1.18.7. modu_UnloadAllModules
1.18.8. modu_UnloadModule
1.18.9. modu_ShutdownModule
1.19. hookers.c
1.19.1. hook_Init
1.19.2. hook_file_access
1.19.3. hook_fopen
1.19.4. hook_fclose
1.19.5. hook_size
1.19.6. hook_time_accessed
1.19.7. hook_time_modified
1.19.8. hook_time_created
1.19.9. hook_isdir
1.19.10. hook_isreg
1.19.11. hook_fileexists
1.19.12. hook_truncate
1.19.13. hook_fgetc
1.19.14. hook_ferror
1.19.15. hook_fread
1.19.16. hook_setmode
1.19.17. hook_binmode
1.19.18. hook_textmode
1.19.19. hook_fwrite
1.19.20. hook_fputc
1.19.21. hook_flock
1.19.22. hook_lock
1.19.23. hook_feof
1.19.24. hook_mkdir
1.19.25. hook_rmdir
1.19.26. hook_remove
1.19.27. hook_deltree
1.19.28. hook_MakeDirectory
1.19.29. hook_opendir
1.19.30. hook_readdir
1.19.31. hook_closedir
1.19.32. hook_sleep
1.19.33. hook_curdir
1.19.34. hook_chdir
1.19.35. hook_chown
1.19.36. hook_SetCreateTime
1.19.37. hook_SetModifyTime
1.19.38. hook_SetAccessTime
1.19.39. hook_gethostname
1.19.40. hook_gethost
1.19.41. hook_tcpconnect
1.19.42. hook_tcpsend
1.19.43. hook_tcprecv
1.19.44. hook_tcpclose
1.19.45. hook_killproc
1.19.46. hook_getowner
1.19.47. hook_fcrypt
1.19.48. hook_CreateProcess
1.19.49. hook_CreateProcessEx
1.19.50. hook_waitpid
1.19.51. hook_CallScribaFunction
1.20. options.c
1.20.1. options_Reset
1.20.2. options_Set
1.20.3. options_Get
1.20.4. options_GetR
1.21. report.c
1.21.1. report_report()
1.22. logger.c
1.22.1. log_state()
1.22.2. log_init()
1.22.3. log_printf()
1.22.4. log_shutdown()
1.23. thread.c
1.23.1. thread_CreateThread
1.23.2. thread_ExitThread
1.23.3. thread_InitMutex
1.23.4. thread_FinishMutex
1.23.5. thread_LockMutex
1.23.6. thread_UnlockMutex
1.23.7. thread_shlckstry
1.23.8. thread_InitLock
1.23.9. thread_FinishLock
1.23.10. thread_LockRead
1.23.11. thread_LockWrite
1.23.12. thread_UnlockRead
1.23.13. thread_UnlockWrite
1.24. hndlptr.c
1.24.1. handle_GetHandle
1.24.2. handle_GetPointer
1.24.3. handle_FreeHandle
1.24.4. handle_DestroyHandleArray
1.25. httpd.c
1.25.1. httpd module
1.25.2. AppInit
1.25.3. AppStart
1.25.4. HttpProc
1.25.5. FtpProc
1.25.6. Initialize the signal handlers under UNIX
1.25.7. httpd
1.25.8. FinishConnection