"Fossies" - the Fresh Open Source Software Archive

Member "libextractor-1.11/src/plugins/test_dvi.c" (30 Jan 2021, 3539 Bytes) of package /linux/privat/libextractor-1.11.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2      This file is part of libextractor.
    3      Copyright (C) 2012 Vidyut Samanta and Christian Grothoff
    4 
    5      libextractor is free software; you can redistribute it and/or modify
    6      it under the terms of the GNU General Public License as published
    7      by the Free Software Foundation; either version 3, or (at your
    8      option) any later version.
    9 
   10      libextractor is distributed in the hope that it will be useful, but
   11      WITHOUT ANY WARRANTY; without even the implied warranty of
   12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13      General Public License for more details.
   14 
   15      You should have received a copy of the GNU General Public License
   16      along with libextractor; see the file COPYING.  If not, write to the
   17      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   18      Boston, MA 02110-1301, USA.
   19 */
   20 /**
   21  * @file plugins/test_dvi.c
   22  * @brief testcase for dvi plugin
   23  * @author Christian Grothoff
   24  */
   25 #include "platform.h"
   26 #include "test_lib.h"
   27 
   28 
   29 /**
   30  * Main function for the DVI testcase.
   31  *
   32  * @param argc number of arguments (ignored)
   33  * @param argv arguments (ignored)
   34  * @return 0 on success
   35  */
   36 int
   37 main (int argc, char *argv[])
   38 {
   39   struct SolutionData dvi_ora_sol[] = {
   40     {
   41       EXTRACTOR_METATYPE_MIMETYPE,
   42       EXTRACTOR_METAFORMAT_UTF8,
   43       "text/plain",
   44       "application/x-dvi",
   45       strlen ("application/x-dvi") + 1,
   46       0
   47     },
   48     {
   49       EXTRACTOR_METATYPE_PAGE_COUNT,
   50       EXTRACTOR_METAFORMAT_UTF8,
   51       "text/plain",
   52       "10",
   53       strlen ("10") + 1,
   54       0
   55     },
   56     {
   57       EXTRACTOR_METATYPE_TITLE,
   58       EXTRACTOR_METAFORMAT_C_STRING,
   59       "text/plain",
   60       "Optimal Bitwise Register Allocation using Integer Linear Programming",
   61       strlen (
   62         "Optimal Bitwise Register Allocation using Integer Linear Programming")
   63       + 1,
   64       0
   65     },
   66     {
   67       EXTRACTOR_METATYPE_SUBJECT,
   68       EXTRACTOR_METAFORMAT_C_STRING,
   69       "text/plain",
   70       "Register Allocation",
   71       strlen ("Register Allocation") + 1,
   72       0
   73     },
   74     {
   75       EXTRACTOR_METATYPE_COMMENT,
   76       EXTRACTOR_METAFORMAT_C_STRING,
   77       "text/plain",
   78       " TeX output 2005.02.06:0725",
   79       strlen (" TeX output 2005.02.06:0725") + 1,
   80       0
   81     },
   82     {
   83       EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE,
   84       EXTRACTOR_METAFORMAT_C_STRING,
   85       "text/plain",
   86       "LaTeX with hyperref package",
   87       strlen ("LaTeX with hyperref package") + 1,
   88       0
   89     },
   90     {
   91       EXTRACTOR_METATYPE_AUTHOR_NAME,
   92       EXTRACTOR_METAFORMAT_C_STRING,
   93       "text/plain",
   94       "Rajkishore Barik and Christian Grothoff and Rahul Gupta and Vinayaka Pandit and Raghavendra Udupa",
   95       strlen (
   96         "Rajkishore Barik and Christian Grothoff and Rahul Gupta and Vinayaka Pandit and Raghavendra Udupa")
   97       + 1,
   98       0
   99     },
  100     {
  101       EXTRACTOR_METATYPE_PRODUCED_BY_SOFTWARE,
  102       EXTRACTOR_METAFORMAT_C_STRING,
  103       "text/plain",
  104       "dvips + Distiller",
  105       strlen ("dvips + Distiller") + 1,
  106       0
  107     },
  108     {
  109       EXTRACTOR_METATYPE_KEYWORDS,
  110       EXTRACTOR_METAFORMAT_C_STRING,
  111       "text/plain",
  112       "register allocation integer linear programming bit-wise spilling coalesing rematerialization",
  113       strlen (
  114         "register allocation integer linear programming bit-wise spilling coalesing rematerialization")
  115       + 1,
  116       0
  117     },
  118     { 0, 0, NULL, NULL, 0, -1 }
  119   };
  120   struct ProblemSet ps[] = {
  121     { "testdata/dvi_ora.dvi",
  122       dvi_ora_sol },
  123     { NULL, NULL }
  124   };
  125   return ET_main ("dvi", ps);
  126 }
  127 
  128 
  129 /* end of test_dvi.c */