Code Search for Developers
 
 
  

siddoc.in from Gdb at Krugle


Show siddoc.in syntax highlighted

#! /bin/sh
# Copyright (c) 1999-2001 Red Hat
#
# Display installed SID component documentation files.


# Configuration
prefix="@prefix@"
exec_prefix="@exec_prefix@"
doc_prefix=${SID_EXEC_PREFIX-$exec_prefix}

# Convert windows->posix on cygwin host
if [ x@CYGWIN@ = xyes ]
then
    doc_prefix=`cygpath -u "$doc_prefix"`
fi

doc_suffix="share/sidcomp"
doc_searchdirs="${doc_prefix}/${doc_suffix}:${doc_prefix}/../${doc_suffix}"
pager="${PAGER-cat}"


if [ $# -eq 0 ]
then
    echo "Usage: `basename $0` [-l] name ..." 1>&2
    echo 1>&2
    echo "Search: $doc_searchdirs"
    echo "Pager: $pager"
    exit 0
fi



# List files in doc_searchdirs
listfiles() {
    for dir in `echo $doc_searchdirs | tr ':' ' '`
    do
        if [ -d "$dir" ]
        then
            for file in `echo "$dir"/*.txt`
	    do
		if [ -f "$file" ]
		then
		    component=`head -1 "$file" | awk '{print $1}'`
                    variants=`grep Variant: "$file" | awk '{printf "%s ", $2}'`
		    echo "${file} ${component} ${variants}"
		fi
	    done
        fi
    done
}


list() {
    shift
    echo $@
}

print() {
    $pager $1
}


# Handle options
if [ x$1 = "x-l" ]
then
    display="list"
    shift
else
    display="print"
fi


foundflag="/tmp/found.$$"
trap 'rm -f $foundflag; exit' 0 1 2 3 4 5 9 15


if [ $# -eq 0 ]
then
    set -- -
fi

for comp in $@
do
    rm -f $foundflag
    listfiles | while read file components
    do
        # echo "FOUND: $file $components"
	if expr "$components" : ".*${comp}.*" >/dev/null
	then
	    eval $display "$file" "$components"
	    touch $foundflag
	fi
    done
    if [ ! -f $foundflag ]
    then
	echo "No documentation found for $comp." 1>&2
    fi
done





See more files for this project here

Gdb

GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed.

Project homepage: http://sources.redhat.com/gdb/
Programming language(s): Assembly,C,C++,Expect
License: other

  audio/
    ChangeLog
    Makefile.am
    Makefile.in
    aclocal.m4
    compAudio.cxx
    compCodec.cxx
    components.cxx
    components.h
    config.in
    configure
    configure.in
    stamp-h.in
  bochs/
    cmos/
      Makefile.am
      Makefile.in
      cmos.cc
      cmos.h
      sid-cmos-wrapper.cc
      sid-cmos-wrapper.h
    cpu/
      fpu/
      memory/
      Makefile.am
      Makefile.in
      access.cc
      apic.cc
      arith16.cc
      arith32.cc
      arith8.cc
      bcd.cc
      bit.cc
      cpu.cc
      cpu.h
      ctrl_xfer16.cc
      ctrl_xfer32.cc
      ctrl_xfer8.cc
      ctrl_xfer_pro.cc
      data_xfer16.cc
      data_xfer32.cc
      data_xfer8.cc
      debugstuff.cc
      decode16.cc
      decode32.cc
      exception.cc
      fetchdecode.cc
      flag_ctrl.cc
      flag_ctrl_pro.cc
      init.cc
      io.cc
      io_pro.cc
      lazy_flags.cc
      lazy_flags.h
      logical16.cc
      logical32.cc
    dma/
    floppy/
    gui/
    harddrv/
    keyboard/
    pic/
    pit/
    unmapped/
    vga/
    ChangeLog
    Makefile.am
    Makefile.in
    README
    aclocal.m4
    bochs.h
    bxversion.h
    components.cxx
    config.guess
    config.h.in
    config.sub
    configure
    configure.in
    debug.h
    install-sh
    instrument.h
    ltconfig
    ltmain.sh
    missing
    mkinstalldirs
    stamp-h.in
  cache/
  cfgroot/
  cgen-cpu/
  consoles/
  families/
  gdb/
  gloss/
  glue/
  ide/
  interrupt/
  lcd/
  loader/
  mapper/
  memory/
  mmu/
  parport/
  profiling/
  rtc/
  sched/
  tcl/
  testsuite/
  timers/
  uart/
  CATALOG
  ChangeLog
  Makefile.am
  Makefile.in
  aclocal.m4
  component.dtd
  component_html.xsl
  config.in
  configure
  configure.in
  siddoc.in
  stamp-h.in
  tconfig.in