"Fossies" - the Fresh Open Source Software Archive

Member "cups-filters-1.28.15/filter/braille/drivers/index/ubrlto4dot.c" (11 Apr 2022, 1483 Bytes) of package /linux/misc/cups-filters-1.28.15.tar.xz:


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. For more information about "ubrlto4dot.c" see the Fossies "Dox" file reference documentation.

    1 /*
    2   Copyright (c) 2015 Samuel Thibault <samuel.thibault@ens-lyon.org>
    3   j
    4   Permission is hereby granted, free of charge, to any person obtaining a copy
    5   of this software and associated documentation files (the "Software"), to deal
    6   in the Software without restriction, including without limitation the rights
    7   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    8   copies of the Software, and to permit persons to whom the Software is
    9   furnished to do so, subject to the following conditions:
   10 
   11 
   12   The above copyright notice and this permission notice shall be included in
   13   all copies or substantial portions of the Software.
   14 
   15 
   16   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   17   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   18   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
   19   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   20   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   21   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   22   THE SOFTWARE.
   23 */
   24 
   25 #include <locale.h>
   26 #include <pthread.h>
   27 #include <stdio.h>
   28 
   29 int main(int argc, char *argv[]) {
   30     int i, j, lo, hi;
   31     setlocale(LC_ALL,"");
   32     for (i = 0; i < 256; i++)
   33     {
   34         j = (i&0x7) | ((i&0x8) << 3) | ((i&0x70) >> 1) | (i&0x80);
   35         lo = i & 0xf;
   36         hi = (i & 0xf0) >> 4;
   37         printf("    -e 's/%lc/%c%c/g' \\\n", 0x2800+j, '@'+lo, '@'+hi);
   38     }
   39     return 0;
   40 }