Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

bm_comp(3) [netbsd man page]

BM(3)							   BSD Library Functions Manual 						     BM(3)

NAME
bm_comp, bm_exec, bm_free -- Boyer-Moore string search LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <bm.h> bm_pat * bm_comp(u_char *pattern, size_t patlen, u_char freq[256]); u_char * bm_exec(bm_pat *pdesc, u_char *text, size_t len); void bm_free(bm_pat *pdesc); DESCRIPTION
These routines implement an efficient mechanism to find an occurrence of a byte string within another byte string. bm_comp() evaluates the patlen bytes starting at pattern, and returns a pointer to a structure describing them. The bytes referenced by pattern may be of any value. The search takes advantage of the frequency distribution of the bytes in the text to be searched. If specified, freq should be an array of 256 values, with higher values indicating that the corresponding character occurs more frequently. (A less than optimal frequency distribu- tion can only result in less than optimal performance, not incorrect results.) If freq is NULL, a system default table is used. bm_exec() returns a pointer to the leftmost occurrence of the string given to bm_comp() within text, or NULL if none occurs. The number of bytes in text must be specified by len. Space allocated for the returned description is discarded by calling bm_free() with the returned description as an argument. The asymptotic speed of bm_exec() is O(len/patlen). SEE ALSO
regexp(3), strstr(3) Hume and Sunday, "Fast String Searching", Software Practice and Experience, Vol. 21, 11, pp. 1221-48, November 1991. BSD
April 8, 2001 BSD

Check Out this Related Man Page

BM(3)							   BSD Library Functions Manual 						     BM(3)

NAME
bm_comp, bm_exec, bm_free -- Boyer-Moore string search LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <bm.h> bm_pat * bm_comp(u_char *pattern, size_t patlen, u_char freq[256]); u_char * bm_exec(bm_pat *pdesc, u_char *text, size_t len); void bm_free(bm_pat *pdesc); DESCRIPTION
These routines implement an efficient mechanism to find an occurrence of a byte string within another byte string. bm_comp() evaluates the patlen bytes starting at pattern, and returns a pointer to a structure describing them. The bytes referenced by pattern may be of any value. The search takes advantage of the frequency distribution of the bytes in the text to be searched. If specified, freq should be an array of 256 values, with higher values indicating that the corresponding character occurs more frequently. (A less than optimal frequency distribu- tion can only result in less than optimal performance, not incorrect results.) If freq is NULL, a system default table is used. bm_exec() returns a pointer to the leftmost occurrence of the string given to bm_comp() within text, or NULL if none occurs. The number of bytes in text must be specified by len. Space allocated for the returned description is discarded by calling bm_free() with the returned description as an argument. The asymptotic speed of bm_exec() is O(len/patlen). SEE ALSO
regexp(3), strstr(3) Hume and Sunday, "Fast String Searching", Software Practice and Experience, Vol. 21, 11, pp. 1221-48, November 1991. BSD
April 8, 2001 BSD
Man Page

14 More Discussions You Might Find Interesting

1. AIX

Error launching c++ executable

Hi everybody, I have compiled my code based on the ALPS libraries () and CMake build system with IBM compiler xlC 11.1 on AIX 6.1 at the latest patch level running on an IBM SP Power 6 machine for high-performance computing. When I run the executable I receive this error message: -bash-3.2$... (2 Replies)
Discussion started by: JessicaAlfonsi
2 Replies

2. UNIX for Advanced & Expert Users

Make giving error after configuring a package

Hi, I have installed gmake 3.82 in my aix 5.3 system. but while installing a package,after doing./configure ,i give gmake and its throwing below error. # gmake "build/Makefile.rules", line 13: make: 1254-055 Dependency line needs colon or double colon operator. also the command is not... (1 Reply)
Discussion started by: sonal kumar
1 Replies

3. AIX

Not picking up the GNU version of make

Hi team, I am new to unix,and need your advice on the below. I am using aix5.3 and have installed make-3.82 on the server. I need to use gmake for configuring and installing a package ,but it is giving error at the below root@sapsrp:/usr/tmp/xymon-4.3.2 # ./configure.server ... (7 Replies)
Discussion started by: sonal kumar
7 Replies

4. UNIX for Dummies Questions & Answers

How do unix file lenghts work?

