xref: /aoo41x/main/solenv/bin/getcsym.awk (revision 28172baa)
1e76eebc6SAndrew Rist#**************************************************************
2e76eebc6SAndrew Rist#
3e76eebc6SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4e76eebc6SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5e76eebc6SAndrew Rist#  distributed with this work for additional information
6e76eebc6SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*28172baaSAndrew Rist#  to you under the Apache License, Version 2.0 (the "License");
8*28172baaSAndrew Rist#  you may not use this file except in compliance
9e76eebc6SAndrew Rist#  with the License.  You may obtain a copy of the License at
10e76eebc6SAndrew Rist#
11e76eebc6SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12e76eebc6SAndrew Rist#
13e76eebc6SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14e76eebc6SAndrew Rist#  software distributed under the License is distributed on an
15e76eebc6SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16e76eebc6SAndrew Rist#  KIND, either express or implied.  See the License for the
17e76eebc6SAndrew Rist#  specific language governing permissions and limitations
18e76eebc6SAndrew Rist#  under the License.
19e76eebc6SAndrew Rist#
20e76eebc6SAndrew Rist#**************************************************************
21cdf0e10cSrcweir
22cdf0e10cSrcweirBEGIN { global_found = "false" }
2395c2ec6eSAndre Fischer/[ \t]*#/ { sub("#.*", "") }
24cdf0e10cSrcweir/[ \t]*local:/ { global_found = "false" }
25cdf0e10cSrcweir/[ \t]*}/ { global_found = "false" }
26cdf0e10cSrcweir/^[ \t]*$/ { next }
27cdf0e10cSrcweirglobal_found == "true"  { print $0 }
28cdf0e10cSrcweir/[ \t]*global:/ { global_found = "true" }
29