~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/lib/libpsio/tocscan.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*!
2
 
   \file tocscan.c
3
 
   \ingroup (PSIO)
4
 
*/
5
 
 
6
 
#include <string.h>
7
 
#include "psio.h"
8
 
 
9
 
/*!
10
 
** PSIO_TOCSCAN(): Scans the TOC for a particular keyword and returns either
11
 
** a pointer to the entry or NULL to the caller.
12
 
**
13
 
** \ingroup (PSIO)
14
 
*/
15
 
 
16
 
psio_tocentry *psio_tocscan(unsigned int unit, char *key)
17
 
{
18
 
  psio_tocentry *this_entry;
19
 
 
20
 
  if(key == NULL) return(NULL);
21
 
 
22
 
  if((strlen(key)+1) > PSIO_KEYLEN) psio_error(unit,PSIO_ERROR_KEYLEN);
23
 
 
24
 
  this_entry = psio_unit[unit].toc;
25
 
 
26
 
  while(this_entry != NULL) {
27
 
      if(!strcmp(this_entry->key,key)) return(this_entry);
28
 
      this_entry = this_entry->next;
29
 
    }
30
 
 
31
 
  return(NULL);
32
 
}