Hello, Can someone tell me how unix works out file lenghts please? If I'm ftp'ing a file from a mvs mainframe to a unix box will the file be replicated line by line? I'm looking at the file on the unix box and it's telling me the recl is almost 4000 but it's not that on the mvs side. Should a... (3 Replies)
Discussion started by: Grueben
3 Replies

5. AIX

Explanation of C Compiler for AIX

Hi, I have the following packages installed on my AIX server xlC.aix50.rte 10.1.0.2 COMMITTED XL C/C++ Runtime for AIX 5.3 xlC.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor xlC.msg.en_US.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor xlC.msg.en_US.rte 10.1.0.2 COMMITTED XL C/C++ Runtime xlC.rte... (4 Replies)
Discussion started by: jimthompson
4 Replies

6. Fedora

Is UNIX an open source OS ?

Hi everyone, I know the following questions are noobish questions but I am asking them because I am confused about the basics of history behind UNIX and LINUX. Ok onto business, my questions are-: Was/Is UNIX ever an open source operating system ? If UNIX was... (21 Replies)
Discussion started by: sreyan32
21 Replies

7. AIX

Embedding Runtime Search Path into Library on AIX

My product has 2 libraries say "x & y". x depends on y. During the installation of my products package, user will be prompted for his own location to copy my product libraries. Installation will copy libraries "x & y" and create my product specific ENV variable say "MYPATH" pointing to User... (4 Replies)
Discussion started by: erra_krishna
4 Replies

8. UNIX for Dummies Questions & Answers

How Much Space Before 1st Partition?

Hello All, I'm having trouble finding info on how to convert sector size (*if that's really what i want to do?) to something easier to understand. I'm trying to copy the MBR from a bootable SD Card to another SD Card or image file, but I'm not sure what I should use in my dd command since I'm... (17 Replies)
Discussion started by: mrm5102
17 Replies

9. Proxy Server

Problem with Installing Perl Module in Fedora 20

Hi, I have downloaded Audio::Beep. I tried to install it through CPAN but i got YAML error. Then I have tried to install it manually. I tried all the instructions provided in README file. It worked but when i am compiling , it still gives me error: # ls acct21.pl~ imap(2).pl ... (15 Replies)
Discussion started by: zak100
15 Replies

10. AIX

How to disable insecure protocols?

Hello all, planning to secure AIX sever by disabling insecure protocols/cipher suites; got the below requirements from secuirty team. 1.configure the server to disable support for DES and IDEA cipher suites 2.disable insecure TLS/SSL protocol support Configure the server to... (4 Replies)
Discussion started by: Kumar7997
4 Replies

11. UNIX for Advanced & Expert Users

AIX runtime programming issue

I hope my title is accurate enough. I have a product that we port to various UNIX platforms. It is known to run on AIX but using the IBM compiler from years ago. Recently we got a different used AIX P5 platform running AIX 5.3 and we setup the GCC compiler (4.4.5 I think). C and C++ source code.... (5 Replies)
Discussion started by: Pug
5 Replies

12. Shell Programming and Scripting

Can't locate loadable object for module IO::Tty

I am getting this error: Can't locate loadable object for module IO::Tty in @INC (@INC contains: /production/79p/perl5/lib/site_perl/5.28.0/x86_64-linux /production/79p/perl5/lib/site_perl/5.28.0 /production/79p/perl5/lib/5.28.0/x86_64-linux /production/79p/perl5/lib/5.28.0... (2 Replies)
Discussion started by: mrn6430
2 Replies

13. AIX

Older versions of the XL C/C++ Evaluation for AIX 5.3

Hello, IBM offers a evaluation version of their XL C/C++ compiler. Unfortunatly v16.1 (from Developerworks) can not be installed on AIX 5.3 (I can not upgrade my old 32 Bit RS/6000 to a later version) and I have not found any older versions on the IBM and Developerworks pages. Is there a... (8 Replies)
Discussion started by: eh2scqw
8 Replies

14. AIX

Tmux on AIX

Hi, I'm going to build tmux from source on AIX 7.1. Reasons: Terminal multiplexers are a must :) tmux is to GNU screen (part of Toolbox) what vim is to the default AIX vi. The later versions of tmux are considerably nicer than older versions. Also, looks like IBM compiled screen without 256... (4 Replies)
Discussion started by: topcat
4 Replies