Deleted Added
full compact
io.c (116390) io.c (125736)
1/*
2 * Copyright (c) 1985 Sun Microsystems, Inc.
3 * Copyright (c) 1980, 1993
4 * The Regents of the University of California. All rights reserved.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 26 unchanged lines hidden (view full) ---

35
36#if 0
37#ifndef lint
38static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 6/6/93";
39#endif /* not lint */
40#endif
41
42#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1985 Sun Microsystems, Inc.
3 * Copyright (c) 1980, 1993
4 * The Regents of the University of California. All rights reserved.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 26 unchanged lines hidden (view full) ---

35
36#if 0
37#ifndef lint
38static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 6/6/93";
39#endif /* not lint */
40#endif
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/usr.bin/indent/io.c 116390 2003-06-15 09:28:17Z charnier $");
43__FBSDID("$FreeBSD: head/usr.bin/indent/io.c 125736 2004-02-12 16:25:12Z bde $");
44
45#include <ctype.h>
46#include <err.h>
47#include <stdio.h>
48#include <stdlib.h>
49#include <string.h>
50#include "indent_globs.h"
51#include "indent.h"

--- 238 unchanged lines hidden (view full) ---

290
291int
292compute_code_target(void)
293{
294 int target_col = ps.ind_size * ps.ind_level + 1;
295
296 if (ps.paren_level)
297 if (!lineup_to_parens)
44
45#include <ctype.h>
46#include <err.h>
47#include <stdio.h>
48#include <stdlib.h>
49#include <string.h>
50#include "indent_globs.h"
51#include "indent.h"

--- 238 unchanged lines hidden (view full) ---

290
291int
292compute_code_target(void)
293{
294 int target_col = ps.ind_size * ps.ind_level + 1;
295
296 if (ps.paren_level)
297 if (!lineup_to_parens)
298 target_col += continuation_indent * ps.paren_level;
298 target_col += continuation_indent
299 * (2 * continuation_indent == ps.ind_size ? 1 : ps.paren_level);
299 else {
300 int w;
301 int t = paren_target;
302
303 if ((w = count_spaces(t, s_code) - max_col) > 0
304 && count_spaces(target_col, s_code) <= max_col) {
305 t -= w + 1;
306 if (t > target_col)

--- 360 unchanged lines hidden ---
300 else {
301 int w;
302 int t = paren_target;
303
304 if ((w = count_spaces(t, s_code) - max_col) > 0
305 && count_spaces(target_col, s_code) <= max_col) {
306 t -= w + 1;
307 if (t > target_col)

--- 360 unchanged lines hidden ---