source: trunk/Softwares/MiBench/src/c/stringsearch-main_small.c @ 121

Last change on this file since 121 was 117, checked in by rosiere, 15 years ago

1) Platforms : add new organization for test
2) Load_Store_Unit : add array to count nb_check in store_queue
3) Issue_queue and Core_Glue : rewrite the issue network
4) Special_Register_Unit : add reset value to register CID
5) Softwares : add multicontext test
6) Softwares : add SPECINT
7) Softwares : add MiBench?
7) Read_queue : inhib access for r0
8) Change Core_Glue (network) - dont yet support priority and load balancing scheme

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1/* +++Date last modified: 05-Jul-1997 */
2
3/*
4**        A Pratt-Boyer-Moore string search, written by Jerry Coffin
5**  sometime or other in 1991.  Removed from original program, and
6**  (incorrectly) rewritten for separate, generic use in early 1992.
7**  Corrected with help from Thad Smith, late March and early
8**  April 1992...hopefully it's correct this time. Revised by Bob Stout.
9**
10**  This is hereby placed in the Public Domain by its author.
11**
12**  10/21/93 rdg  Fixed bug found by Jeff Dunlop
13*/
14
15#include "stringsearch-search.h"
16#include <stdio.h>
17
18int main_stringsearch_small(void)
19{
20      char *here;
21      char *find_strings[] = {"abb",  "you", "not", "it", "dad", "yoo", "hoo",
22                              "oo", "oh", "xx", "xx", "x", "x", "field", "new", "row",
23                              "regime", "boom", "that", "impact", "and", "zoom", "texture",
24                              "magnet", "doom", "loom", "freq", "current", "phase",
25                              "images", 
26                              "appears", "phase", "conductor", "wavez", 
27                              "normal", "free", "termed",
28                              "provide", "for", "and", "struct", "about", "have",
29                              "proper",
30                              "involve",
31                              "describedly",
32                              "thats",
33                              "spaces",
34                              "circumstance",
35                              "the",
36                              "member",
37                              "such",
38                              "guide",
39                              "regard",
40                              "officers",
41                              "implement",
42                              "principalities",                       
43                              NULL};
44      char *search_strings[] = {"cabbie", "your", "It isn't here",
45                                "But it is here", "hodad", "yoohoo", "yoohoo",
46                                "yoohoo", "yoohoo", "yoohoo", "xx", "x", ".", 
47                                "In recent years, the field of photonic ",
48                                "crystals has found new",
49                                "applications in the RF and microwave",
50                                "regime. A new type of metallic",
51                                "electromagnetic crystal has been", 
52                                "developed that is having a",
53                                "significant impact on the field of", 
54                                "antennas. It consists of a",
55                                "conductive surface, covered with a",
56                                "special texture which alters its",
57                                "electromagnetic properties. Made of solid",
58                                "metal, the structure",
59                                "conducts DC currents, but over a",
60                                "particular frequency range it does",
61                                "not conduct AC currents. It does not",
62                                "reverse the phase of reflected",
63                                "waves, and the effective image currents",
64
65                                "appear in-phase, rather than",
66                                "out-of-phase as they are on normal",
67                                "conductors. Furthermore, surface",
68                                "waves do not propagate, and instead",
69                                "radiate efficiently into free",
70                                "space. This new material, termed a",
71                                "high-impedance surface, provides",
72                                "a useful new ground plane for novel",
73                                "low-profile antennas and other",
74                                "electromagnetic structures.",
75                                "The recent protests about the Michigamua",
76                                "student organization have raised an",
77                                "important question as to the proper nature",
78                                "and scope of University involvement",
79                                "with student organizations. Accordingly",
80                                "the panel described in my Statement of",
81                                "February 25, 2000 that is considering the",
82                                "question of privileged space also will",
83                                "consider under what circumstances and in", 
84                                "what ways the University, its",
85                                "administrators and faculty members should",
86                                "be associated with such organizations",
87                                "and it will recommend guiding principles",
88                                "in this regard. The University's",
89                                "Executive Officers and I will then decide",
90                                "whether and how to implement such",
91                                "principles."                         
92};
93      int i;
94
95      for (i = 0; find_strings[i]; i++)
96      {
97            init_search(find_strings[i]);
98            here = strsearch(search_strings[i]);
99            printf("\"%s\" is%s in \"%s\"", find_strings[i],
100                  here ? "" : " not", search_strings[i]);
101            if (here)
102                  printf(" [\"%s\"]", here);
103            putchar('\n');
104      }
105
106      return 0;
107}
108
Note: See TracBrowser for help on using the repository browser.