flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > include mapper

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 14 Oct 2024, 11:32
as i am restarting some old projects, i am facing the include tree problem.

i think about a tool to analyse and extract the include tree.

for example:

file1 include file2
file2 include file3 and file 5
file 3 include file 4 and file 5

and so on.

and then give a sort of textual treeview.
Code:
file1
 |_file2
    |_file3
    |  |_file4
    |  |_file5
    |_file5
    

except making a parser just for this, i don't see how to make it
Post 14 Oct 2024, 11:32
View user's profile Send private message Visit poster's website Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 1150
Location: Russia
macomics 14 Oct 2024, 12:46
Code:
cat $filename | grep include    
Post 14 Oct 2024, 12:46
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20632
Location: In your JS exploiting you and your system
revolution 14 Oct 2024, 13:09
I've been using this macro to show a tree view. It doesn't show the vertical lines, but is close to what you show.
Code:
macro MI_def prefix {
        macro MI file \{
                MI_def prefix#"    "
                display `prefix,file,10 
                includE file 
                purge MI
        \}
} 
MI_def ""
include fix MI 
include "app.asm"    
Post 14 Oct 2024, 13:09
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 14 Oct 2024, 14:23
very good revolution, thank you.

gives that on fasmw.asm

Code:
win32ax.inc
  win32a.inc
    macro/struct.inc
    macro/proc32.inc
    macro/com32.inc
    macro/import32.inc
    macro/export.inc
    macro/resource.inc
    equates/kernel32.inc
    equates/user32.inc
    equates/gdi32.inc
    equates/comctl32.inc
    equates/comdlg32.inc
    equates/shell32.inc
    equates/wsock32.inc
  macro/if.inc
  api/kernel32.inc
  api/user32.inc
  api/gdi32.inc
  api/advapi32.inc
  api/comctl32.inc
  api/comdlg32.inc
  api/shell32.inc
  api/wsock32.inc
fedit.ash
..\..\version.inc
fedit.inc
  ../version.inc
  ../variable.inc
  ..\memory.inc
  ..\navigate.inc
  ..\edit.inc
  ..\blocks.inc
  ..\search.inc
  ..\undo.inc
fasm.inc
  ..\..\errors.inc
  ..\..\symbdump.inc
  ..\..\preproce.inc
  ..\..\parser.inc
  ..\..\exprpars.inc
  ..\..\assemble.inc
  ..\..\exprcalc.inc
  ..\..\formats.inc
  ..\..\x86_64.inc
  ..\..\avx.inc
  ..\..\tables.inc
  ..\..\messages.inc
  ..\..\variable.inc

    


Description: put in fasm/include folder and use it by include 'includeTree.inc' at the begining of source file
Download
Filename: includeTree.inc
Filesize: 231 Bytes
Downloaded: 121 Time(s)

Post 14 Oct 2024, 14:23
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 15 Oct 2024, 21:47
very very good trick. i like it so much.

now my project have a cleaner structure and i can better localize what is are common, and the platform specific codes

very good trick, thank you again revolution.


windows version:
Code:
sys/fool.inc
  settings.inc
  foolw.inc
    windows/windows.inc
      win32a.inc
        macro/struct.inc
        macro/proc32.inc
        macro/com32.inc
        macro/import32.inc
        macro/export.inc
        macro/resource.inc
        equates/kernel32.inc
        equates/user32.inc
        equates/gdi32.inc
        equates/comctl32.inc
        equates/comdlg32.inc
        equates/shell32.inc
        equates/wsock32.inc
      api\kernel32.inc
      api\user32.inc
      api\gdi32.inc
      api\vlc32.inc
      api\shell32.inc
      irq0.inc
      irq1.inc
        scancodes.inc
      vsync.inc
      serial.inc
    equates.inc
    macros.inc
    ../lib/fool.inc
      caller.inc
      item.inc
      screen.inc
      palette.inc
      pixel.inc
      do.inc
      while.inc
      for.inc
      io.inc
      ife.inc
      ops.inc
      read.inc
      otk.inc
      tmk.inc
      minusplus.inc
      date.inc
      time.inc
      lim.inc
      init.inc
      ptr.inc
      rnd.inc
      timer.inc
      anim.inc
      input.inc
      buffer.inc
      caret.inc
      list.inc
      malloc.inc
      copyclr.inc
      node.inc
      asm.inc
      const.inc
      num.inc
      fxdec.inc
      crypt.inc
      zone.inc
      hit.inc
      gnode.inc
      grab.inc
      box.inc
      pong.inc
      txt.inc
      vtxt.inc
      line.inc
      circle.inc
      border.inc
      frame.inc
      bmp.inc
      tex.inc
      put.inc
      bits.inc
      boxs.inc
      buts.inc
      plotb.inc
      plotc.inc
      plotd.inc
      plotsb.inc
      plotw.inc
      but.inc
      win.inc
        ../bmp/poussoir.inc
      digit.inc
      vectors.inc
      fill.inc
      sound.inc
      ../shell/shell.inc
        macros.inc
        equates.inc
        libstr/libstr.inc
          atoi.inc
          cmpstr.inc
          copystr.inc
          itoa.inc
          sizestr.inc
          trim.inc
        commands/commands.inc
          exit.inc
          help.inc
          hello.inc
          inc.inc
    ../bmp/fool_logo.inc
    ../bmp/fasmicon.inc
    ../fnt/font85.inc
    ../fnt/ugly.inc
    ../codepages/khdle.inc
      azerty.inc
      qwerty.inc
      keyasm.inc
      keynormal.inc
    colors.inc
      htmlColors.inc
    mouse.inc
      ../bmp/pointer.inc
      ../bmp/hand.inc
    



Bootable version
Code:
sys/fool.inc
  settings.inc
  foolos.inc
    os/os.inc
      sys/mbr.inc
        secondstage.inc
          smap.inc
          dummykernel.inc
        dummysecondstage.inc
      sys/header.inc
        ../vesa/vesainfo.inc
        ../vesa/vesatest.inc
        a20.inc
        print.inc
        pmswitch.inc
        gdt.inc
        idt.inc
          interrupts.inc
            ../irq0/irq0.inc
            ../irq1/irq1.inc
              keylookup.inc
              keymap.inc
                scancodes.inc
        pic.inc
        ../vesa/setvesamode.inc
        ../vesa/vesaconstant.inc
        ../vesa/vsync.inc
        reboot.inc
        returndos.inc
    equates.inc
    macros.inc
    os/lib/fool.inc
      ../../../lib/caller.inc
      ../../../lib/item.inc
      screen.inc
      ../../../lib/palette.inc
      ../../../lib/pixel.inc
      ../../../lib/do.inc
      ../../../lib/while.inc
      ../../../lib/for.inc
      ../../../lib/io.inc
      ../../../lib/ife.inc
      ../../../lib/ops.inc
      ../../../lib/read.inc
      ../../../lib/otk.inc
      ../../../lib/tmk.inc
      ../../../lib/minusplus.inc
      date.inc
      time.inc
      ../../../lib/lim.inc
      ../../../lib/ptr.inc
      ../../../lib/crypt.inc
      ../../../lib/rnd.inc
      ../../../lib/buffer.inc
      ../../../lib/list.inc
      copyclr.inc
      ../../../lib/node.inc
      ../../../lib/asm.inc
      ../../../lib/init.inc
      ../../../lib/const.inc
      ../../../lib/num.inc
      ../../../lib/fxdec.inc
      ../../../lib/gnode.inc
      ../../../lib/box.inc
      ../../../lib/pong.inc
      ../../../lib/txt.inc
      ../../../lib/vtxt.inc
      ../../../lib/caret.inc
      ../../../lib/line.inc
      ../../../lib/circle.inc
      ../../../lib/border.inc
      ../../../lib/frame.inc
      ../../../lib/bmp.inc
      ../../../lib/tex.inc
      ../../../lib/put.inc
      ../../../lib/bits.inc
      ../../../lib/boxs.inc
      ../../../lib/buts.inc
      ../../../lib/timer.inc
      ../../../lib/plotb.inc
      ../../../lib/plotc.inc
      ../../../lib/plotd.inc
      ../../../lib/plotsb.inc
      ../../../lib/plotw.inc
      but.inc
      ../../../lib/anim.inc
      ../../../lib/win.inc
        ../bmp/poussoir.inc
      ../../../lib/input.inc
      ../../../shell/shell.inc
        macros.inc
        equates.inc
        libstr/libstr.inc
          atoi.inc
          cmpstr.inc
          copystr.inc
          itoa.inc
          sizestr.inc
          trim.inc
        commands/commands.inc
          exit.inc
          help.inc
          hello.inc
          inc.inc
    ../bmp/fool_logo.inc
    ../bmp/fasmicon.inc
    os/fonts/font85.inc
    os/fonts/ugly.inc
    ../codepages/khdle.inc
      azerty.inc
      qwerty.inc
      keyasm.inc
      keynormal.inc
    colors.inc
      htmlColors.inc
    mouse.inc
      ../bmp/pointer.inc
      ../bmp/hand.inc
    


Description: for examples, full source on gitlab
Download
Filename: fool.zip
Filesize: 85.36 KB
Downloaded: 118 Time(s)

Post 15 Oct 2024, 21:47
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.